From 92ff8807bf817556b35d427f9a0eb78048172797 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 1 Feb 2024 22:46:35 +0000 Subject: [PATCH] CodeGen from PR 27320 in Azure/azure-rest-api-specs Merge 6f4205382fb4c2f69b31de183046873a1181e27d into 784dcbc568c61801a33dfe197cb785ffe22a9dec --- .../CHANGELOG.md | 4 +- .../README.md | 53 +- .../SAMPLE.md | 7988 ++++++++++++----- .../pom.xml | 13 +- .../MachineLearningManager.java | 725 +- .../fluent/AzureMachineLearningServices.java | 433 + .../AzureMachineLearningWorkspaces.java | 235 - .../fluent/BatchDeploymentsClient.java | 134 +- .../fluent/BatchEndpointsClient.java | 100 +- .../CapacityReservationGroupsClient.java | 184 + .../fluent/CodeContainersClient.java | 36 +- .../fluent/CodeVersionsClient.java | 160 +- .../fluent/ComponentContainersClient.java | 36 +- .../fluent/ComponentVersionsClient.java | 123 +- .../fluent/ComputesClient.java | 386 +- .../fluent/DataContainersClient.java | 36 +- .../fluent/DataVersionsClient.java | 129 +- .../fluent/DatastoresClient.java | 54 +- .../fluent/EndpointDeploymentsClient.java | 252 + .../fluent/EndpointsClient.java | 246 + .../fluent/EnvironmentContainersClient.java | 36 +- .../fluent/EnvironmentVersionsClient.java | 123 +- .../fluent/FeaturesClient.java | 94 + .../fluent/FeaturesetContainersClient.java | 210 + .../fluent/FeaturesetVersionsClient.java | 301 + .../FeaturestoreEntityContainersClient.java | 213 + .../FeaturestoreEntityVersionsClient.java | 227 + .../fluent/InferenceEndpointsClient.java | 291 + .../fluent/InferenceGroupsClient.java | 362 + .../fluent/InferencePoolsClient.java | 341 + .../machinelearning/fluent/JobsClient.java | 94 +- .../fluent/LabelingJobsClient.java | 333 + .../ManagedNetworkProvisionsClient.java | 80 + .../ManagedNetworkSettingsRulesClient.java | 202 + .../MarketplaceSubscriptionsClient.java | 202 + .../fluent/ModelContainersClient.java | 41 +- .../fluent/ModelVersionsClient.java | 204 +- .../fluent/OnlineDeploymentsClient.java | 172 +- .../fluent/OnlineEndpointsClient.java | 156 +- .../fluent/OperationsClient.java | 22 +- .../PrivateEndpointConnectionsClient.java | 109 +- .../fluent/PrivateLinkResourcesClient.java | 43 +- .../machinelearning/fluent/QuotasClient.java | 24 +- .../fluent/RegistriesClient.java | 297 + .../fluent/RegistryCodeContainersClient.java | 200 + .../fluent/RegistryCodeVersionsClient.java | 253 + .../RegistryComponentContainersClient.java | 202 + .../RegistryComponentVersionsClient.java | 217 + .../fluent/RegistryDataContainersClient.java | 203 + .../fluent/RegistryDataReferencesClient.java | 52 + .../fluent/RegistryDataVersionsClient.java | 258 + .../RegistryEnvironmentContainersClient.java | 205 + .../RegistryEnvironmentVersionsClient.java | 221 + .../fluent/RegistryModelContainersClient.java | 203 + .../fluent/RegistryModelVersionsClient.java | 334 + .../fluent/SchedulesClient.java | 91 +- .../fluent/ServerlessEndpointsClient.java | 397 + .../machinelearning/fluent/UsagesClient.java | 12 +- .../fluent/VirtualMachineSizesClient.java | 8 +- .../fluent/WorkspaceConnectionsClient.java | 238 +- .../fluent/WorkspaceFeaturesClient.java | 8 +- .../fluent/WorkspacesClient.java | 487 +- .../fluent/models/AccountApiKeysInner.java | 80 + .../fluent/models/AccountModelInner.java | 308 + .../fluent/models/AmlOperationInner.java | 106 - .../fluent/models/AmlUserFeatureInner.java | 22 +- .../fluent/models/BatchDeploymentInner.java | 41 +- .../fluent/models/BatchEndpointInner.java | 41 +- .../models/CapacityReservationGroupInner.java | 188 + .../models/ClusterUpdateProperties.java | 14 +- .../fluent/models/CodeContainerInner.java | 21 +- .../fluent/models/CodeVersionInner.java | 21 +- .../models/ComponentContainerInner.java | 22 +- .../fluent/models/ComponentVersionInner.java | 22 +- .../fluent/models/ComputeResourceInner.java | 32 +- .../fluent/models/ComputeSecretsInner.java | 13 +- .../fluent/models/DataContainerInner.java | 21 +- .../fluent/models/DataVersionBaseInner.java | 21 +- .../fluent/models/DatastoreInner.java | 21 +- .../fluent/models/DatastoreSecretsInner.java | 17 +- .../fluent/models/DeploymentLogsInner.java | 14 +- .../models/DiagnoseResponseResultInner.java | 14 +- .../fluent/models/EndpointAuthKeysInner.java | 18 +- .../fluent/models/EndpointAuthTokenInner.java | 26 +- ...tResourcePropertiesBasicResourceInner.java | 83 + .../fluent/models/EndpointKeysInner.java | 57 + .../models/EndpointPropertiesBaseInner.java | 44 +- ...tResourcePropertiesBasicResourceInner.java | 81 + .../models/EnvironmentContainerInner.java | 22 +- .../models/EnvironmentVersionInner.java | 22 +- .../fluent/models/ExportSummaryInner.java | 105 + .../models/ExternalFqdnResponseInner.java | 22 +- .../fluent/models/FeatureInner.java | 81 + .../models/FeaturesetContainerInner.java | 81 + ...eaturesetVersionBackfillResponseInner.java | 55 + .../fluent/models/FeaturesetVersionInner.java | 81 + .../FeaturestoreEntityContainerInner.java | 81 + .../FeaturestoreEntityVersionInner.java | 81 + .../GetBlobReferenceSasResponseDtoInner.java | 59 + .../fluent/models/GroupStatusInner.java | 136 + .../fluent/models/InferenceEndpointInner.java | 188 + .../fluent/models/InferenceGroupInner.java | 188 + .../fluent/models/InferencePoolInner.java | 188 + .../fluent/models/JobBaseInner.java | 21 +- .../fluent/models/LabelingJobInner.java | 80 + .../models/LabelingJobPropertiesInner.java | 392 + .../models/ListNotebookKeysResultInner.java | 22 +- .../ListStorageAccountKeysResultInner.java | 16 +- .../models/ListWorkspaceKeysResultInner.java | 103 +- .../ManagedNetworkProvisionStatusInner.java | 81 + .../models/ManagedNetworkSettingsInner.java | 152 + .../models/MarketplaceSubscriptionInner.java | 81 + .../fluent/models/ModelContainerInner.java | 21 +- .../fluent/models/ModelVersionInner.java | 21 +- .../NotebookAccessTokenResultInner.java | 120 +- .../models/NotebookResourceInfoInner.java | 70 +- .../fluent/models/OnlineDeploymentInner.java | 42 +- .../fluent/models/OnlineEndpointInner.java | 41 +- .../fluent/models/OperationInner.java | 129 + .../OutboundRuleBasicResourceInner.java | 81 + .../fluent/models/PackageResponseInner.java | 216 + .../models/PendingUploadResponseDtoInner.java | 112 + .../fluent/models/PoolStatusInner.java | 132 + .../PrivateEndpointConnectionInner.java | 165 +- .../PrivateEndpointConnectionProperties.java | 77 +- .../models/PrivateLinkResourceInner.java | 250 + .../PrivateLinkResourceListResultInner.java | 55 - .../models/PrivateLinkResourceProperties.java | 44 +- .../fluent/models/RegistryInner.java | 372 + ...ryPrivateEndpointConnectionProperties.java | 144 + .../fluent/models/RegistryProperties.java | 262 + .../fluent/models/ResourceQuotaInner.java | 28 +- .../fluent/models/ScheduleInner.java | 21 +- .../models/ServerlessEndpointInner.java | 188 + .../models/ServerlessEndpointStatusInner.java | 46 + .../SharedPrivateLinkResourceProperty.java | 88 +- .../fluent/models/SkuResourceInner.java | 20 +- .../models/TriggerRunSubmissionDtoInner.java | 81 + .../UpdateWorkspaceQuotasResultInner.java | 14 +- .../fluent/models/UsageInner.java | 24 +- .../VirtualMachineSizeListResultInner.java | 14 +- ...nectionPropertiesV2BasicResourceInner.java | 31 +- .../fluent/models/WorkspaceInner.java | 822 +- .../models/WorkspacePropertiesInner.java | 873 +- .../WorkspacePropertiesUpdateParameters.java | 240 - ...kspacePropertiesUpdateParametersInner.java | 503 ++ .../WorkspaceUpdateParametersInner.java | 542 ++ .../fluent/models/package-info.java | 4 +- .../machinelearning/fluent/package-info.java | 4 +- ...ationImpl.java => AccountApiKeysImpl.java} | 26 +- .../implementation/AccountModelImpl.java | 108 + .../implementation/AmlUserFeatureImpl.java | 3 +- ... AzureMachineLearningServicesBuilder.java} | 78 +- .../AzureMachineLearningServicesImpl.java | 1151 +++ .../AzureMachineLearningWorkspacesImpl.java | 654 -- .../implementation/BatchDeploymentImpl.java | 61 +- .../BatchDeploymentsClientImpl.java | 934 +- .../implementation/BatchDeploymentsImpl.java | 191 +- .../implementation/BatchEndpointImpl.java | 58 +- .../BatchEndpointsClientImpl.java | 907 +- .../implementation/BatchEndpointsImpl.java | 145 +- .../CapacityReservationGroupImpl.java | 212 + .../CapacityReservationGroupsClientImpl.java | 1049 +++ .../CapacityReservationGroupsImpl.java | 149 + .../implementation/CodeContainerImpl.java | 67 +- .../CodeContainersClientImpl.java | 512 +- .../implementation/CodeContainersImpl.java | 150 +- .../implementation/CodeVersionImpl.java | 86 +- .../CodeVersionsClientImpl.java | 1056 ++- .../implementation/CodeVersionsImpl.java | 210 +- .../ComponentContainerImpl.java | 71 +- .../ComponentContainersClientImpl.java | 518 +- .../ComponentContainersImpl.java | 151 +- .../implementation/ComponentVersionImpl.java | 72 +- .../ComponentVersionsClientImpl.java | 887 +- .../implementation/ComponentVersionsImpl.java | 191 +- .../implementation/ComputeResourceImpl.java | 103 +- .../implementation/ComputeSecretsImpl.java | 3 +- .../implementation/ComputesClientImpl.java | 2574 +++--- .../implementation/ComputesImpl.java | 185 +- .../implementation/DataContainerImpl.java | 63 +- .../DataContainersClientImpl.java | 518 +- .../implementation/DataContainersImpl.java | 150 +- .../implementation/DataVersionBaseImpl.java | 81 +- .../DataVersionsClientImpl.java | 929 +- .../implementation/DataVersionsImpl.java | 191 +- .../implementation/DatastoreImpl.java | 62 +- .../implementation/DatastoreSecretsImpl.java | 3 +- .../implementation/DatastoresClientImpl.java | 744 +- .../implementation/DatastoresImpl.java | 173 +- .../implementation/DeploymentLogsImpl.java | 3 +- .../DiagnoseResponseResultImpl.java | 3 +- .../implementation/EndpointAuthKeysImpl.java | 3 +- .../implementation/EndpointAuthTokenImpl.java | 3 +- ...ntResourcePropertiesBasicResourceImpl.java | 131 + .../EndpointDeploymentsClientImpl.java | 1270 +++ .../EndpointDeploymentsImpl.java | 203 + .../implementation/EndpointKeysImpl.java | 39 + .../EndpointPropertiesBaseImpl.java | 3 +- ...ntResourcePropertiesBasicResourceImpl.java | 146 + .../implementation/EndpointsClientImpl.java | 1268 +++ .../implementation/EndpointsImpl.java | 182 + .../EnvironmentContainerImpl.java | 71 +- .../EnvironmentContainersClientImpl.java | 519 +- .../EnvironmentContainersImpl.java | 151 +- .../EnvironmentVersionImpl.java | 76 +- .../EnvironmentVersionsClientImpl.java | 890 +- .../EnvironmentVersionsImpl.java | 195 +- .../implementation/ExportSummaryImpl.java | 45 + .../ExternalFqdnResponseImpl.java | 9 +- .../implementation/FeatureImpl.java | 50 + .../implementation/FeaturesClientImpl.java | 563 ++ .../implementation/FeaturesImpl.java | 76 + .../FeaturesetContainerImpl.java | 123 + .../FeaturesetContainersClientImpl.java | 1003 +++ .../FeaturesetContainersImpl.java | 160 + ...eaturesetVersionBackfillResponseImpl.java} | 18 +- .../implementation/FeaturesetVersionImpl.java | 138 + .../FeaturesetVersionsClientImpl.java | 1378 +++ .../FeaturesetVersionsImpl.java | 205 + .../FeaturestoreEntityContainerImpl.java | 123 + ...eaturestoreEntityContainersClientImpl.java | 1013 +++ .../FeaturestoreEntityContainersImpl.java | 163 + .../FeaturestoreEntityVersionImpl.java | 128 + .../FeaturestoreEntityVersionsClientImpl.java | 1094 +++ .../FeaturestoreEntityVersionsImpl.java | 183 + .../GetBlobReferenceSasResponseDtoImpl.java | 33 + .../implementation/GroupStatusImpl.java | 45 + .../implementation/InferenceEndpointImpl.java | 196 + .../InferenceEndpointsClientImpl.java | 1334 +++ .../InferenceEndpointsImpl.java | 204 + .../implementation/InferenceGroupImpl.java | 224 + .../InferenceGroupsClientImpl.java | 1773 ++++ .../implementation/InferenceGroupsImpl.java | 220 + .../implementation/InferencePoolImpl.java | 225 + .../InferencePoolsClientImpl.java | 1684 ++++ .../implementation/InferencePoolsImpl.java | 198 + .../implementation/JobBaseImpl.java | 69 +- .../implementation/JobsClientImpl.java | 934 +- .../implementation/JobsImpl.java | 136 +- .../implementation/LabelingJobImpl.java | 154 + .../LabelingJobPropertiesImpl.java | 168 + .../LabelingJobsClientImpl.java | 1501 ++++ .../implementation/LabelingJobsImpl.java | 223 + .../ListNotebookKeysResultImpl.java | 3 +- .../ListStorageAccountKeysResultImpl.java | 3 +- .../ListWorkspaceKeysResultImpl.java | 19 +- .../ManagedNetworkProvisionStatusImpl.java | 37 + .../ManagedNetworkProvisionsClientImpl.java | 359 + .../ManagedNetworkProvisionsImpl.java | 56 + .../ManagedNetworkSettingsImpl.java | 70 + ...ManagedNetworkSettingsRulesClientImpl.java | 930 ++ .../ManagedNetworkSettingsRulesImpl.java | 159 + .../MarketplaceSubscriptionImpl.java | 123 + .../MarketplaceSubscriptionsClientImpl.java | 948 ++ .../MarketplaceSubscriptionsImpl.java | 158 + .../implementation/ModelContainerImpl.java | 67 +- .../ModelContainersClientImpl.java | 536 +- .../implementation/ModelContainersImpl.java | 155 +- .../implementation/ModelVersionImpl.java | 97 +- .../ModelVersionsClientImpl.java | 1303 +-- .../implementation/ModelVersionsImpl.java | 233 +- .../NotebookAccessTokenResultImpl.java | 31 +- .../NotebookResourceInfoImpl.java | 11 +- .../implementation/OnlineDeploymentImpl.java | 71 +- .../OnlineDeploymentsClientImpl.java | 1323 +-- .../implementation/OnlineDeploymentsImpl.java | 251 +- .../implementation/OnlineEndpointImpl.java | 63 +- .../OnlineEndpointsClientImpl.java | 1319 +-- .../implementation/OnlineEndpointsImpl.java | 192 +- .../implementation/OperationImpl.java | 51 + .../implementation/OperationsClientImpl.java | 112 +- .../implementation/OperationsImpl.java | 20 +- .../OutboundRuleBasicResourceImpl.java | 123 + .../implementation/PackageResponseImpl.java | 100 + .../PendingUploadResponseDtoImpl.java | 42 + .../implementation/PoolStatusImpl.java | 44 + .../PrivateEndpointConnectionImpl.java | 94 +- .../PrivateEndpointConnectionsClientImpl.java | 718 +- .../PrivateEndpointConnectionsImpl.java | 182 +- .../PrivateLinkResourceImpl.java | 93 + .../PrivateLinkResourcesClientImpl.java | 215 +- .../PrivateLinkResourcesImpl.java | 37 +- .../implementation/QuotasClientImpl.java | 289 +- .../implementation/QuotasImpl.java | 21 +- .../implementation/RegistriesClientImpl.java | 1421 +++ .../implementation/RegistriesImpl.java | 164 + .../RegistryCodeContainersClientImpl.java | 943 ++ .../RegistryCodeContainersImpl.java | 158 + .../RegistryCodeVersionsClientImpl.java | 1198 +++ .../RegistryCodeVersionsImpl.java | 205 + ...RegistryComponentContainersClientImpl.java | 949 ++ .../RegistryComponentContainersImpl.java | 158 + .../RegistryComponentVersionsClientImpl.java | 1044 +++ .../RegistryComponentVersionsImpl.java | 180 + .../RegistryDataContainersClientImpl.java | 951 ++ .../RegistryDataContainersImpl.java | 159 + .../RegistryDataReferencesClientImpl.java | 236 + .../RegistryDataReferencesImpl.java | 60 + .../RegistryDataVersionsClientImpl.java | 1227 +++ .../RegistryDataVersionsImpl.java | 205 + ...gistryEnvironmentContainersClientImpl.java | 966 ++ .../RegistryEnvironmentContainersImpl.java | 159 + ...RegistryEnvironmentVersionsClientImpl.java | 1065 +++ .../RegistryEnvironmentVersionsImpl.java | 184 + .../implementation/RegistryImpl.java | 296 + .../RegistryModelContainersClientImpl.java | 953 ++ .../RegistryModelContainersImpl.java | 159 + .../RegistryModelVersionsClientImpl.java | 1535 ++++ .../RegistryModelVersionsImpl.java | 232 + .../{Utils.java => ResourceManagerUtils.java} | 45 +- .../implementation/ResourceQuotaImpl.java | 3 +- .../implementation/ScheduleImpl.java | 65 +- .../implementation/SchedulesClientImpl.java | 800 +- .../implementation/SchedulesImpl.java | 158 +- .../ServerlessEndpointImpl.java | 247 + .../ServerlessEndpointStatusImpl.java | 39 + .../ServerlessEndpointsClientImpl.java | 1749 ++++ .../ServerlessEndpointsImpl.java | 226 + .../implementation/SkuResourceImpl.java | 4 +- .../TriggerRunSubmissionDtoImpl.java | 37 + .../UpdateWorkspaceQuotasResultImpl.java | 3 +- .../implementation/UsagesClientImpl.java | 198 +- .../implementation/UsagesImpl.java | 8 +- .../VirtualMachineSizeListResultImpl.java | 3 +- .../VirtualMachineSizesClientImpl.java | 98 +- .../VirtualMachineSizesImpl.java | 8 +- ...nnectionPropertiesV2BasicResourceImpl.java | 122 +- .../WorkspaceConnectionsClientImpl.java | 1391 ++- .../WorkspaceConnectionsImpl.java | 200 +- .../WorkspaceFeaturesClientImpl.java | 208 +- .../implementation/WorkspaceFeaturesImpl.java | 7 +- .../implementation/WorkspaceImpl.java | 504 +- .../WorkspacePropertiesImpl.java | 189 +- ...rkspacePropertiesUpdateParametersImpl.java | 115 + .../WorkspaceUpdateParametersImpl.java | 135 + .../implementation/WorkspacesClientImpl.java | 3085 +++---- .../implementation/WorkspacesImpl.java | 284 +- .../implementation/package-info.java | 4 +- ...AuthTypeWorkspaceConnectionProperties.java | 89 + ...AuthTypeWorkspaceConnectionProperties.java | 119 + .../models/AccountApiKeys.java | 33 + ...AuthTypeWorkspaceConnectionProperties.java | 120 + .../AccountKeyDatastoreCredentials.java | 22 +- .../models/AccountKeyDatastoreSecrets.java | 14 +- .../machinelearning/models/AccountModel.java | 122 + .../machinelearning/models/AcrDetails.java | 86 + .../machinelearning/models/ActionType.java | 48 + .../models/ActualCapacityInfo.java | 110 + .../machinelearning/models/Aks.java | 30 +- .../models/AksComputeSecrets.java | 22 +- .../models/AksComputeSecretsProperties.java | 22 +- .../models/AksNetworkingConfiguration.java | 26 +- .../machinelearning/models/AksSchema.java | 14 +- .../models/AksSchemaProperties.java | 44 +- .../machinelearning/models/AllFeatures.java | 33 + .../machinelearning/models/AllNodes.java | 33 + .../models/AllocationState.java | 24 +- .../machinelearning/models/AmlCompute.java | 30 +- .../models/AmlComputeNodeInformation.java | 56 +- .../models/AmlComputeNodesInformation.java | 14 +- .../models/AmlComputeProperties.java | 124 +- .../models/AmlComputeSchema.java | 14 +- .../machinelearning/models/AmlOperation.java | 38 - .../models/AmlOperationDisplay.java | 128 - .../models/AmlOperationListResult.java | 55 - .../machinelearning/models/AmlToken.java | 10 +- .../models/AmlTokenComputeIdentity.java | 33 + .../models/AmlUserFeature.java | 12 +- .../models/AnonymousAccessCredential.java | 33 + ...iKeyAuthWorkspaceConnectionProperties.java | 138 + .../models/ApplicationSharingPolicy.java | 18 +- .../machinelearning/models/ArmResourceId.java | 63 + .../machinelearning/models/AssetBase.java | 77 +- .../models/AssetContainer.java | 30 +- .../machinelearning/models/AssetJobInput.java | 49 +- .../models/AssetJobOutput.java | 125 +- .../models/AssetProvisioningState.java | 73 + .../models/AssetReferenceBase.java | 15 +- .../machinelearning/models/AssignedUser.java | 28 +- .../machinelearning/models/AuthMode.java | 48 + .../models/AutoDeleteCondition.java | 53 + .../models/AutoDeleteSetting.java | 80 + .../models/AutoForecastHorizon.java | 10 +- .../machinelearning/models/AutoMLJob.java | 148 +- .../models/AutoMLVertical.java | 39 +- .../models/AutoNCrossValidations.java | 10 +- .../models/AutoPauseProperties.java | 18 +- .../models/AutoRebuildSetting.java | 18 +- .../models/AutoScaleProperties.java | 22 +- .../models/AutoSeasonality.java | 10 +- .../models/AutoTargetLags.java | 10 +- .../models/AutoTargetRollingWindowSize.java | 10 +- .../models/AutologgerSettings.java | 61 + .../machinelearning/models/Autosave.java | 22 +- .../models/AzureBlobDatastore.java | 111 +- .../models/AzureDataLakeGen1Datastore.java | 105 +- .../models/AzureDataLakeGen2Datastore.java | 123 +- .../models/AzureDatastore.java | 80 + .../models/AzureDevOpsWebhook.java | 42 + .../models/AzureFileDatastore.java | 122 +- .../models/AzureMLBatchInferencingServer.java | 63 + .../AzureMLOnlineInferencingServer.java | 63 + .../models/AzureOpenAiFineTuning.java | 99 + .../models/AzureOpenAiHyperParameters.java | 113 + .../machinelearning/models/BanditPolicy.java | 26 +- .../models/BaseEnvironmentId.java | 67 + .../models/BaseEnvironmentSource.java | 37 + .../models/BaseEnvironmentSourceType.java | 48 + .../models/BatchDeployment.java | 156 +- .../models/BatchDeploymentConfiguration.java | 38 + .../BatchDeploymentConfigurationType.java | 53 + .../models/BatchDeploymentProperties.java | 141 +- ...mentTrackedResourceArmPaginatedResult.java | 26 +- .../models/BatchDeployments.java | 44 +- .../machinelearning/models/BatchEndpoint.java | 156 +- .../models/BatchEndpointDefaults.java | 22 +- .../models/BatchEndpointProperties.java | 34 +- ...ointTrackedResourceArmPaginatedResult.java | 18 +- .../models/BatchEndpoints.java | 42 +- .../models/BatchLoggingLevel.java | 23 +- .../models/BatchOutputAction.java | 18 +- ...elineComponentDeploymentConfiguration.java | 145 + .../models/BatchRetrySettings.java | 18 +- .../models/BayesianSamplingAlgorithm.java | 10 +- .../models/BillingCurrency.java | 14 +- .../machinelearning/models/BindOptions.java | 106 + .../BlobReferenceForConsumptionDto.java | 112 + .../models/BlockedTransformers.java | 50 +- .../machinelearning/models/BuildContext.java | 39 +- .../machinelearning/models/Caching.java | 22 +- .../machinelearning/models/CallRateLimit.java | 110 + .../models/CapacityConfig.java | 159 + .../models/CapacityReservationGroup.java | 344 + .../CapacityReservationGroupProperties.java | 83 + ...roupTrackedResourceArmPaginatedResult.java | 88 + .../models/CapacityReservationGroups.java | 162 + .../models/CategoricalDataDriftMetric.java | 58 + .../CategoricalDataDriftMetricThreshold.java | 76 + .../models/CategoricalDataQualityMetric.java | 58 + ...CategoricalDataQualityMetricThreshold.java | 76 + .../CategoricalPredictionDriftMetric.java | 60 + ...goricalPredictionDriftMetricThreshold.java | 76 + .../CertificateDatastoreCredentials.java | 60 +- .../models/CertificateDatastoreSecrets.java | 14 +- .../models/Classification.java | 181 +- .../ClassificationModelPerformanceMetric.java | 59 + ...cationModelPerformanceMetricThreshold.java | 76 + .../models/ClassificationModels.java | 62 +- ...lassificationMultilabelPrimaryMetrics.java | 42 +- .../models/ClassificationPrimaryMetrics.java | 34 +- .../ClassificationTrainingSettings.java | 63 +- .../models/ClusterPurpose.java | 22 +- .../models/ClusterUpdateParameters.java | 16 +- .../models/CocoExportSummary.java | 65 + .../models/CodeConfiguration.java | 23 +- .../machinelearning/models/CodeContainer.java | 90 +- .../models/CodeContainerProperties.java | 42 +- ...deContainerResourceArmPaginatedResult.java | 18 +- .../models/CodeContainers.java | 78 +- .../machinelearning/models/CodeVersion.java | 117 +- .../models/CodeVersionProperties.java | 58 +- ...CodeVersionResourceArmPaginatedResult.java | 18 +- .../machinelearning/models/CodeVersions.java | 130 +- ...eEndpointDeploymentResourceProperties.java | 146 + .../models/CognitiveServicesSku.java | 158 + .../machinelearning/models/Collection.java | 140 + .../models/ColumnTransformer.java | 26 +- .../machinelearning/models/CommandJob.java | 208 +- .../models/CommandJobLimits.java | 14 +- .../models/ComponentConfiguration.java | 54 + .../models/ComponentContainer.java | 90 +- .../models/ComponentContainerProperties.java | 42 +- ...ntContainerResourceArmPaginatedResult.java | 18 +- .../models/ComponentContainers.java | 83 +- .../models/ComponentVersion.java | 92 +- .../models/ComponentVersionProperties.java | 92 +- ...nentVersionResourceArmPaginatedResult.java | 18 +- .../models/ComponentVersions.java | 103 +- .../machinelearning/models/Compute.java | 39 +- .../models/ComputeInstance.java | 30 +- .../models/ComputeInstanceApplication.java | 18 +- .../ComputeInstanceAuthorizationType.java | 14 +- .../ComputeInstanceAutologgerSettings.java | 54 + .../ComputeInstanceConnectivityEndpoints.java | 14 +- .../models/ComputeInstanceContainer.java | 32 +- .../models/ComputeInstanceCreatedBy.java | 16 +- .../models/ComputeInstanceDataDisk.java | 36 +- .../models/ComputeInstanceDataMount.java | 82 +- .../ComputeInstanceEnvironmentInfo.java | 18 +- .../models/ComputeInstanceLastOperation.java | 26 +- .../models/ComputeInstanceProperties.java | 361 +- .../models/ComputeInstanceSchema.java | 14 +- .../models/ComputeInstanceSshSettings.java | 32 +- .../models/ComputeInstanceState.java | 75 +- .../models/ComputeInstanceVersion.java | 14 +- .../models/ComputePowerAction.java | 18 +- .../models/ComputeRecurrenceFrequency.java | 68 + .../models/ComputeRecurrenceSchedule.java | 144 + .../models/ComputeResource.java | 263 +- .../models/ComputeResourceSchema.java | 14 +- .../models/ComputeRuntimeDto.java | 54 + .../models/ComputeSchedules.java | 14 +- .../models/ComputeSecrets.java | 6 +- .../models/ComputeStartStopSchedule.java | 56 +- .../models/ComputeTriggerType.java | 53 + .../machinelearning/models/ComputeType.java | 50 +- .../models/ComputeWeekDay.java | 78 + .../machinelearning/models/Computes.java | 231 +- .../models/ConnectionAuthType.java | 65 +- .../models/ConnectionCategory.java | 492 +- .../models/ConnectionGroup.java | 78 + .../models/ContainerResourceRequirements.java | 26 +- .../models/ContainerResourceSettings.java | 22 +- .../machinelearning/models/ContainerType.java | 23 +- ...yEndpointDeploymentResourceProperties.java | 161 + ...ntentSafetyEndpointResourceProperties.java | 69 + .../models/CosmosDbSettings.java | 20 +- .../models/CreateMonitorAction.java | 69 + .../models/CredentialsType.java | 40 +- .../machinelearning/models/Cron.java | 115 + .../machinelearning/models/CronTrigger.java | 39 +- .../models/CsvExportSummary.java | 65 + .../models/CustomForecastHorizon.java | 14 +- .../models/CustomInferencingServer.java | 63 + .../machinelearning/models/CustomKeys.java | 57 + ...stomKeysWorkspaceConnectionProperties.java | 123 + .../models/CustomMetricThreshold.java | 92 + .../models/CustomModelFineTuning.java | 99 + .../models/CustomModelJobInput.java | 53 +- .../models/CustomModelJobOutput.java | 129 +- .../models/CustomMonitoringSignal.java | 224 + .../models/CustomNCrossValidations.java | 14 +- .../models/CustomSeasonality.java | 14 +- .../machinelearning/models/CustomService.java | 275 + .../models/CustomTargetLags.java | 19 +- .../models/CustomTargetRollingWindowSize.java | 14 +- .../models/DataAvailabilityStatus.java | 63 + .../models/DataCollectionMode.java | 53 + .../machinelearning/models/DataCollector.java | 152 + .../machinelearning/models/DataContainer.java | 90 +- .../models/DataContainerProperties.java | 36 +- ...taContainerResourceArmPaginatedResult.java | 18 +- .../models/DataContainers.java | 82 +- .../models/DataDriftMetricThresholdBase.java | 71 + .../models/DataDriftMonitoringSignal.java | 270 + .../machinelearning/models/DataFactory.java | 26 +- .../machinelearning/models/DataImport.java | 171 + .../models/DataImportSource.java | 66 + .../models/DataImportSourceType.java | 53 + .../models/DataLakeAnalytics.java | 30 +- .../models/DataLakeAnalyticsSchema.java | 14 +- .../DataLakeAnalyticsSchemaProperties.java | 14 +- .../models/DataPathAssetReference.java | 18 +- .../DataQualityMetricThresholdBase.java | 71 + .../models/DataQualityMonitoringSignal.java | 243 + .../models/DataReferenceCredential.java | 41 + .../models/DataReferenceCredentialType.java | 63 + .../machinelearning/models/DataType.java | 22 +- .../models/DataVersionBase.java | 115 +- .../models/DataVersionBaseProperties.java | 117 +- ...VersionBaseResourceArmPaginatedResult.java | 26 +- .../machinelearning/models/DataVersions.java | 110 +- .../models/DatabaseSource.java | 149 + .../machinelearning/models/Databricks.java | 30 +- .../models/DatabricksComputeSecrets.java | 14 +- .../DatabricksComputeSecretsProperties.java | 14 +- .../models/DatabricksProperties.java | 18 +- .../models/DatabricksSchema.java | 14 +- .../models/DatasetExportSummary.java | 50 + .../machinelearning/models/Datastore.java | 102 +- .../models/DatastoreCredentials.java | 15 +- .../models/DatastoreProperties.java | 67 +- .../DatastoreResourceArmPaginatedResult.java | 18 +- .../models/DatastoreSecrets.java | 6 +- .../machinelearning/models/DatastoreType.java | 36 +- .../machinelearning/models/Datastores.java | 47 +- .../DefaultResourceProvisioningState.java | 78 + .../models/DefaultScaleSettings.java | 10 +- .../models/DeploymentLogs.java | 8 +- .../models/DeploymentLogsRequest.java | 18 +- .../models/DeploymentModel.java | 156 + .../DeploymentModelVersionUpgradeOption.java | 61 + .../models/DeploymentProvisioningState.java | 38 +- .../DeploymentResourceConfiguration.java | 41 +- .../models/DestinationAsset.java | 106 + .../models/DiagnoseRequestProperties.java | 271 +- .../models/DiagnoseResponseResult.java | 8 +- .../models/DiagnoseResponseResultValue.java | 46 +- .../models/DiagnoseResult.java | 16 +- .../models/DiagnoseResultLevel.java | 22 +- .../models/DiagnoseWorkspaceParameters.java | 20 +- .../models/DistributionConfiguration.java | 14 +- .../models/DistributionType.java | 27 +- .../machinelearning/models/Docker.java | 94 + .../models/DockerCredential.java | 86 + .../models/EarlyTerminationPolicy.java | 21 +- .../models/EarlyTerminationPolicyType.java | 22 +- .../models/EgressPublicNetworkAccessType.java | 18 +- .../models/EmailNotificationEnableType.java | 58 + .../models/EncryptionKeyVaultProperties.java | 119 - .../EncryptionKeyVaultUpdateProperties.java | 61 + .../models/EncryptionProperty.java | 166 +- .../models/EncryptionStatus.java | 18 +- .../models/EncryptionUpdateProperties.java | 63 + .../machinelearning/models/Endpoint.java | 164 + .../models/EndpointAuthKeys.java | 10 +- .../models/EndpointAuthMode.java | 22 +- .../models/EndpointAuthToken.java | 14 +- .../models/EndpointComputeType.java | 22 +- .../models/EndpointDeploymentModel.java | 132 + .../EndpointDeploymentPropertiesBase.java | 38 +- .../EndpointDeploymentResourceProperties.java | 83 + ...oymentResourcePropertiesBasicResource.java | 194 + ...ertiesBasicResourceArmPaginatedResult.java | 86 + .../models/EndpointDeployments.java | 183 + .../machinelearning/models/EndpointKeys.java | 26 + .../models/EndpointModels.java | 87 + .../models/EndpointPropertiesBase.java | 22 +- .../models/EndpointProvisioningState.java | 34 +- .../models/EndpointResourceProperties.java | 161 + ...dpointResourcePropertiesBasicResource.java | 234 + ...ertiesBasicResourceArmPaginatedResult.java | 86 + .../models/EndpointScheduleAction.java | 28 +- .../EndpointServiceConnectionStatus.java | 68 + .../machinelearning/models/EndpointType.java | 68 + .../machinelearning/models/Endpoints.java | 188 + .../models/EnvironmentContainer.java | 90 +- .../EnvironmentContainerProperties.java | 42 +- ...ntContainerResourceArmPaginatedResult.java | 18 +- .../models/EnvironmentContainers.java | 83 +- .../models/EnvironmentType.java | 18 +- .../models/EnvironmentVariable.java | 126 + .../models/EnvironmentVariableType.java | 50 + .../models/EnvironmentVersion.java | 93 +- .../models/EnvironmentVersionProperties.java | 159 +- ...mentVersionResourceArmPaginatedResult.java | 18 +- .../models/EnvironmentVersions.java | 103 +- .../models/EstimatedVMPrice.java | 62 +- .../models/EstimatedVMPrices.java | 68 +- .../models/ExportFormatType.java | 58 + .../machinelearning/models/ExportSummary.java | 48 + .../models/ExternalFqdnResponse.java | 10 +- .../machinelearning/models/Feature.java | 55 + ...atureAttributionDriftMonitoringSignal.java | 217 + .../models/FeatureAttributionMetric.java | 49 + .../FeatureAttributionMetricThreshold.java | 92 + .../models/FeatureDataType.java | 83 + .../models/FeatureImportanceMode.java | 53 + .../models/FeatureImportanceSettings.java | 80 + .../machinelearning/models/FeatureLags.java | 18 +- .../models/FeatureProperties.java | 110 + .../FeatureResourceArmPaginatedResult.java | 85 + .../models/FeatureStoreSettings.java | 109 + .../machinelearning/models/FeatureSubset.java | 68 + .../machinelearning/models/FeatureWindow.java | 81 + .../machinelearning/models/Features.java | 86 + .../models/FeaturesetContainer.java | 189 + .../models/FeaturesetContainerProperties.java | 82 + ...etContainerResourceArmPaginatedResult.java | 87 + .../models/FeaturesetContainers.java | 154 + .../models/FeaturesetSpecification.java | 54 + .../models/FeaturesetVersion.java | 213 + .../FeaturesetVersionBackfillRequest.java | 275 + .../FeaturesetVersionBackfillResponse.java | 28 + .../models/FeaturesetVersionProperties.java | 211 + ...esetVersionResourceArmPaginatedResult.java | 87 + .../models/FeaturesetVersions.java | 195 + .../models/FeaturestoreEntityContainer.java | 189 + ...FeaturestoreEntityContainerProperties.java | 82 + ...tyContainerResourceArmPaginatedResult.java | 88 + .../models/FeaturestoreEntityContainers.java | 156 + .../models/FeaturestoreEntityVersion.java | 190 + .../FeaturestoreEntityVersionProperties.java | 156 + ...tityVersionResourceArmPaginatedResult.java | 87 + .../models/FeaturestoreEntityVersions.java | 162 + .../models/FeaturizationMode.java | 22 +- .../models/FeaturizationSettings.java | 14 +- .../models/FileSystemSource.java | 69 + .../machinelearning/models/FineTuningJob.java | 216 + .../models/FineTuningTaskType.java | 98 + .../models/FineTuningVertical.java | 166 + .../models/FixedInputData.java | 70 + .../machinelearning/models/FlavorData.java | 14 +- .../models/ForecastHorizon.java | 13 +- .../models/ForecastHorizonMode.java | 18 +- .../machinelearning/models/Forecasting.java | 181 +- .../models/ForecastingModels.java | 86 +- .../models/ForecastingPrimaryMetrics.java | 34 +- .../models/ForecastingSettings.java | 150 +- .../models/ForecastingTrainingSettings.java | 63 +- .../machinelearning/models/FqdnEndpoint.java | 18 +- .../models/FqdnEndpointDetail.java | 14 +- .../machinelearning/models/FqdnEndpoints.java | 67 +- .../models/FqdnEndpointsProperties.java | 80 - .../models/FqdnEndpointsPropertyBag.java | 57 + .../models/FqdnOutboundRule.java | 78 + .../models/GenerationSafetyQualityMetric.java | 103 + ...enerationSafetyQualityMetricThreshold.java | 93 + ...nerationSafetyQualityMonitoringSignal.java | 178 + .../models/GenerationTokenUsageMetric.java | 53 + .../GenerationTokenUsageMetricThreshold.java | 93 + .../models/GenerationTokenUsageSignal.java | 148 + .../GetBlobReferenceForConsumptionDto.java | 109 + .../models/GetBlobReferenceSasRequestDto.java | 80 + .../GetBlobReferenceSasResponseDto.java | 27 + .../machinelearning/models/Goal.java | 18 +- .../models/GridSamplingAlgorithm.java | 10 +- .../machinelearning/models/GroupStatus.java | 47 + .../machinelearning/models/HDInsight.java | 30 +- .../models/HDInsightProperties.java | 22 +- .../models/HDInsightSchema.java | 14 +- .../machinelearning/models/HdfsDatastore.java | 167 + .../models/IdAssetReference.java | 19 +- .../models/IdentityConfiguration.java | 13 +- .../models/IdentityConfigurationType.java | 22 +- .../models/IdentityForCmk.java | 24 +- .../models/IdleShutdownSetting.java | 56 + .../machinelearning/models/Image.java | 155 + .../models/ImageAnnotationType.java | 58 + .../models/ImageClassification.java | 60 +- .../models/ImageClassificationBase.java | 34 +- .../models/ImageClassificationMultilabel.java | 67 +- .../models/ImageInstanceSegmentation.java | 60 +- .../models/ImageLimitSettings.java | 22 +- .../machinelearning/models/ImageMetadata.java | 128 + .../ImageModelDistributionSettings.java | 198 +- ...delDistributionSettingsClassification.java | 170 +- ...elDistributionSettingsObjectDetection.java | 292 +- .../models/ImageModelSettings.java | 199 +- .../ImageModelSettingsClassification.java | 171 +- .../ImageModelSettingsObjectDetection.java | 339 +- .../models/ImageObjectDetection.java | 60 +- .../models/ImageObjectDetectionBase.java | 34 +- .../models/ImageSweepSettings.java | 24 +- .../machinelearning/models/ImageType.java | 56 + .../machinelearning/models/ImageVertical.java | 40 +- .../models/ImportDataAction.java | 69 + .../models/IncrementalDataRefresh.java | 53 + .../machinelearning/models/IndexColumn.java | 80 + .../models/InferenceContainerProperties.java | 22 +- .../models/InferenceEndpoint.java | 375 + .../models/InferenceEndpointProperties.java | 144 + ...ointTrackedResourceArmPaginatedResult.java | 87 + .../models/InferenceEndpoints.java | 191 + .../models/InferenceGroup.java | 353 + .../models/InferenceGroupProperties.java | 148 + ...roupTrackedResourceArmPaginatedResult.java | 87 + .../models/InferenceGroups.java | 221 + .../machinelearning/models/InferencePool.java | 366 + .../models/InferencePoolProperties.java | 213 + ...PoolTrackedResourceArmPaginatedResult.java | 87 + .../models/InferencePools.java | 210 + .../models/InferencingServer.java | 41 + .../models/InferencingServerType.java | 63 + .../models/InputDeliveryMode.java | 34 +- .../machinelearning/models/InputPathType.java | 58 + .../InstanceSegmentationPrimaryMetrics.java | 14 +- .../models/InstanceTypeSchema.java | 18 +- .../models/InstanceTypeSchemaResources.java | 18 +- .../models/IntellectualProperty.java | 89 + .../machinelearning/models/IsolationMode.java | 58 + .../machinelearning/models/JobBase.java | 94 +- .../models/JobBaseProperties.java | 149 +- .../JobBaseResourceArmPaginatedResult.java | 18 +- .../machinelearning/models/JobInput.java | 19 +- .../machinelearning/models/JobInputType.java | 38 +- .../machinelearning/models/JobLimits.java | 17 +- .../machinelearning/models/JobLimitsType.java | 18 +- .../machinelearning/models/JobOutput.java | 17 +- .../machinelearning/models/JobOutputType.java | 34 +- .../models/JobProvisioningState.java | 63 + .../models/JobResourceConfiguration.java | 49 +- .../models/JobScheduleAction.java | 19 +- .../machinelearning/models/JobService.java | 68 +- .../machinelearning/models/JobStatus.java | 71 +- .../machinelearning/models/JobTier.java | 68 + .../machinelearning/models/JobType.java | 41 +- .../machinelearning/models/Jobs.java | 43 +- .../models/JupyterKernelConfig.java | 107 + .../models/KerberosCredentials.java | 124 + .../models/KerberosKeytabCredentials.java | 162 + .../models/KerberosKeytabSecrets.java | 61 + .../models/KerberosPasswordCredentials.java | 162 + .../models/KerberosPasswordSecrets.java | 61 + .../machinelearning/models/KeyType.java | 18 +- .../models/KeyVaultProperties.java | 120 + .../machinelearning/models/Kubernetes.java | 30 +- .../models/KubernetesOnlineDeployment.java | 87 +- .../models/KubernetesProperties.java | 55 +- .../models/KubernetesSchema.java | 14 +- .../machinelearning/models/LabelCategory.java | 116 + .../machinelearning/models/LabelClass.java | 90 + .../models/LabelingDataConfiguration.java | 80 + .../machinelearning/models/LabelingJob.java | 257 + .../models/LabelingJobImageProperties.java | 60 + .../models/LabelingJobInstructions.java | 54 + .../models/LabelingJobMediaProperties.java | 39 + .../models/LabelingJobProperties.java | 188 + ...LabelingJobResourceArmPaginatedResult.java | 87 + .../models/LabelingJobTextProperties.java | 60 + .../machinelearning/models/LabelingJobs.java | 236 + .../models/LakeHouseArtifact.java | 42 + .../models/LearningRateScheduler.java | 22 +- .../models/ListAmlUserFeatureResult.java | 14 +- .../models/ListNotebookKeysResult.java | 14 +- .../models/ListStorageAccountKeysResult.java | 10 +- .../models/ListUsagesResult.java | 18 +- .../machinelearning/models/ListViewType.java | 22 +- .../models/ListWorkspaceKeysResult.java | 42 +- .../models/ListWorkspaceQuotas.java | 14 +- .../models/LiteralJobInput.java | 23 +- .../models/LoadBalancerType.java | 18 +- .../models/LogTrainingMetrics.java | 53 + .../models/LogValidationLoss.java | 53 + .../machinelearning/models/LogVerbosity.java | 34 +- .../models/MLAssistConfiguration.java | 39 + .../models/MLAssistConfigurationDisabled.java | 33 + .../models/MLAssistConfigurationEnabled.java | 97 + .../models/MLAssistConfigurationType.java | 53 + .../models/MLFlowAutologgerState.java | 53 + .../models/MLFlowModelJobInput.java | 53 +- .../models/MLFlowModelJobOutput.java | 129 +- .../machinelearning/models/MLTableData.java | 65 +- .../models/MLTableJobInput.java | 53 +- .../models/MLTableJobOutput.java | 129 +- .../models/ManagedComputeIdentity.java | 63 + .../models/ManagedIdentity.java | 24 +- ...AuthTypeWorkspaceConnectionProperties.java | 66 +- .../models/ManagedIdentityCredential.java | 172 + .../ManagedNetworkProvisionOptions.java | 54 + .../models/ManagedNetworkProvisionStatus.java | 33 + .../models/ManagedNetworkProvisions.java | 39 + .../models/ManagedNetworkSettings.java | 56 + .../models/ManagedNetworkSettingsRules.java | 146 + .../models/ManagedNetworkStatus.java | 53 + .../models/ManagedOnlineDeployment.java | 79 +- ...eEndpointDeploymentResourceProperties.java | 42 + ...nagedOnlineEndpointResourceProperties.java | 69 + ...anagedResourceGroupAssignedIdentities.java | 54 + .../models/ManagedResourceGroupSettings.java | 59 + .../models/ManagedServiceIdentity.java | 47 +- .../models/ManagedServiceIdentityType.java | 30 +- .../models/MarketplacePlan.java | 73 + .../models/MarketplaceSubscription.java | 189 + .../MarketplaceSubscriptionProperties.java | 109 + ...ketplaceSubscriptionProvisioningState.java | 74 + ...ubscriptionResourceArmPaginatedResult.java | 87 + .../models/MarketplaceSubscriptionStatus.java | 63 + .../models/MarketplaceSubscriptions.java | 146 + .../MaterializationComputeResource.java | 54 + .../models/MaterializationSettings.java | 170 + .../models/MaterializationStoreType.java | 63 + .../machinelearning/models/MediaType.java | 53 + .../models/MedianStoppingPolicy.java | 18 +- .../models/MlflowAutologger.java | 53 + .../models/ModelConfiguration.java | 80 + .../models/ModelContainer.java | 90 +- .../models/ModelContainerProperties.java | 42 +- ...elContainerResourceArmPaginatedResult.java | 18 +- .../models/ModelContainers.java | 88 +- .../models/ModelDeprecationInfo.java | 80 + .../models/ModelLifecycleStatus.java | 53 + .../models/ModelPackageInput.java | 145 + .../ModelPerformanceMetricThresholdBase.java | 71 + .../models/ModelPerformanceSignal.java | 184 + .../machinelearning/models/ModelProvider.java | 53 + .../machinelearning/models/ModelSettings.java | 61 + .../machinelearning/models/ModelSize.java | 30 +- .../machinelearning/models/ModelSku.java | 166 + .../machinelearning/models/ModelTaskType.java | 58 + .../machinelearning/models/ModelVersion.java | 140 +- .../models/ModelVersionProperties.java | 138 +- ...odelVersionResourceArmPaginatedResult.java | 18 +- .../machinelearning/models/ModelVersions.java | 137 +- .../MonitorComputeConfigurationBase.java | 37 + .../models/MonitorComputeIdentityBase.java | 39 + .../models/MonitorComputeIdentityType.java | 53 + .../models/MonitorComputeType.java | 48 + .../models/MonitorDefinition.java | 164 + .../MonitorEmailNotificationSettings.java | 55 + .../models/MonitorNotificationSettings.java | 58 + .../models/MonitorServerlessSparkCompute.java | 131 + .../models/MonitoringDataSegment.java | 81 + .../models/MonitoringFeatureDataType.java | 53 + .../models/MonitoringFeatureFilterBase.java | 40 + .../models/MonitoringFeatureFilterType.java | 58 + .../models/MonitoringInputDataBase.java | 159 + .../models/MonitoringInputDataType.java | 58 + .../models/MonitoringModelType.java | 53 + .../models/MonitoringNotificationType.java | 53 + .../models/MonitoringSignalBase.java | 102 + .../models/MonitoringSignalType.java | 83 + .../models/MonitoringTarget.java | 113 + .../models/MonitoringThreshold.java | 54 + .../models/MonitoringWorkspaceConnection.java | 94 + .../machinelearning/models/MountAction.java | 18 +- .../machinelearning/models/MountMode.java | 53 + .../machinelearning/models/MountState.java | 34 +- .../machinelearning/models/Mpi.java | 14 +- .../machinelearning/models/MultiSelect.java | 53 + .../models/NCrossValidations.java | 13 +- .../models/NCrossValidationsMode.java | 18 +- .../machinelearning/models/Network.java | 18 +- .../models/NlpFixedParameters.java | 264 + .../models/NlpLearningRateScheduler.java | 78 + .../models/NlpParameterSubspace.java | 264 + .../models/NlpSweepSettings.java | 90 + .../machinelearning/models/NlpVertical.java | 113 +- .../NlpVerticalFeaturizationSettings.java | 14 +- .../models/NlpVerticalLimitSettings.java | 74 +- .../machinelearning/models/NodeState.java | 34 +- .../models/NodeStateCounts.java | 58 +- .../machinelearning/models/Nodes.java | 37 + .../models/NodesValueType.java | 53 + ...AuthTypeWorkspaceConnectionProperties.java | 58 +- .../models/NoneDatastoreCredentials.java | 10 +- .../models/NotebookAccessTokenResult.java | 64 +- .../models/NotebookPreparationError.java | 18 +- .../models/NotebookResourceInfo.java | 25 +- .../models/NotificationSetting.java | 119 + .../models/NumericalDataDriftMetric.java | 65 + .../NumericalDataDriftMetricThreshold.java | 76 + .../models/NumericalDataQualityMetric.java | 58 + .../NumericalDataQualityMetricThreshold.java | 76 + .../NumericalPredictionDriftMetric.java | 66 + ...mericalPredictionDriftMetricThreshold.java | 76 + ...AuthTypeWorkspaceConnectionProperties.java | 122 + .../models/ObjectDetectionPrimaryMetrics.java | 14 +- .../machinelearning/models/Objective.java | 23 +- .../models/OneLakeArtifact.java | 71 + .../models/OneLakeArtifactType.java | 48 + .../models/OneLakeDatastore.java | 200 + .../models/OnlineDeployment.java | 160 +- .../models/OnlineDeploymentProperties.java | 118 +- ...mentTrackedResourceArmPaginatedResult.java | 18 +- .../models/OnlineDeployments.java | 81 +- .../models/OnlineEndpoint.java | 168 +- .../models/OnlineEndpointProperties.java | 84 +- ...ointTrackedResourceArmPaginatedResult.java | 18 +- .../models/OnlineEndpoints.java | 82 +- .../models/OnlineInferenceConfiguration.java | 170 + .../models/OnlineRequestSettings.java | 36 +- .../models/OnlineScaleSettings.java | 13 +- ...IEndpointDeploymentResourceProperties.java | 160 + .../OpenAIEndpointResourceProperties.java | 69 + .../models/OperatingSystemType.java | 18 +- .../machinelearning/models/Operation.java | 58 + .../models/OperationDisplay.java | 95 + .../models/OperationListResult.java | 64 + .../machinelearning/models/OperationName.java | 39 +- .../models/OperationStatus.java | 47 +- .../models/OperationTrigger.java | 22 +- .../machinelearning/models/Operations.java | 20 +- .../machinelearning/models/OrderString.java | 26 +- .../machinelearning/models/Origin.java | 59 + .../models/OsPatchingStatus.java | 134 + .../machinelearning/models/OsType.java | 18 +- .../machinelearning/models/OutboundRule.java | 93 + .../models/OutboundRuleBasicResource.java | 191 + .../models/OutboundRuleListResult.java | 90 + .../models/OutputDeliveryMode.java | 23 +- .../models/OutputPathAssetReference.java | 18 +- .../models/PackageBuildState.java | 63 + .../models/PackageInputDeliveryMode.java | 53 + .../models/PackageInputPathBase.java | 40 + .../models/PackageInputPathId.java | 60 + .../models/PackageInputPathUrl.java | 60 + .../models/PackageInputPathVersion.java | 86 + .../models/PackageInputType.java | 53 + .../models/PackageRequest.java | 266 + .../models/PackageResponse.java | 98 + .../models/PaginatedComputeResourcesList.java | 18 +- .../models/PartialBatchDeployment.java | 14 +- ...lMinimalTrackedResourceWithProperties.java | 22 +- .../models/PartialJobBase.java | 57 + .../models/PartialJobBasePartialResource.java | 57 + .../models/PartialManagedServiceIdentity.java | 23 +- .../models/PartialMinimalTrackedResource.java | 14 +- ...ialMinimalTrackedResourceWithIdentity.java | 20 +- .../PartialMinimalTrackedResourceWithSku.java | 18 +- ...imalTrackedResourceWithSkuAndIdentity.java | 98 + .../models/PartialNotificationSetting.java | 64 + ...PartialRegistryPartialTrackedResource.java | 115 + .../machinelearning/models/PartialSku.java | 38 +- .../machinelearning/models/Password.java | 14 +- ...AuthTypeWorkspaceConnectionProperties.java | 66 +- .../machinelearning/models/PatchStatus.java | 68 + .../models/PendingUploadCredentialDto.java | 37 + .../models/PendingUploadCredentialType.java | 48 + .../models/PendingUploadRequestDto.java | 80 + .../models/PendingUploadResponseDto.java | 40 + .../models/PendingUploadType.java | 53 + .../PersonalComputeInstanceSettings.java | 14 +- .../machinelearning/models/PipelineJob.java | 114 +- .../models/PoolEnvironmentConfiguration.java | 176 + .../models/PoolModelConfiguration.java | 54 + .../models/PoolProvisioningState.java | 73 + .../machinelearning/models/PoolStatus.java | 47 + .../PredictionDriftMetricThresholdBase.java | 71 + .../PredictionDriftMonitoringSignal.java | 183 + .../models/PrivateEndpoint.java | 27 +- .../models/PrivateEndpointConnection.java | 285 +- .../PrivateEndpointConnectionListResult.java | 14 +- ...teEndpointConnectionProvisioningState.java | 26 +- .../models/PrivateEndpointConnections.java | 92 +- .../models/PrivateEndpointDestination.java | 133 + .../models/PrivateEndpointOutboundRule.java | 84 + .../models/PrivateEndpointResource.java | 56 + ...rivateEndpointServiceConnectionStatus.java | 57 - .../models/PrivateLinkResource.java | 213 +- .../models/PrivateLinkResourceListResult.java | 54 +- .../models/PrivateLinkResources.java | 37 +- .../PrivateLinkServiceConnectionState.java | 76 +- .../machinelearning/models/ProbeSettings.java | 30 +- .../models/ProgressMetrics.java | 90 + .../models/PropertiesBase.java | 83 + .../models/ProtectionLevel.java | 53 + .../machinelearning/models/Protocol.java | 60 + .../models/ProvisioningState.java | 37 +- .../models/ProvisioningStatus.java | 22 +- .../models/PublicNetworkAccess.java | 47 - .../models/PublicNetworkAccessType.java | 18 +- .../machinelearning/models/PyTorch.java | 14 +- .../machinelearning/models/QueueSettings.java | 80 + .../models/QuotaBaseProperties.java | 36 +- .../machinelearning/models/QuotaUnit.java | 14 +- .../models/QuotaUpdateParameters.java | 18 +- .../machinelearning/models/Quotas.java | 24 +- .../models/RandomSamplingAlgorithm.java | 46 +- .../models/RandomSamplingAlgorithmRule.java | 18 +- .../machinelearning/models/Ray.java | 190 + .../machinelearning/models/Recurrence.java | 167 + .../models/RecurrenceFrequency.java | 30 +- .../models/RecurrenceSchedule.java | 36 +- .../models/RecurrenceTrigger.java | 39 +- .../machinelearning/models/ReferenceType.java | 22 +- .../models/RegenerateEndpointKeysRequest.java | 24 +- .../RegenerateServiceAccountKeyContent.java | 54 + .../machinelearning/models/Registries.java | 185 + .../machinelearning/models/Registry.java | 521 ++ .../models/RegistryCodeContainers.java | 145 + .../models/RegistryCodeVersions.java | 187 + .../models/RegistryComponentContainers.java | 145 + .../models/RegistryComponentVersions.java | 155 + .../models/RegistryDataContainers.java | 147 + .../models/RegistryDataReferences.java | 46 + .../models/RegistryDataVersions.java | 191 + .../models/RegistryEnvironmentContainers.java | 147 + .../models/RegistryEnvironmentVersions.java | 156 + .../models/RegistryListCredentialsResult.java | 50 +- .../models/RegistryModelContainers.java | 147 + .../models/RegistryModelVersions.java | 226 + ...RegistryPartialManagedServiceIdentity.java | 49 + .../RegistryPrivateEndpointConnection.java | 203 + ...stryPrivateLinkServiceConnectionState.java | 106 + .../models/RegistryRegionArmDetails.java | 113 + ...stryTrackedResourceArmPaginatedResult.java | 87 + .../machinelearning/models/Regression.java | 177 +- .../RegressionModelPerformanceMetric.java | 58 + ...essionModelPerformanceMetricThreshold.java | 76 + .../models/RegressionModels.java | 50 +- .../models/RegressionPrimaryMetrics.java | 34 +- .../models/RegressionTrainingSettings.java | 55 +- .../models/RemoteLoginPortPublicAccess.java | 22 +- .../models/RequestConfiguration.java | 86 + .../models/RequestLogging.java | 60 + .../models/RequestMatchPattern.java | 80 + .../machinelearning/models/ResizeSchema.java | 54 + .../machinelearning/models/ResourceBase.java | 22 +- .../models/ResourceConfiguration.java | 80 +- .../machinelearning/models/ResourceId.java | 14 +- .../machinelearning/models/ResourceName.java | 14 +- .../machinelearning/models/ResourceQuota.java | 22 +- .../models/RollingInputData.java | 165 + .../models/RollingRateType.java | 68 + .../machinelearning/models/Route.java | 18 +- .../machinelearning/models/RuleAction.java | 53 + .../machinelearning/models/RuleCategory.java | 58 + .../machinelearning/models/RuleStatus.java | 53 + .../machinelearning/models/RuleType.java | 58 + .../models/SamplingAlgorithm.java | 14 +- .../models/SamplingAlgorithmType.java | 22 +- ...AuthTypeWorkspaceConnectionProperties.java | 66 +- .../machinelearning/models/SasCredential.java | 60 + .../models/SasCredentialDto.java | 60 + .../models/SasDatastoreCredentials.java | 21 +- .../models/SasDatastoreSecrets.java | 14 +- .../machinelearning/models/ScaleSettings.java | 30 +- .../models/ScaleSettingsInformation.java | 14 +- .../machinelearning/models/ScaleType.java | 18 +- .../machinelearning/models/Schedule.java | 108 +- .../models/ScheduleActionBase.java | 15 +- .../models/ScheduleActionType.java | 28 +- .../machinelearning/models/ScheduleBase.java | 22 +- .../models/ScheduleListViewType.java | 22 +- .../models/ScheduleProperties.java | 50 +- .../models/ScheduleProvisioningState.java | 22 +- .../models/ScheduleProvisioningStatus.java | 34 +- .../ScheduleResourceArmPaginatedResult.java | 24 +- .../models/ScheduleStatus.java | 18 +- .../machinelearning/models/ScheduleType.java | 73 + .../machinelearning/models/Schedules.java | 65 +- .../models/ScriptReference.java | 32 +- .../models/ScriptsToExecute.java | 18 +- .../machinelearning/models/Seasonality.java | 13 +- .../models/SeasonalityMode.java | 18 +- .../models/SecretConfiguration.java | 83 + .../machinelearning/models/SecretsType.java | 36 +- .../models/ServerlessComputeSettings.java | 85 + .../models/ServerlessEndpoint.java | 409 + ...ServerlessEndpointCapacityReservation.java | 91 + .../models/ServerlessEndpointProperties.java | 214 + .../models/ServerlessEndpointState.java | 88 + .../models/ServerlessEndpointStatus.java | 27 + ...ointTrackedResourceArmPaginatedResult.java | 87 + .../models/ServerlessEndpoints.java | 233 + .../models/ServerlessInferenceEndpoint.java | 81 + .../ServerlessInferenceEndpointAuthMode.java | 54 + .../models/ServerlessOffer.java | 91 + .../models/ServiceAccountKeyName.java | 53 + .../models/ServiceDataAccessAuthIdentity.java | 30 +- .../ServiceManagedResourcesSettings.java | 20 +- ...AuthTypeWorkspaceConnectionProperties.java | 120 + .../ServicePrincipalDatastoreCredentials.java | 50 +- .../ServicePrincipalDatastoreSecrets.java | 14 +- .../models/ServiceTagDestination.java | 148 + .../models/ServiceTagOutboundRule.java | 83 + .../machinelearning/models/SetupScripts.java | 14 +- .../models/SharedPrivateLinkResource.java | 80 +- .../ShortSeriesHandlingConfiguration.java | 26 +- .../machinelearning/models/Sku.java | 38 +- .../machinelearning/models/SkuCapacity.java | 26 +- .../machinelearning/models/SkuResource.java | 12 +- .../models/SkuResourceArmPaginatedResult.java | 18 +- .../machinelearning/models/SkuScaleType.java | 22 +- .../machinelearning/models/SkuSetting.java | 23 +- .../machinelearning/models/SkuTier.java | 26 +- .../machinelearning/models/SourceType.java | 22 +- .../machinelearning/models/SparkJob.java | 546 ++ .../machinelearning/models/SparkJobEntry.java | 39 + .../models/SparkJobEntryType.java | 53 + .../models/SparkJobPythonEntry.java | 67 + .../models/SparkJobScalaEntry.java | 67 + .../models/SparkResourceConfiguration.java | 80 + ...hEndpointDeploymentResourceProperties.java | 160 + .../SpeechEndpointResourceProperties.java | 69 + .../models/SshPublicAccess.java | 18 +- .../models/SslConfigStatus.java | 22 +- .../models/SslConfiguration.java | 34 +- .../models/StackEnsembleSettings.java | 22 +- .../models/StackMetaLearnerType.java | 48 +- .../models/StaticInputData.java | 163 + .../machinelearning/models/Status.java | 46 +- .../machinelearning/models/StatusMessage.java | 89 + .../models/StatusMessageLevel.java | 58 + .../models/StochasticOptimizer.java | 26 +- .../models/StorageAccountDetails.java | 89 + .../models/StorageAccountType.java | 18 +- .../machinelearning/models/SweepJob.java | 228 +- .../models/SweepJobLimits.java | 26 +- .../machinelearning/models/SynapseSpark.java | 30 +- .../models/SynapseSparkProperties.java | 50 +- .../models/SystemCreatedAcrAccount.java | 109 + .../models/SystemCreatedStorageAccount.java | 185 + .../machinelearning/models/SystemService.java | 16 +- .../models/TableFixedParameters.java | 550 ++ .../models/TableParameterSubspace.java | 550 ++ .../models/TableSweepSettings.java | 90 + .../machinelearning/models/TableVertical.java | 157 +- .../TableVerticalFeaturizationSettings.java | 65 +- .../models/TableVerticalLimitSettings.java | 116 +- .../models/TargetAggregationFunction.java | 30 +- .../machinelearning/models/TargetLags.java | 13 +- .../models/TargetLagsMode.java | 18 +- .../models/TargetRollingWindowSize.java | 13 +- .../models/TargetRollingWindowSizeMode.java | 18 +- .../TargetUtilizationScaleSettings.java | 26 +- .../machinelearning/models/TaskType.java | 50 +- .../machinelearning/models/TensorFlow.java | 18 +- .../models/TextAnnotationType.java | 53 + .../models/TextClassification.java | 129 +- .../models/TextClassificationMultilabel.java | 135 +- .../machinelearning/models/TextNer.java | 132 +- .../models/ThrottlingRule.java | 188 + .../machinelearning/models/TmpfsOptions.java | 54 + .../models/TopNFeaturesByAttribution.java | 60 + .../machinelearning/models/TrainingMode.java | 58 + .../models/TrainingSettings.java | 85 +- .../models/TrialComponent.java | 44 +- .../machinelearning/models/TriggerBase.java | 43 +- .../models/TriggerOnceRequest.java | 61 + .../models/TriggerRunSubmissionDto.java | 33 + .../machinelearning/models/TriggerType.java | 18 +- .../models/TritonInferencingServer.java | 63 + .../models/TritonModelJobInput.java | 53 +- .../models/TritonModelJobOutput.java | 129 +- .../models/TruncationSelectionPolicy.java | 22 +- .../models/UnderlyingResourceAction.java | 18 +- .../machinelearning/models/UnitOfMeasure.java | 14 +- .../models/UpdateWorkspaceQuotas.java | 44 +- .../models/UpdateWorkspaceQuotasResult.java | 10 +- .../models/UriFileDataVersion.java | 61 +- .../models/UriFileJobInput.java | 53 +- .../models/UriFileJobOutput.java | 129 +- .../models/UriFolderDataVersion.java | 61 +- .../models/UriFolderJobInput.java | 53 +- .../models/UriFolderJobOutput.java | 129 +- .../machinelearning/models/Usage.java | 20 +- .../machinelearning/models/UsageName.java | 14 +- .../machinelearning/models/UsageUnit.java | 14 +- .../machinelearning/models/Usages.java | 12 +- .../machinelearning/models/UseStl.java | 22 +- .../models/UserAccountCredentials.java | 58 +- .../models/UserAssignedIdentity.java | 16 +- .../models/UserCreatedAcrAccount.java | 57 + .../models/UserCreatedStorageAccount.java | 57 + .../machinelearning/models/UserIdentity.java | 12 +- ...AuthTypeWorkspaceConnectionProperties.java | 66 +- .../machinelearning/models/VMPriceOSType.java | 18 +- .../machinelearning/models/VMTier.java | 22 +- .../models/ValidationMetricType.java | 26 +- .../machinelearning/models/ValueFormat.java | 44 - .../models/VirtualMachine.java | 30 +- .../models/VirtualMachineImage.java | 19 +- .../models/VirtualMachineSchema.java | 14 +- .../VirtualMachineSchemaProperties.java | 34 +- .../models/VirtualMachineSecrets.java | 14 +- .../models/VirtualMachineSecretsSchema.java | 14 +- .../models/VirtualMachineSize.java | 100 +- .../models/VirtualMachineSizeListResult.java | 8 +- .../models/VirtualMachineSizes.java | 8 +- .../models/VirtualMachineSshCredentials.java | 26 +- .../machinelearning/models/VmPriority.java | 18 +- .../models/VolumeDefinition.java | 251 + .../models/VolumeDefinitionType.java | 65 + .../machinelearning/models/VolumeOptions.java | 54 + .../machinelearning/models/Webhook.java | 64 + .../machinelearning/models/WebhookType.java | 48 + .../machinelearning/models/WeekDay.java | 38 +- .../machinelearning/models/Workspace.java | 1265 ++- .../models/WorkspaceConnectionAccessKey.java | 80 + .../models/WorkspaceConnectionApiKey.java | 54 + .../WorkspaceConnectionManagedIdentity.java | 62 +- .../models/WorkspaceConnectionOAuth2.java | 246 + ...orkspaceConnectionPersonalAccessToken.java | 14 +- .../WorkspaceConnectionPropertiesV2.java | 192 +- ...ceConnectionPropertiesV2BasicResource.java | 153 +- ...tiesV2BasicResourceArmPaginatedResult.java | 57 +- .../WorkspaceConnectionServicePrincipal.java | 106 + ...kspaceConnectionSharedAccessSignature.java | 14 +- .../WorkspaceConnectionUpdateParameter.java | 57 + .../WorkspaceConnectionUsernamePassword.java | 86 +- .../models/WorkspaceConnections.java | 153 +- .../models/WorkspaceFeatures.java | 8 +- .../models/WorkspaceHubConfig.java | 81 + .../models/WorkspaceListResult.java | 66 +- .../WorkspacePrivateEndpointResource.java | 61 + .../models/WorkspaceProperties.java | 287 +- .../WorkspacePropertiesUpdateParameters.java | 143 + .../models/WorkspaceUpdateParameters.java | 332 +- .../machinelearning/models/Workspaces.java | 277 +- .../machinelearning/models/package-info.java | 4 +- .../machinelearning/package-info.java | 4 +- .../src/main/java/module-info.java | 8 +- .../proxy-config.json | 1 + .../reflect-config.json | 4331 +++++++++ ...BatchDeploymentsCreateOrUpdateSamples.java | 80 +- .../BatchDeploymentsDeleteSamples.java | 25 +- .../generated/BatchDeploymentsGetSamples.java | 25 +- .../BatchDeploymentsListSamples.java | 21 +- .../BatchDeploymentsUpdateSamples.java | 33 +- .../BatchEndpointsCreateOrUpdateSamples.java | 47 +- .../BatchEndpointsDeleteSamples.java | 20 +- .../generated/BatchEndpointsGetSamples.java | 20 +- .../BatchEndpointsListKeysSamples.java | 20 +- .../generated/BatchEndpointsListSamples.java | 15 +- .../BatchEndpointsUpdateSamples.java | 41 +- ...eservationGroupsCreateOrUpdateSamples.java | 56 + ...apacityReservationGroupsDeleteSamples.java | 26 + ...vationGroupsGetByResourceGroupSamples.java | 26 + ...ationGroupsListByResourceGroupSamples.java | 25 + .../CapacityReservationGroupsListSamples.java | 25 + ...apacityReservationGroupsUpdateSamples.java | 57 + .../CodeContainersCreateOrUpdateSamples.java | 31 +- .../CodeContainersDeleteSamples.java | 20 +- .../generated/CodeContainersGetSamples.java | 20 +- .../generated/CodeContainersListSamples.java | 15 +- ...sCreateOrGetStartPendingUploadSamples.java | 31 + .../CodeVersionsCreateOrUpdateSamples.java | 36 +- .../generated/CodeVersionsDeleteSamples.java | 20 +- .../generated/CodeVersionsGetSamples.java | 20 +- .../generated/CodeVersionsListSamples.java | 20 +- .../generated/CodeVersionsPublishSamples.java | 30 + ...ponentContainersCreateOrUpdateSamples.java | 30 +- .../ComponentContainersDeleteSamples.java | 21 +- .../ComponentContainersGetSamples.java | 20 +- .../ComponentContainersListSamples.java | 16 +- ...omponentVersionsCreateOrUpdateSamples.java | 40 +- .../ComponentVersionsDeleteSamples.java | 21 +- .../ComponentVersionsGetSamples.java | 20 +- .../ComponentVersionsListSamples.java | 20 +- .../ComponentVersionsPublishSamples.java | 30 + .../ComputeCreateOrUpdateSamples.java | 299 +- .../generated/ComputeDeleteSamples.java | 20 +- .../ComputeGetAllowedResizeSizesSamples.java | 25 + .../generated/ComputeGetSamples.java | 48 +- .../generated/ComputeListKeysSamples.java | 15 +- .../generated/ComputeListNodesSamples.java | 10 +- .../generated/ComputeListSamples.java | 10 +- .../generated/ComputeResizeSamples.java | 27 + .../generated/ComputeRestartSamples.java | 14 +- .../generated/ComputeStartSamples.java | 14 +- .../generated/ComputeStopSamples.java | 14 +- .../ComputeUpdateCustomServicesSamples.java | 63 + .../ComputeUpdateDataMountsSamples.java | 35 + ...mputeUpdateIdleShutdownSettingSamples.java | 28 + .../generated/ComputeUpdateSamples.java | 31 +- .../DataContainersCreateOrUpdateSamples.java | 34 +- .../DataContainersDeleteSamples.java | 20 +- .../generated/DataContainersGetSamples.java | 20 +- .../generated/DataContainersListSamples.java | 15 +- .../DataVersionsCreateOrUpdateSamples.java | 33 +- .../generated/DataVersionsDeleteSamples.java | 20 +- .../generated/DataVersionsGetSamples.java | 20 +- .../generated/DataVersionsListSamples.java | 29 +- .../generated/DataVersionsPublishSamples.java | 30 + .../DatastoresCreateOrUpdateSamples.java | 129 +- .../generated/DatastoresDeleteSamples.java | 15 +- .../generated/DatastoresGetSamples.java | 10 +- .../generated/DatastoresListSamples.java | 25 +- .../DatastoresListSecretsSamples.java | 15 +- .../EndpointCreateOrUpdateSamples.java | 30 + ...dpointDeploymentCreateOrUpdateSamples.java | 35 + .../EndpointDeploymentDeleteSamples.java | 26 + ...dpointDeploymentGetInWorkspaceSamples.java | 26 + .../EndpointDeploymentGetSamples.java | 25 + .../EndpointDeploymentListSamples.java | 26 + .../generated/EndpointGetModelsSamples.java | 25 + .../generated/EndpointGetSamples.java | 25 + .../generated/EndpointListKeysSamples.java | 25 + .../generated/EndpointListSamples.java | 27 + .../EndpointRegenerateKeysSamples.java | 30 + ...onmentContainersCreateOrUpdateSamples.java | 30 +- .../EnvironmentContainersDeleteSamples.java | 21 +- .../EnvironmentContainersGetSamples.java | 21 +- .../EnvironmentContainersListSamples.java | 21 +- ...ironmentVersionsCreateOrUpdateSamples.java | 50 +- .../EnvironmentVersionsDeleteSamples.java | 21 +- .../EnvironmentVersionsGetSamples.java | 20 +- .../EnvironmentVersionsListSamples.java | 21 +- .../EnvironmentVersionsPublishSamples.java | 30 + .../generated/FeaturesGetSamples.java | 25 + .../generated/FeaturesListSamples.java | 25 + ...uresetContainersCreateOrUpdateSamples.java | 44 + .../FeaturesetContainersDeleteSamples.java | 26 + .../FeaturesetContainersGetEntitySamples.java | 26 + .../FeaturesetContainersListSamples.java | 28 + .../FeaturesetVersionsBackfillSamples.java | 55 + ...aturesetVersionsCreateOrUpdateSamples.java | 71 + .../FeaturesetVersionsDeleteSamples.java | 26 + .../FeaturesetVersionsGetSamples.java | 26 + .../FeaturesetVersionsListSamples.java | 28 + ...EntityContainersCreateOrUpdateSamples.java | 44 + ...urestoreEntityContainersDeleteSamples.java | 26 + ...storeEntityContainersGetEntitySamples.java | 26 + ...aturestoreEntityContainersListSamples.java | 28 + ...reEntityVersionsCreateOrUpdateSamples.java | 50 + ...aturestoreEntityVersionsDeleteSamples.java | 26 + .../FeaturestoreEntityVersionsGetSamples.java | 26 + ...FeaturestoreEntityVersionsListSamples.java | 28 + ...ferenceEndpointsCreateOrUpdateSamples.java | 56 + .../InferenceEndpointsDeleteSamples.java | 26 + .../InferenceEndpointsGetSamples.java | 26 + .../InferenceEndpointsListSamples.java | 28 + .../InferenceEndpointsUpdateSamples.java | 32 + .../InferenceGroupsCreateOrUpdateSamples.java | 56 + .../InferenceGroupsDeleteSamples.java | 26 + .../generated/InferenceGroupsGetSamples.java | 26 + .../InferenceGroupsGetStatusSamples.java | 26 + .../generated/InferenceGroupsListSamples.java | 28 + .../InferenceGroupsListSkusSamples.java | 26 + .../InferenceGroupsUpdateSamples.java | 47 + .../InferencePoolsCreateOrUpdateSamples.java | 77 + .../InferencePoolsDeleteSamples.java | 25 + .../generated/InferencePoolsGetSamples.java | 26 + .../InferencePoolsGetStatusSamples.java | 26 + .../generated/InferencePoolsListSamples.java | 28 + .../InferencePoolsListSkusSamples.java | 26 + .../InferencePoolsUpdateSamples.java | 57 + .../generated/JobsCancelSamples.java | 10 +- .../generated/JobsCreateOrUpdateSamples.java | 364 +- .../generated/JobsDeleteSamples.java | 10 +- .../generated/JobsGetSamples.java | 42 +- .../generated/JobsListSamples.java | 63 +- .../generated/JobsUpdateSamples.java | 46 + .../LabelingJobsCreateOrUpdateSamples.java | 68 + .../generated/LabelingJobsDeleteSamples.java | 25 + .../LabelingJobsExportLabelsSamples.java | 28 + .../generated/LabelingJobsGetSamples.java | 25 + .../generated/LabelingJobsListSamples.java | 24 + .../generated/LabelingJobsPauseSamples.java | 25 + .../generated/LabelingJobsResumeSamples.java | 24 + ...visionsProvisionManagedNetworkSamples.java | 28 + ...workSettingsRuleCreateOrUpdateSamples.java | 32 + ...nagedNetworkSettingsRuleDeleteSamples.java | 26 + .../ManagedNetworkSettingsRuleGetSamples.java | 26 + ...ManagedNetworkSettingsRuleListSamples.java | 25 + ...aceSubscriptionsCreateOrUpdateSamples.java | 28 + ...MarketplaceSubscriptionsDeleteSamples.java | 26 + .../MarketplaceSubscriptionsGetSamples.java | 26 + .../MarketplaceSubscriptionsListSamples.java | 25 + .../ModelContainersCreateOrUpdateSamples.java | 29 +- .../ModelContainersDeleteSamples.java | 20 +- .../generated/ModelContainersGetSamples.java | 20 +- .../generated/ModelContainersListSamples.java | 15 +- .../ModelVersionsCreateOrUpdateSamples.java | 38 +- .../generated/ModelVersionsDeleteSamples.java | 20 +- .../generated/ModelVersionsGetSamples.java | 20 +- .../generated/ModelVersionsListSamples.java | 34 +- .../ModelVersionsPackageMethodSamples.java | 61 + .../ModelVersionsPublishSamples.java | 30 + ...nlineDeploymentsCreateOrUpdateSamples.java | 157 +- .../OnlineDeploymentsDeleteSamples.java | 21 +- .../OnlineDeploymentsGetLogsSamples.java | 26 +- .../OnlineDeploymentsGetSamples.java | 44 +- .../OnlineDeploymentsListSamples.java | 16 +- .../OnlineDeploymentsListSkusSamples.java | 48 +- .../OnlineDeploymentsUpdateSamples.java | 75 +- .../OnlineEndpointsCreateOrUpdateSamples.java | 44 +- .../OnlineEndpointsDeleteSamples.java | 20 +- .../generated/OnlineEndpointsGetSamples.java | 20 +- .../OnlineEndpointsGetTokenSamples.java | 21 +- .../OnlineEndpointsListKeysSamples.java | 21 +- .../generated/OnlineEndpointsListSamples.java | 30 +- .../OnlineEndpointsRegenerateKeysSamples.java | 25 +- .../OnlineEndpointsUpdateSamples.java | 41 +- .../generated/OperationsListSamples.java | 10 +- ...pointConnectionsCreateOrUpdateSamples.java | 22 +- ...ivateEndpointConnectionsDeleteSamples.java | 20 +- .../PrivateEndpointConnectionsGetSamples.java | 16 +- ...PrivateEndpointConnectionsListSamples.java | 10 +- .../PrivateLinkResourcesListSamples.java | 16 +- .../generated/QuotasListSamples.java | 14 +- .../generated/QuotasUpdateSamples.java | 41 +- .../RegistriesCreateOrUpdateSamples.java | 123 + .../generated/RegistriesDeleteSamples.java | 24 + .../RegistriesGetByResourceGroupSamples.java | 40 + .../RegistriesListByResourceGroupSamples.java | 40 + .../generated/RegistriesListSamples.java | 25 + .../RegistriesRemoveRegionsSamples.java | 100 + .../generated/RegistriesUpdateSamples.java | 76 + ...ryCodeContainersCreateOrUpdateSamples.java | 44 + .../RegistryCodeContainersDeleteSamples.java | 26 + .../RegistryCodeContainersGetSamples.java | 26 + .../RegistryCodeContainersListSamples.java | 25 + ...sCreateOrGetStartPendingUploadSamples.java | 31 + ...stryCodeVersionsCreateOrUpdateSamples.java | 45 + .../RegistryCodeVersionsDeleteSamples.java | 26 + .../RegistryCodeVersionsGetSamples.java | 26 + .../RegistryCodeVersionsListSamples.java | 26 + ...ponentContainersCreateOrUpdateSamples.java | 44 + ...istryComponentContainersDeleteSamples.java | 26 + ...RegistryComponentContainersGetSamples.java | 26 + ...egistryComponentContainersListSamples.java | 26 + ...omponentVersionsCreateOrUpdateSamples.java | 50 + ...egistryComponentVersionsDeleteSamples.java | 26 + .../RegistryComponentVersionsGetSamples.java | 26 + .../RegistryComponentVersionsListSamples.java | 26 + ...ryDataContainersCreateOrUpdateSamples.java | 46 + .../RegistryDataContainersDeleteSamples.java | 25 + .../RegistryDataContainersGetSamples.java | 26 + .../RegistryDataContainersListSamples.java | 28 + ...aReferencesGetBlobReferenceSasSamples.java | 29 + ...sCreateOrGetStartPendingUploadSamples.java | 31 + ...stryDataVersionsCreateOrUpdateSamples.java | 46 + .../RegistryDataVersionsDeleteSamples.java | 26 + .../RegistryDataVersionsGetSamples.java | 26 + .../RegistryDataVersionsListSamples.java | 28 + ...onmentContainersCreateOrUpdateSamples.java | 47 + ...tryEnvironmentContainersDeleteSamples.java | 26 + ...gistryEnvironmentContainersGetSamples.java | 26 + ...istryEnvironmentContainersListSamples.java | 26 + ...ironmentVersionsCreateOrUpdateSamples.java | 55 + ...istryEnvironmentVersionsDeleteSamples.java | 26 + ...RegistryEnvironmentVersionsGetSamples.java | 26 + ...egistryEnvironmentVersionsListSamples.java | 26 + ...yModelContainersCreateOrUpdateSamples.java | 44 + .../RegistryModelContainersDeleteSamples.java | 26 + .../RegistryModelContainersGetSamples.java | 26 + .../RegistryModelContainersListSamples.java | 26 + ...sCreateOrGetStartPendingUploadSamples.java | 31 + ...tryModelVersionsCreateOrUpdateSamples.java | 47 + .../RegistryModelVersionsDeleteSamples.java | 26 + .../RegistryModelVersionsGetSamples.java | 26 + .../RegistryModelVersionsListSamples.java | 26 + ...stryModelVersionsPackageMethodSamples.java | 61 + .../SchedulesCreateOrUpdateSamples.java | 45 +- .../generated/SchedulesDeleteSamples.java | 10 +- .../generated/SchedulesGetSamples.java | 10 +- .../generated/SchedulesListSamples.java | 10 +- .../generated/SchedulesTriggerSamples.java | 27 + ...verlessEndpointsCreateOrUpdateSamples.java | 60 + .../ServerlessEndpointsDeleteSamples.java | 25 + .../ServerlessEndpointsGetSamples.java | 26 + .../ServerlessEndpointsGetStatusSamples.java | 26 + .../ServerlessEndpointsListKeysSamples.java | 26 + .../ServerlessEndpointsListSamples.java | 25 + ...verlessEndpointsRegenerateKeysSamples.java | 30 + .../ServerlessEndpointsUpdateSamples.java | 57 + .../generated/UsagesListSamples.java | 10 +- .../VirtualMachineSizesListSamples.java | 10 +- .../WorkspaceConnectionsCreateSamples.java | 25 +- .../WorkspaceConnectionsDeleteSamples.java | 19 +- .../WorkspaceConnectionsGetSamples.java | 19 +- .../WorkspaceConnectionsListSamples.java | 24 +- ...orkspaceConnectionsListSecretsSamples.java | 26 + ...spaceConnectionsTestConnectionSamples.java | 34 + .../WorkspaceConnectionsUpdateSamples.java | 44 + .../WorkspaceFeaturesListSamples.java | 10 +- .../WorkspacesCreateOrUpdateSamples.java | 73 +- .../generated/WorkspacesDeleteSamples.java | 12 +- .../generated/WorkspacesDiagnoseSamples.java | 34 +- .../WorkspacesGetByResourceGroupSamples.java | 15 +- .../WorkspacesListByResourceGroupSamples.java | 16 +- .../generated/WorkspacesListKeysSamples.java | 10 +- ...kspacesListNotebookAccessTokenSamples.java | 15 +- .../WorkspacesListNotebookKeysSamples.java | 15 +- ...ndNetworkDependenciesEndpointsSamples.java | 16 +- .../generated/WorkspacesListSamples.java | 16 +- ...rkspacesListStorageAccountKeysSamples.java | 15 +- .../WorkspacesPrepareNotebookSamples.java | 10 +- .../WorkspacesResyncKeysSamples.java | 10 +- .../generated/WorkspacesUpdateSamples.java | 28 +- .../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 - 1882 files changed, 150685 insertions(+), 55763 deletions(-) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningServices.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapacityReservationGroupsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java 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/InferenceEndpointsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/LabelingJobsClient.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/MarketplaceSubscriptionsClient.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 create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountModelInner.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/CapacityReservationGroupInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointDeploymentResourcePropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExportSummaryInner.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/GroupStatusInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobPropertiesInner.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/MarketplaceSubscriptionInner.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/PackageResponseInner.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/PoolStatusInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.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 create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointStatusInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/TriggerRunSubmissionDtoInner.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/{AmlOperationImpl.java => AccountApiKeysImpl.java} (55%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountModelImpl.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/{AzureMachineLearningWorkspacesBuilder.java => AzureMachineLearningServicesBuilder.java} (54%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesImpl.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExportSummaryImpl.java 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 rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/{PrivateLinkResourceListResultImpl.java => FeaturesetVersionBackfillResponseImpl.java} (56%) 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/GroupStatusImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobPropertiesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsImpl.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/MarketplaceSubscriptionImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.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/PackageResponseImpl.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/PoolStatusImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.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 rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/{Utils.java => ResourceManagerUtils.java} (80%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointStatusImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/TriggerRunSubmissionDtoImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountModel.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/ActualCapacityInfo.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/ApiKeyAuthWorkspaceConnectionProperties.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/AuthMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoDeleteCondition.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoDeleteSetting.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutologgerSettings.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/AzureMLBatchInferencingServer.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureMLOnlineInferencingServer.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentId.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentSource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentSourceType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.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/CallRateLimit.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityConfig.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroup.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroupProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroupTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroups.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/ClassificationModelPerformanceMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModelPerformanceMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CocoExportSummary.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServiceEndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.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/ComputeRuntimeDto.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/ConnectionGroup.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.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/CsvExportSummary.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomInferencingServer.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.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/CustomModelFineTuning.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/DataCollectionMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.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/DataImport.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImportSource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImportSourceType.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/DatabaseSource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetExportSummary.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModel.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.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 delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.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/EndpointDeploymentModel.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.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/EndpointType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.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/ExportFormatType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportSummary.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/FeatureStoreSettings.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/FileSystemSource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.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/GenerationSafetyQualityMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMonitoringSignal.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageSignal.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/GroupStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HdfsDatastore.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.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/ImageAnnotationType.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/ImportDataAction.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IncrementalDataRefresh.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/InferenceEndpoint.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencingServer.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencingServerType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputPathType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IntellectualProperty.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/JobProvisioningState.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/JupyterKernelConfig.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelCategory.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelClass.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingDataConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJob.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobImageProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobInstructions.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobMediaProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobTextProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobs.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogTrainingMetrics.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogValidationLoss.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationEnabled.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowAutologgerState.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/ManagedOnlineEndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.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/MediaType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelDeprecationInfo.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPackageInput.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPerformanceMetricThresholdBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPerformanceSignal.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSku.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/MonitoringDataSegment.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/MonitoringModelType.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/MonitoringWorkspaceConnection.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MultiSelect.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpFixedParameters.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpLearningRateScheduler.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpParameterSubspace.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpSweepSettings.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/OAuth2AuthTypeWorkspaceConnectionProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineInferenceConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.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/OsPatchingStatus.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/PackageBuildState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputDeliveryMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathId.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathUrl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathVersion.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageResponse.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialJobBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialJobBasePartialResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialNotificationSetting.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/PatchStatus.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/PoolEnvironmentConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolModelConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolStatus.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 delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProgressMetrics.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProtectionLevel.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.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/Ray.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/RegenerateServiceAccountKeyContent.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/RegressionModelPerformanceMetric.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModelPerformanceMetricThreshold.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestMatchPattern.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.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/RollingRateType.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/ScheduleType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretConfiguration.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/ServerlessEndpoint.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.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/SparkJob.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.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/StatusMessage.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessageLevel.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/TableFixedParameters.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableParameterSubspace.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableSweepSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextAnnotationType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ThrottlingRule.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/TrainingMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerOnceRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerRunSubmissionDto.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonInferencingServer.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 delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.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/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/reflect-config.json create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsGetByResourceGroupSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsListByResourceGroupSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsUpdateSamples.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/ComputeGetAllowedResizeSizesSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeResizeSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateDataMountsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.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/EndpointCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetInWorkspaceSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetModelsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListKeysSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointRegenerateKeysSamples.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/InferenceEndpointsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetStatusSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSkusSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsExportLabelsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsPauseSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsResumeSamples.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/MarketplaceSubscriptionsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPackageMethodSamples.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 create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsPackageMethodSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesTriggerSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetStatusSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsTestConnectionSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsUpdateSamples.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..f039bce9e25be 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 (2024-02-01) + +- 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-preview-2024-01. 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..c43dc4af52e9b 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-preview-2024-01. 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}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -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) @@ -94,7 +137,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty @@ -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..7c4541187b518 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md @@ -18,6 +18,15 @@ - [ListKeys](#batchendpoints_listkeys) - [Update](#batchendpoints_update) +## CapacityReservationGroups + +- [CreateOrUpdate](#capacityreservationgroups_createorupdate) +- [Delete](#capacityreservationgroups_delete) +- [GetByResourceGroup](#capacityreservationgroups_getbyresourcegroup) +- [List](#capacityreservationgroups_list) +- [ListByResourceGroup](#capacityreservationgroups_listbyresourcegroup) +- [Update](#capacityreservationgroups_update) + ## CodeContainers - [CreateOrUpdate](#codecontainers_createorupdate) @@ -27,10 +36,12 @@ ## CodeVersions +- [CreateOrGetStartPendingUpload](#codeversions_createorgetstartpendingupload) - [CreateOrUpdate](#codeversions_createorupdate) - [Delete](#codeversions_delete) - [Get](#codeversions_get) - [List](#codeversions_list) +- [Publish](#codeversions_publish) ## ComponentContainers @@ -45,19 +56,25 @@ - [Delete](#componentversions_delete) - [Get](#componentversions_get) - [List](#componentversions_list) +- [Publish](#componentversions_publish) ## Compute - [CreateOrUpdate](#compute_createorupdate) - [Delete](#compute_delete) - [Get](#compute_get) +- [GetAllowedResizeSizes](#compute_getallowedresizesizes) - [List](#compute_list) - [ListKeys](#compute_listkeys) - [ListNodes](#compute_listnodes) +- [Resize](#compute_resize) - [Restart](#compute_restart) - [Start](#compute_start) - [Stop](#compute_stop) - [Update](#compute_update) +- [UpdateCustomServices](#compute_updatecustomservices) +- [UpdateDataMounts](#compute_updatedatamounts) +- [UpdateIdleShutdownSetting](#compute_updateidleshutdownsetting) ## DataContainers @@ -72,6 +89,7 @@ - [Delete](#dataversions_delete) - [Get](#dataversions_get) - [List](#dataversions_list) +- [Publish](#dataversions_publish) ## Datastores @@ -81,6 +99,23 @@ - [List](#datastores_list) - [ListSecrets](#datastores_listsecrets) +## Endpoint + +- [CreateOrUpdate](#endpoint_createorupdate) +- [Get](#endpoint_get) +- [GetModels](#endpoint_getmodels) +- [List](#endpoint_list) +- [ListKeys](#endpoint_listkeys) +- [RegenerateKeys](#endpoint_regeneratekeys) + +## EndpointDeployment + +- [CreateOrUpdate](#endpointdeployment_createorupdate) +- [Delete](#endpointdeployment_delete) +- [Get](#endpointdeployment_get) +- [GetInWorkspace](#endpointdeployment_getinworkspace) +- [List](#endpointdeployment_list) + ## EnvironmentContainers - [CreateOrUpdate](#environmentcontainers_createorupdate) @@ -94,6 +129,69 @@ - [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) + +## InferenceEndpoints + +- [CreateOrUpdate](#inferenceendpoints_createorupdate) +- [Delete](#inferenceendpoints_delete) +- [Get](#inferenceendpoints_get) +- [List](#inferenceendpoints_list) +- [Update](#inferenceendpoints_update) + +## InferenceGroups + +- [CreateOrUpdate](#inferencegroups_createorupdate) +- [Delete](#inferencegroups_delete) +- [Get](#inferencegroups_get) +- [GetStatus](#inferencegroups_getstatus) +- [List](#inferencegroups_list) +- [ListSkus](#inferencegroups_listskus) +- [Update](#inferencegroups_update) + +## InferencePools + +- [CreateOrUpdate](#inferencepools_createorupdate) +- [Delete](#inferencepools_delete) +- [Get](#inferencepools_get) +- [GetStatus](#inferencepools_getstatus) +- [List](#inferencepools_list) +- [ListSkus](#inferencepools_listskus) +- [Update](#inferencepools_update) ## Jobs @@ -102,6 +200,35 @@ - [Delete](#jobs_delete) - [Get](#jobs_get) - [List](#jobs_list) +- [Update](#jobs_update) + +## LabelingJobs + +- [CreateOrUpdate](#labelingjobs_createorupdate) +- [Delete](#labelingjobs_delete) +- [ExportLabels](#labelingjobs_exportlabels) +- [Get](#labelingjobs_get) +- [List](#labelingjobs_list) +- [Pause](#labelingjobs_pause) +- [Resume](#labelingjobs_resume) + +## ManagedNetworkProvisions + +- [ProvisionManagedNetwork](#managednetworkprovisions_provisionmanagednetwork) + +## ManagedNetworkSettingsRule + +- [CreateOrUpdate](#managednetworksettingsrule_createorupdate) +- [Delete](#managednetworksettingsrule_delete) +- [Get](#managednetworksettingsrule_get) +- [List](#managednetworksettingsrule_list) + +## MarketplaceSubscriptions + +- [CreateOrUpdate](#marketplacesubscriptions_createorupdate) +- [Delete](#marketplacesubscriptions_delete) +- [Get](#marketplacesubscriptions_get) +- [List](#marketplacesubscriptions_list) ## ModelContainers @@ -116,6 +243,8 @@ - [Delete](#modelversions_delete) - [Get](#modelversions_get) - [List](#modelversions_list) +- [PackageMethod](#modelversions_packagemethod) +- [Publish](#modelversions_publish) ## OnlineDeployments @@ -158,12 +287,112 @@ - [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) +- [PackageMethod](#registrymodelversions_packagemethod) + ## Schedules - [CreateOrUpdate](#schedules_createorupdate) - [Delete](#schedules_delete) - [Get](#schedules_get) - [List](#schedules_list) +- [Trigger](#schedules_trigger) + +## ServerlessEndpoints + +- [CreateOrUpdate](#serverlessendpoints_createorupdate) +- [Delete](#serverlessendpoints_delete) +- [Get](#serverlessendpoints_get) +- [GetStatus](#serverlessendpoints_getstatus) +- [List](#serverlessendpoints_list) +- [ListKeys](#serverlessendpoints_listkeys) +- [RegenerateKeys](#serverlessendpoints_regeneratekeys) +- [Update](#serverlessendpoints_update) ## Usages @@ -179,6 +408,9 @@ - [Delete](#workspaceconnections_delete) - [Get](#workspaceconnections_get) - [List](#workspaceconnections_list) +- [ListSecrets](#workspaceconnections_listsecrets) +- [TestConnection](#workspaceconnections_testconnection) +- [Update](#workspaceconnections_update) ## WorkspaceFeatures @@ -221,70 +453,25 @@ import java.io.IOException; import java.time.Duration; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for BatchDeployments CreateOrUpdate. */ +/** + * 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 - */ - /** - * Sample code: CreateOrUpdate Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateBatchDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager - .batchDeployments() - .define("testDeploymentName") - .withRegion("string") - .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties( - new BatchDeploymentProperties() - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) - .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withCompute("string") - .withErrorThreshold(1) - .withLoggingLevel(BatchLoggingLevel.INFO) - .withMaxConcurrencyPerInstance(1) - .withMiniBatchSize(1L) - .withModel(new IdAssetReference().withAssetId("string")) - .withOutputAction(BatchOutputAction.SUMMARY_ONLY) - .withOutputFileName("string") - .withResources( - new DeploymentResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", - Object.class, - SerializerEncoding.JSON)))) - .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) - .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/preview/2024-01-01-preview/examples/Workspace/BatchDeployment/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Batch Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager.batchDeployments().define("testDeploymentName").withRegion("string").withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName").withProperties(new BatchDeploymentProperties().withCodeConfiguration(new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")).withDescription("string").withEnvironmentId("string").withEnvironmentVariables(mapOf("string", "string")).withProperties(mapOf("string", "string")).withCompute("string").withErrorThreshold(1).withLoggingLevel(BatchLoggingLevel.INFO).withMaxConcurrencyPerInstance(1).withMiniBatchSize(1L).withModel(new IdAssetReference().withAssetId("string")).withOutputAction(BatchOutputAction.SUMMARY_ONLY).withOutputFileName("string").withResources(new DeploymentResourceConfiguration().withInstanceCount(1).withInstanceType("string").withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", Object.class, SerializerEncoding.JSON)))).withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))).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<>(); @@ -301,25 +488,20 @@ public final class BatchDeploymentsCreateOrUpdateSamples { ### BatchDeployments_Delete ```java -/** Samples for BatchDeployments Delete. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .batchDeployments() - .delete( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE); + public static void deleteWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.batchDeployments().delete("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", com.azure.core.util.Context.NONE); } } ``` @@ -327,25 +509,20 @@ public final class BatchDeploymentsDeleteSamples { ### BatchDeployments_Get ```java -/** Samples for BatchDeployments Get. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .batchDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE); + public static void getWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.batchDeployments().getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", com.azure.core.util.Context.NONE); } } ``` @@ -353,21 +530,20 @@ public final class BatchDeploymentsGetSamples { ### BatchDeployments_List ```java -/** Samples for BatchDeployments List. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .batchDeployments() - .list( - "test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, com.azure.core.util.Context.NONE); + public static void listWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.batchDeployments().list("test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, com.azure.core.util.Context.NONE); } } ``` @@ -380,34 +556,24 @@ import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; import java.util.HashMap; import java.util.Map; -/** Samples for BatchDeployments Update. */ +/** + * 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/preview/2024-01-01-preview/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) { - BatchDeployment resource = - manager - .batchDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withProperties(new PartialBatchDeployment().withDescription("string")) - .apply(); + public static void updateWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + BatchDeployment resource = manager.batchDeployments().getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf()).withProperties(new PartialBatchDeployment().withDescription("string")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -434,46 +600,25 @@ import com.azure.resourcemanager.machinelearning.models.SkuTier; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for BatchEndpoints CreateOrUpdate. */ +/** + * 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 - */ - /** - * Sample code: CreateOrUpdate Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateBatchEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .batchEndpoints() - .define("testEndpointName") - .withRegion("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new BatchEndpointProperties() - .withAuthMode(EndpointAuthMode.AMLTOKEN) - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) - .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/preview/2024-01-01-preview/examples/Workspace/BatchEndpoint/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Batch Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.batchEndpoints().define("testEndpointName").withRegion("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new BatchEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN).withDescription("string").withProperties(mapOf("string", "string")).withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))).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<>(); @@ -490,20 +635,20 @@ public final class BatchEndpointsCreateOrUpdateSamples { ### BatchEndpoints_Delete ```java -/** Samples for BatchEndpoints Delete. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .batchEndpoints() - .delete("resourceGroup-1234", "testworkspace", "testBatchEndpoint", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.batchEndpoints().delete("resourceGroup-1234", "testworkspace", "testBatchEndpoint", com.azure.core.util.Context.NONE); } } ``` @@ -511,20 +656,20 @@ public final class BatchEndpointsDeleteSamples { ### BatchEndpoints_Get ```java -/** Samples for BatchEndpoints Get. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .batchEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -532,17 +677,19 @@ public final class BatchEndpointsGetSamples { ### BatchEndpoints_List ```java -/** Samples for BatchEndpoints List. */ +/** + * 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/preview/2024-01-01-preview/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); } } @@ -551,20 +698,20 @@ public final class BatchEndpointsListSamples { ### BatchEndpoints_ListKeys ```java -/** Samples for BatchEndpoints ListKeys. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .batchEndpoints() - .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -580,39 +727,200 @@ import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIde import java.io.IOException; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for BatchEndpoints Update. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/BatchEndpoint/update.json + */ + /** + * Sample code: Update Workspace Batch Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + BatchEndpoint resource = manager.batchEndpoints().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; + } +} +``` + +### CapacityReservationGroups_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.CapacityReservationGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.ServerlessOffer; +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 java.util.stream.Collectors; + +/** + * Samples for CapacityReservationGroups CreateOrUpdate. + */ +public final class CapacityReservationGroupsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/CapacityReservationGroup/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateCapacityReservationGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().define("string").withRegion("string").withExistingResourceGroup("test-rg").withProperties(new CapacityReservationGroupProperties().withOffer(new ServerlessOffer().withOfferName("string").withPublisher("string")).withReservedCapacity(1)).withTags(mapOf()).withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED).withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))).withKind("string").withSku(new Sku().withName("string").withTier(SkuTier.PREMIUM).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; + } +} +``` + +### CapacityReservationGroups_Delete + +```java +/** + * Samples for CapacityReservationGroups Delete. + */ +public final class CapacityReservationGroupsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/CapacityReservationGroup/delete.json + */ + /** + * Sample code: Delete Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteCapacityReservationGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().deleteByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### CapacityReservationGroups_GetByResourceGroup + +```java +/** + * Samples for CapacityReservationGroups GetByResourceGroup. + */ +public final class CapacityReservationGroupsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/CapacityReservationGroup/get.json + */ + /** + * Sample code: Get Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getCapacityReservationGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### CapacityReservationGroups_List + +```java +/** + * Samples for CapacityReservationGroups List. + */ +public final class CapacityReservationGroupsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/CapacityReservationGroup/listBySubscription.json + */ + /** + * Sample code: ListBySubscription Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listBySubscriptionCapacityReservationGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().list(null, com.azure.core.util.Context.NONE); + } +} +``` + +### CapacityReservationGroups_ListByResourceGroup + +```java +/** + * Samples for CapacityReservationGroups ListByResourceGroup. + */ +public final class CapacityReservationGroupsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/CapacityReservationGroup/list.json + */ + /** + * Sample code: List Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listCapacityReservationGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().listByResourceGroup("test-rg", null, com.azure.core.util.Context.NONE); + } +} +``` + +### CapacityReservationGroups_Update + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.CapacityReservationGroup; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for CapacityReservationGroups Update. + */ +public final class CapacityReservationGroupsUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/CapacityReservationGroup/update.json */ /** - * Sample code: Update Batch Endpoint. - * + * Sample code: Update Capacity Reservation Group. + * * @param manager Entry point to MachineLearningManager. */ - public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - BatchEndpoint resource = - manager - .batchEndpoints() - .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 updateCapacityReservationGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + CapacityReservationGroup resource = manager.capacityReservationGroups().getByResourceGroupWithResponse("test-rg", "string", 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)))).withSku(new PartialSku().withCapacity(1).withFamily("string").withName("string").withSize("string").withTier(SkuTier.STANDARD)).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -629,33 +937,28 @@ 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; -/** Samples for CodeContainers CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/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( - 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(); + public static void createOrUpdateWorkspaceCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.codeContainers().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<>(); @@ -672,20 +975,20 @@ public final class CodeContainersCreateOrUpdateSamples { ### CodeContainers_Delete ```java -/** Samples for CodeContainers Delete. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .codeContainers() - .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.codeContainers().deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); } } ``` @@ -693,20 +996,20 @@ public final class CodeContainersDeleteSamples { ### CodeContainers_Get ```java -/** Samples for CodeContainers Get. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .codeContainers() - .getWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + public static void getWorkspaceCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.codeContainers().getWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); } } ``` @@ -714,55 +1017,74 @@ public final class CodeContainersGetSamples { ### CodeContainers_List ```java -/** Samples for CodeContainers List. */ +/** + * 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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for CodeVersions CreateOrGetStartPendingUpload. + */ +public final class CodeVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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.TEMPORARY_BLOB_REFERENCE), 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; -/** Samples for CodeVersions CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/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( - 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(); + public static void createOrUpdateWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.codeVersions().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<>(); @@ -779,20 +1101,20 @@ public final class CodeVersionsCreateOrUpdateSamples { ### CodeVersions_Delete ```java -/** Samples for CodeVersions Delete. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .codeVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -800,20 +1122,20 @@ public final class CodeVersionsDeleteSamples { ### CodeVersions_Get ```java -/** Samples for CodeVersions Get. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .codeVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -821,20 +1143,43 @@ public final class CodeVersionsGetSamples { ### CodeVersions_List ```java -/** Samples for CodeVersions List. */ +/** + * 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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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) { - manager - .codeVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, com.azure.core.util.Context.NONE); + 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); } } ``` @@ -842,34 +1187,28 @@ 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; -/** Samples for ComponentContainers CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/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( - 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(); + public static void createOrUpdateWorkspaceComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.componentContainers().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<>(); @@ -886,21 +1225,20 @@ public final class ComponentContainersCreateOrUpdateSamples { ### ComponentContainers_Delete ```java -/** Samples for ComponentContainers Delete. */ +/** + * 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/preview/2024-01-01-preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .componentContainers() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.componentContainers().deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } } ``` @@ -908,20 +1246,20 @@ public final class ComponentContainersDeleteSamples { ### ComponentContainers_Get ```java -/** Samples for ComponentContainers Get. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .componentContainers() - .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -929,18 +1267,22 @@ public final class ComponentContainersGetSamples { ### ComponentContainers_List ```java -/** Samples for ComponentContainers List. */ +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * 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/preview/2024-01-01-preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + 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,43 +1293,29 @@ 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; import java.util.Map; -/** Samples for ComponentVersions CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/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( - 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(); + public static void createOrUpdateWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager.componentVersions().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<>(); @@ -1004,21 +1332,20 @@ public final class ComponentVersionsCreateOrUpdateSamples { ### ComponentVersions_Delete ```java -/** Samples for ComponentVersions Delete. */ +/** + * 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/preview/2024-01-01-preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .componentVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.componentVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` @@ -1026,20 +1353,20 @@ public final class ComponentVersionsDeleteSamples { ### ComponentVersions_Get ```java -/** Samples for ComponentVersions Get. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .componentVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -1047,20 +1374,46 @@ public final class ComponentVersionsGetSamples { ### ComponentVersions_List ```java -/** Samples for ComponentVersions List. */ +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * 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/preview/2024-01-01-preview/examples/Workspace/ComponentVersion/list.json + */ + /** + * Sample code: List Workspace Component Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.componentVersions().list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### 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/preview/2024-01-01-preview/examples/Workspace/ComponentVersion/publish.json */ /** - * Sample code: List Component Version. - * + * Sample code: Publish Workspace Component Version. + * * @param manager Entry point to MachineLearningManager. */ - public static void listComponentVersion(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); + 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); } } ``` @@ -1076,274 +1429,159 @@ import com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy import com.azure.resourcemanager.machinelearning.models.AssignedUser; import com.azure.resourcemanager.machinelearning.models.ComputeInstance; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings; 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.JupyterKernelConfig; import com.azure.resourcemanager.machinelearning.models.Kubernetes; import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; +import com.azure.resourcemanager.machinelearning.models.MlflowAutologger; 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; +import java.util.stream.Collectors; -/** Samples for Compute CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new Aks()) - .create(); + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus").withProperties(new Aks()).create(); } /* - * 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/preview/2024-01-01-preview/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new Aks() - .withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties(new AksSchemaProperties().withAgentCount(4))) - .create(); + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus").withProperties(new Aks().withDescription("some compute").withResourceId("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2").withProperties(new AksSchemaProperties().withAgentCount(4))).create(); } /* - * 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/preview/2024-01-01-preview/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void attachAKubernetesCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new Kubernetes() - .withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties( - new KubernetesProperties() - .withNamespace("default") - .withDefaultInstanceType("defaultInstanceType") - .withInstanceTypes( - mapOf( - "defaultInstanceType", - new InstanceTypeSchema() - .withResources( - new InstanceTypeSchemaResources() - .withRequests( - mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null)) - .withLimits( - mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null))))))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + * + * @param manager Entry point to MachineLearningManager. + */ + public static void attachAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus").withProperties(new Kubernetes().withDescription("some compute").withResourceId("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2").withProperties(new KubernetesProperties().withNamespace("default").withDefaultInstanceType("defaultInstanceType").withInstanceTypes(mapOf("defaultInstanceType", new InstanceTypeSchema().withResources(new InstanceTypeSchemaResources().withRequests(mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null)).withLimits(mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null))))))).create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json */ /** * Sample code: Create an ComputeInstance Compute with Schedules. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAnComputeInstanceComputeWithSchedules( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance() - .withProperties( - new ComputeInstanceProperties() - .withVmSize("STANDARD_NC6") - .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) - .withSshSettings( - new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) - .withPersonalComputeInstanceSettings( - new PersonalComputeInstanceSettings() - .withAssignedUser( - new AssignedUser() - .withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createAnComputeInstanceComputeWithSchedules(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus").withProperties(new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6").withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL).withSshSettings(new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)).withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL).withPersonalComputeInstanceSettings(new PersonalComputeInstanceSettings().withAssignedUser(new AssignedUser().withObjectId("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/preview/2024-01-01-preview/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new AmlCompute() - .withProperties( - new AmlComputeProperties() - .withOsType(OsType.WINDOWS) - .withVmSize("STANDARD_NC6") - .withVmPriority(VmPriority.DEDICATED) - .withVirtualMachineImage( - new VirtualMachineImage() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1")) - .withIsolatedNetwork(false) - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(1) - .withMinNodeCount(0) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))) - .withRemoteLoginPortPublicAccess(RemoteLoginPortPublicAccess.NOT_SPECIFIED) - .withEnableNodePublicIp(true))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstance.json + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus").withProperties(new AmlCompute().withProperties(new AmlComputeProperties().withOsType(OsType.WINDOWS).withVmSize("STANDARD_NC6").withVmPriority(VmPriority.DEDICATED).withVirtualMachineImage(new VirtualMachineImage().withId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1")).withIsolatedNetwork(false).withScaleSettings(new ScaleSettings().withMaxNodeCount(1).withMinNodeCount(0).withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))).withRemoteLoginPortPublicAccess(RemoteLoginPortPublicAccess.NOT_SPECIFIED).withEnableNodePublicIp(true))).create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAnComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance() - .withProperties( - new ComputeInstanceProperties() - .withVmSize("STANDARD_NC6") - .withSubnet(new ResourceId().withId("test-subnet-resource-id")) - .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) - .withSshSettings( - new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) - .withPersonalComputeInstanceSettings( - new PersonalComputeInstanceSettings() - .withAssignedUser( - new AssignedUser() - .withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createAnComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus").withProperties(new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6").withSubnet(new ResourceId().withId("test-subnet-resource-id")).withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL).withAutologgerSettings(new ComputeInstanceAutologgerSettings().withMlflowAutologger(MlflowAutologger.ENABLED)).withSshSettings(new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)).withCustomServices(Arrays.asList(new CustomService().withName("rstudio-workbench").withImage(new Image().withType(ImageType.DOCKER).withReference("ghcr.io/azure/rstudio-workbench:latest").withAdditionalProperties(mapOf())).withEnvironmentVariables(mapOf("RSP_LICENSE", new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL).withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX").withAdditionalProperties(mapOf()))).withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())).withEndpoints(Arrays.asList(new Endpoint().withProtocol(Protocol.HTTP).withName("connect").withTarget(8787).withPublished(4444))).withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND).withReadOnly(true).withSource("/mnt/azureuser/").withTarget("/home/testuser/"))).withKernel(new JupyterKernelConfig().withArgv(Arrays.asList("option1", "option2", "option3")).withDisplayName("TestKernel").withLanguage("python")).withAdditionalProperties(mapOf()))).withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL).withEnableOSPatching(true).withEnableRootAccess(true).withEnableSso(true).withReleaseQuotaOnStop(true).withPersonalComputeInstanceSettings(new PersonalComputeInstanceSettings().withAssignedUser(new AssignedUser().withObjectId("00000000-0000-0000-0000-000000000000").withTenantId("00000000-0000-0000-0000-000000000000"))))).create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void createAnComputeInstanceComputeWithMinimalInputs( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6"))) - .create(); + public static void createAnComputeInstanceComputeWithMinimalInputs(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus").withProperties(new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6"))).create(); } /* - * 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/preview/2024-01-01-preview/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void updateAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new AmlCompute() - .withDescription("some compute") - .withProperties( - new AmlComputeProperties() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(4) - .withMinNodeCount(4) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))))) - .create(); + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus").withProperties(new AmlCompute().withDescription("some compute").withProperties(new AmlComputeProperties().withScaleSettings(new ScaleSettings().withMaxNodeCount(4).withMinNodeCount(4).withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))))).create(); } /* - * 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/preview/2024-01-01-preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void createADataFactoryCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new DataFactory()) - .create(); + public static void createADataFactoryCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus").withProperties(new DataFactory()).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1361,26 +1599,22 @@ public final class ComputeCreateOrUpdateSamples { ```java import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; +import java.util.stream.Collectors; -/** Samples for Compute Delete. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/delete.json */ /** * Sample code: Delete Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void deleteCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .delete( - "testrg123", - "workspaces123", - "compute123", - UnderlyingResourceAction.DELETE, - com.azure.core.util.Context.NONE); + manager.computes().delete("testrg123", "workspaces123", "compute123", UnderlyingResourceAction.DELETE, com.azure.core.util.Context.NONE); } } ``` @@ -1388,62 +1622,77 @@ public final class ComputeDeleteSamples { ### Compute_Get ```java -/** Samples for Compute Get. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getAAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } /* - * 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/preview/2024-01-01-preview/examples/Compute/get/KubernetesCompute.json */ /** * Sample code: Get a Kubernetes Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } /* - * 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/preview/2024-01-01-preview/examples/Compute/get/ComputeInstance.json */ /** * Sample code: Get an ComputeInstance. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getAnComputeInstance(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } /* - * 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/preview/2024-01-01-preview/examples/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + } +} +``` + +### Compute_GetAllowedResizeSizes + +```java +/** + * Samples for Compute GetAllowedResizeSizes. + */ +public final class ComputeGetAllowedResizeSizesSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Compute/getAllowedVMSizesForResize.json + */ + /** + * Sample code: List VM Sizes. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().getAllowedResizeSizesWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } } ``` @@ -1451,14 +1700,16 @@ public final class ComputeGetSamples { ### Compute_List ```java -/** Samples for Compute List. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/list.json */ /** * Sample code: Get Computes. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getComputes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -1470,20 +1721,20 @@ public final class ComputeListSamples { ### Compute_ListKeys ```java -/** Samples for Compute ListKeys. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listAKSComputeKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .listKeysWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().listKeysWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } } ``` @@ -1491,38 +1742,63 @@ public final class ComputeListKeysSamples { ### Compute_ListNodes ```java -/** Samples for Compute ListNodes. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void getComputeNodesInformationForACompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getComputeNodesInformationForACompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes().listNodes("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } } ``` +### Compute_Resize + +```java +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; + +/** + * Samples for Compute Resize. + */ +public final class ComputeResizeSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Compute/resize.json + */ + /** + * Sample code: List VM Sizes. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().resize("testrg123", "workspaces123", "compute123", new ResizeSchema().withTargetVMSize("Standard_DS11_v2"), com.azure.core.util.Context.NONE); + } +} +``` + ### Compute_Restart ```java -/** Samples for Compute Restart. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void restartComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void restartComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes().restart("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } } @@ -1531,18 +1807,19 @@ public final class ComputeRestartSamples { ### Compute_Start ```java -/** Samples for Compute Start. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void startComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void startComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes().start("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } } @@ -1551,18 +1828,19 @@ public final class ComputeStartSamples { ### Compute_Stop ```java -/** Samples for Compute Stop. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void stopComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void stopComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes().stop("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } } @@ -1576,70 +1854,151 @@ import com.azure.resourcemanager.machinelearning.models.ScaleSettings; import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; import java.time.Duration; -/** Samples for Compute Update. */ +/** + * 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/preview/2024-01-01-preview/examples/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void updateAAmlComputeCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - ComputeResource resource = - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withProperties( - new ScaleSettingsInformation() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(4) - .withMinNodeCount(4) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M")))) - .apply(); + public static void updateAAmlComputeCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + ComputeResource resource = manager.computes().getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE).getValue(); + resource.update().withProperties(new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(4).withMinNodeCount(4).withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M")))).apply(); } } ``` -### DataContainers_CreateOrUpdate +### Compute_UpdateCustomServices ```java -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; +import com.azure.resourcemanager.machinelearning.models.CustomService; +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.Protocol; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for Compute UpdateCustomServices. + */ +public final class ComputeUpdateCustomServicesSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Compute/updateCustomServices.json + */ + /** + * Sample code: Update Custom Services. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateCustomServices(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().updateCustomServicesWithResponse("testrg123", "workspaces123", "compute123", Arrays.asList(new CustomService().withName("rstudio-workbench").withImage(new Image().withType(ImageType.DOCKER).withReference("ghcr.io/azure/rstudio-workbench:latest").withAdditionalProperties(mapOf())).withEnvironmentVariables(mapOf("RSP_LICENSE", new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL).withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX").withAdditionalProperties(mapOf()))).withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())).withEndpoints(Arrays.asList(new Endpoint().withProtocol(Protocol.HTTP).withName("connect").withTarget(8787).withPublished(4444))).withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND).withReadOnly(true).withSource("/mnt/azureuser/").withTarget("/home/testuser/"))).withAdditionalProperties(mapOf())), 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; + } +} +``` + +### Compute_UpdateDataMounts + +```java +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; +import com.azure.resourcemanager.machinelearning.models.MountAction; +import com.azure.resourcemanager.machinelearning.models.MountMode; +import com.azure.resourcemanager.machinelearning.models.SourceType; +import java.util.Arrays; +import java.util.stream.Collectors; + +/** + * Samples for Compute UpdateDataMounts. + */ +public final class ComputeUpdateDataMountsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Compute/updateDataMounts.json + */ + /** + * Sample code: Update Data Mounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateDataMounts(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().updateDataMountsWithResponse("testrg123", "workspaces123", "compute123", Arrays.asList(new ComputeInstanceDataMount().withSource("azureml://subscriptions/some-sub/resourcegroups/some-rg/workspaces/some-ws/data/some-data-asset-name/versions/some-data-asset-version").withSourceType(SourceType.URI).withMountName("hello").withMountAction(MountAction.MOUNT).withMountMode(MountMode.READ_ONLY).withMountPath("/some/random/path/on/host")), com.azure.core.util.Context.NONE); + } +} +``` + +### Compute_UpdateIdleShutdownSetting + +```java +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; + +/** + * Samples for Compute UpdateIdleShutdownSetting. + */ +public final class ComputeUpdateIdleShutdownSettingSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Compute/updateIdleShutdownSetting.json + */ + /** + * Sample code: Update idle shutdown setting of ComputeInstance. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateIdleShutdownSettingOfComputeInstance(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().updateIdleShutdownSettingWithResponse("testrg123", "workspaces123", "compute123", new IdleShutdownSetting().withIdleTimeBeforeShutdown("PT120M"), com.azure.core.util.Context.NONE); + } +} +``` + +### 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; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for DataContainers CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/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( - 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(); + public static void createOrUpdateWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers().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<>(); @@ -1656,20 +2015,20 @@ public final class DataContainersCreateOrUpdateSamples { ### DataContainers_Delete ```java -/** Samples for DataContainers Delete. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .dataContainers() - .deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers().deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); } } ``` @@ -1677,20 +2036,20 @@ public final class DataContainersDeleteSamples { ### DataContainers_Get ```java -/** Samples for DataContainers Get. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .dataContainers() - .getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + public static void getWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers().getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); } } ``` @@ -1698,17 +2057,22 @@ public final class DataContainersGetSamples { ### DataContainers_List ```java -/** Samples for DataContainers List. */ +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * 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/preview/2024-01-01-preview/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,36 +2081,28 @@ 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; -/** Samples for DataVersions CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/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( - 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(); + public static void createOrUpdateWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions().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<>(); @@ -1763,20 +2119,20 @@ public final class DataVersionsCreateOrUpdateSamples { ### DataVersions_Delete ```java -/** Samples for DataVersions Delete. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .dataVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -1784,20 +2140,20 @@ public final class DataVersionsDeleteSamples { ### DataVersions_Get ```java -/** Samples for DataVersions Get. */ +/** + * 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/preview/2024-01-01-preview/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) { - manager - .dataVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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); } } ``` @@ -1805,29 +2161,46 @@ public final class DataVersionsGetSamples { ### DataVersions_List ```java -/** Samples for DataVersions List. */ +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * 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/preview/2024-01-01-preview/examples/Workspace/DataVersionBase/list.json + */ + /** + * Sample code: List Workspace Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions().list("test-rg", "my-aml-workspace", "string", "string", 1, null, "string", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### 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/preview/2024-01-01-preview/examples/Workspace/DataVersionBase/publish.json */ /** - * Sample code: List Data Version Base. - * + * Sample code: Publish Workspace Data Version Base. + * * @param manager Entry point to MachineLearningManager. */ - public static void listDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .dataVersions() - .list( - "test-rg", - "my-aml-workspace", - "string", - "string", - 1, - null, - "string", - null, - com.azure.core.util.Context.NONE); + 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); } } ``` @@ -1847,131 +2220,59 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; -/** Samples for Datastores CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). - * + * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureDataLakeGen1Datastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new ServicePrincipalDatastoreCredentials() - .withAuthorityUrl("string") - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withResourceUrl("string") - .withSecrets( - new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) - .withStoreName("string")) - .withSkipValidation(false) - .create(); + public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores().define("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new AzureDataLakeGen1Datastore().withDescription("string").withTags(mapOf("string", "string")).withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string").withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")).withResourceUrl("string").withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")).withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))).withStoreName("string")).withSkipValidation(false).create(); } /* - * 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/preview/2024-01-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureDataLakeGen2Datastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new ServicePrincipalDatastoreCredentials() - .withAuthorityUrl("string") - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withResourceUrl("string") - .withSecrets( - new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) - .withAccountName("string") - .withEndpoint("string") - .withFilesystem("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores().define("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new AzureDataLakeGen2Datastore().withDescription("string").withTags(mapOf("string", "string")).withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string").withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")).withResourceUrl("string").withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")).withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))).withAccountName("string").withEndpoint("string").withFilesystem("string").withProtocol("string")).withSkipValidation(false).create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). - * + * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDatastoreAzureBlobWAccountKey( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureBlobDatastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .withContainerName("string") - .withEndpoint("core.windows.net") - .withProtocol("https")) - .withSkipValidation(false) - .create(); + public static void createOrUpdateDatastoreAzureBlobWAccountKey(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores().define("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new AzureBlobDatastore().withDescription("string").withTags(mapOf("string", "string")).withCredentials(new AccountKeyDatastoreCredentials().withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))).withAccountName("string").withContainerName("string").withEndpoint("core.windows.net").withProtocol("https")).withSkipValidation(false).create(); } /* - * 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/preview/2024-01-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureFileStoreWAccountKey( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureFileDatastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .withEndpoint("string") - .withFileShareName("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateDatastoreAzureFileStoreWAccountKey(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores().define("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new AzureFileDatastore().withDescription("string").withTags(mapOf("string", "string")).withCredentials(new AccountKeyDatastoreCredentials().withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))).withAccountName("string").withEndpoint("string").withFileShareName("string").withProtocol("string")).withSkipValidation(false).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1988,20 +2289,20 @@ public final class DatastoresCreateOrUpdateSamples { ### Datastores_Delete ```java -/** Samples for Datastores Delete. */ +/** + * 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/preview/2024-01-01-preview/examples/Datastore/delete.json */ /** * Sample code: Delete datastore. - * + * * @param manager Entry point to MachineLearningManager. */ public static void deleteDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + manager.datastores().deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } } ``` @@ -2009,14 +2310,16 @@ public final class DatastoresDeleteSamples { ### Datastores_Get ```java -/** Samples for Datastores Get. */ +/** + * 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/preview/2024-01-01-preview/examples/Datastore/get.json */ /** * Sample code: Get datastore. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -2030,30 +2333,20 @@ public final class DatastoresGetSamples { ```java import java.util.Arrays; -/** Samples for Datastores List. */ +/** + * 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/preview/2024-01-01-preview/examples/Datastore/list.json */ /** * Sample code: List datastores. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listDatastores(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .list( - "test-rg", - "my-aml-workspace", - null, - 1, - false, - Arrays.asList("string"), - "string", - "string", - false, - com.azure.core.util.Context.NONE); + manager.datastores().list("test-rg", "my-aml-workspace", null, 1, false, Arrays.asList("string"), "string", "string", false, com.azure.core.util.Context.NONE); } } ``` @@ -2061,556 +2354,297 @@ public final class DatastoresListSamples { ### Datastores_ListSecrets ```java -/** Samples for Datastores ListSecrets. */ +/** + * 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/preview/2024-01-01-preview/examples/Datastore/listSecrets.json */ /** * Sample code: Get datastore secrets. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getDatastoreSecrets(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .listSecretsWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + manager.datastores().listSecretsWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_CreateOrUpdate +### Endpoint_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointResourceProperties; -/** Samples for EnvironmentContainers CreateOrUpdate. */ -public final class EnvironmentContainersCreateOrUpdateSamples { +/** + * Samples for Endpoint CreateOrUpdate. + */ +public final class EndpointCreateOrUpdateSamples { /* - * 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/preview/2024-01-01-preview/examples/Endpoint/create.json */ /** - * Sample code: CreateOrUpdate Environment Container. - * + * Sample code: Create Endpoint. + * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentContainers() - .define("testEnvironment") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new EnvironmentContainerProperties() - .withDescription("string") - .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .create(); + public static void createEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().define("Azure.OpenAI").withExistingWorkspace("test-rg", "aml-workspace-name").withProperties(new OpenAIEndpointResourceProperties().withAssociatedResourceId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.CognitiveService/account/account-1").withName("Azure.OpenAI")).create(); } +} +``` - @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; +### Endpoint_Get + +```java +/** + * Samples for Endpoint Get. + */ +public final class EndpointGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Endpoint/get.json + */ + /** + * Sample code: Get Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().getWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_Delete +### Endpoint_GetModels ```java -/** Samples for EnvironmentContainers Delete. */ -public final class EnvironmentContainersDeleteSamples { +/** + * Samples for Endpoint GetModels. + */ +public final class EndpointGetModelsSamples { /* - * 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/preview/2024-01-01-preview/examples/Endpoint/getModels.json */ /** - * Sample code: Delete Environment Container. - * + * Sample code: Get Endpoint Models. + * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentContainers() - .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + public static void getEndpointModels(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().getModels("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_Get +### Endpoint_List ```java -/** Samples for EnvironmentContainers Get. */ -public final class EnvironmentContainersGetSamples { +import com.azure.resourcemanager.machinelearning.models.EndpointType; +import java.util.stream.Collectors; + +/** + * Samples for Endpoint List. + */ +public final class EndpointListSamples { /* - * 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/preview/2024-01-01-preview/examples/Endpoint/list.json */ /** - * Sample code: Get Environment Container. - * + * Sample code: List Endpoint. + * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentContainers() - .getWithResponse("testrg123", "testworkspace", "testEnvironment", com.azure.core.util.Context.NONE); + public static void listEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().list("test-rg", "aml-workspace-name", EndpointType.AZURE_OPEN_AI, "skip_string", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_List +### Endpoint_ListKeys ```java -/** Samples for EnvironmentContainers List. */ -public final class EnvironmentContainersListSamples { +/** + * Samples for Endpoint ListKeys. + */ +public final class EndpointListKeysSamples { /* - * 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/preview/2024-01-01-preview/examples/Endpoint/listKeys.json */ /** - * Sample code: List Environment Container. - * + * Sample code: List Endpoint Keys. + * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentContainers() - .list("testrg123", "testworkspace", null, null, com.azure.core.util.Context.NONE); + public static void listEndpointKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().listKeysWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_CreateOrUpdate +### Endpoint_RegenerateKeys ```java -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; +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; +import com.azure.resourcemanager.machinelearning.models.ServiceAccountKeyName; +import java.util.stream.Collectors; -/** Samples for EnvironmentVersions CreateOrUpdate. */ -public final class EnvironmentVersionsCreateOrUpdateSamples { +/** + * Samples for Endpoint RegenerateKeys. + */ +public final class EndpointRegenerateKeysSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/EnvironmentVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateEnvironmentVersion( - 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(); + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Endpoint/regenerateKey.json + */ + /** + * Sample code: Regenerate Endpoint Keys. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void regenerateEndpointKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().regenerateKeysWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", new RegenerateServiceAccountKeyContent().withKeyName(ServiceAccountKeyName.KEY1), com.azure.core.util.Context.NONE); } +} +``` - @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; +### EndpointDeployment_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties; +import java.util.stream.Collectors; + +/** + * Samples for EndpointDeployment CreateOrUpdate. + */ +public final class EndpointDeploymentCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Endpoint/Deployment/create.json + */ + /** + * Sample code: Create Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().define("text-davinci-003").withExistingEndpoint("resourceGroup-1", "testworkspace", "Azure.OpenAI").withProperties(new OpenAIEndpointDeploymentResourceProperties().withModel(new EndpointDeploymentModel().withFormat("OpenAI").withName("text-davinci-003").withVersion("1")).withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)).create(); } } ``` -### EnvironmentVersions_Delete +### EndpointDeployment_Delete ```java -/** Samples for EnvironmentVersions Delete. */ -public final class EnvironmentVersionsDeleteSamples { +/** + * Samples for EndpointDeployment Delete. + */ +public final class EndpointDeploymentDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Endpoint/Deployment/delete.json */ /** - * Sample code: Delete Environment Version. - * + * Sample code: Delete Endpoint Deployment. + * * @param manager Entry point to MachineLearningManager. */ - public static void deleteEnvironmentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void deleteEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().delete("test-rg", "aml-workspace-name", "Azure.OpenAI", "testDeploymentName", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_Get +### EndpointDeployment_Get ```java -/** Samples for EnvironmentVersions Get. */ -public final class EnvironmentVersionsGetSamples { +/** + * Samples for EndpointDeployment Get. + */ +public final class EndpointDeploymentGetSamples { /* - * 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/preview/2024-01-01-preview/examples/Endpoint/Deployment/get.json */ /** - * Sample code: Get Environment Version. - * + * Sample code: Get Endpoint Deployment. + * * @param manager Entry point to MachineLearningManager. */ - public static void getEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void getEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().getWithResponse("resourceGroup-1", "testworkspace", "Azure.OpenAI", "text-davinci-003", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_List +### EndpointDeployment_GetInWorkspace ```java -/** Samples for EnvironmentVersions List. */ -public final class EnvironmentVersionsListSamples { +import com.azure.resourcemanager.machinelearning.models.EndpointType; +import java.util.stream.Collectors; + +/** + * Samples for EndpointDeployment GetInWorkspace. + */ +public final class EndpointDeploymentGetInWorkspaceSamples { /* - * 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/preview/2024-01-01-preview/examples/Endpoint/Deployment/getInWorkspace.json */ /** - * Sample code: List Environment Version. - * + * Sample code: Get Endpoint Deployments In Workspace. + * * @param manager Entry point to MachineLearningManager. */ - public static void listEnvironmentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); + public static void getEndpointDeploymentsInWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().getInWorkspace("resourceGroup-1", "testworkspace", null, null, com.azure.core.util.Context.NONE); } } ``` -### Jobs_Cancel +### EndpointDeployment_List ```java -/** Samples for Jobs Cancel. */ -public final class JobsCancelSamples { +/** + * Samples for EndpointDeployment List. + */ +public final class EndpointDeploymentListSamples { /* - * 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/preview/2024-01-01-preview/examples/Endpoint/Deployment/getDeployments.json */ /** - * Sample code: Cancel Job. - * + * Sample code: Get Endpoint Deployments. + * * @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 getEndpointDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().list("resourceGroup-1", "testworkspace", "Azure.OpenAI", com.azure.core.util.Context.NONE); } } ``` -### Jobs_CreateOrUpdate +### EnvironmentContainers_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 com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; import java.util.HashMap; import java.util.Map; -/** Samples for Jobs CreateOrUpdate. */ -public final class JobsCreateOrUpdateSamples { +/** + * Samples for EnvironmentContainers CreateOrUpdate. + */ +public final class EnvironmentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-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/2022-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/2022-10-01/examples/Job/PipelineJob/createOrUpdate.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/EnvironmentContainer/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/2022-10-01/examples/Job/CommandJob/createOrUpdate.json + * Sample code: CreateOrUpdate Workspace Environment Container. + * + * @param manager Entry point to MachineLearningManager. */ - /** - * 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(); + public static void createOrUpdateWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers().createOrUpdateWithResponse("testrg123", "testworkspace", "testEnvironment", new EnvironmentContainerInner().withProperties(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<>(); @@ -2624,171 +2658,271 @@ public final class JobsCreateOrUpdateSamples { } ``` -### Jobs_Delete +### EnvironmentContainers_Delete ```java -/** Samples for Jobs Delete. */ -public final class JobsDeleteSamples { +/** + * Samples for EnvironmentContainers Delete. + */ +public final class EnvironmentContainersDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/EnvironmentContainer/delete.json */ /** - * Sample code: Delete Job. - * + * Sample code: Delete Workspace Environment Container. + * * @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 deleteWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers().deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); } } ``` -### Jobs_Get +### EnvironmentContainers_Get ```java -/** Samples for Jobs Get. */ -public final class JobsGetSamples { +/** + * Samples for EnvironmentContainers Get. + */ +public final class EnvironmentContainersGetSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/EnvironmentContainer/get.json */ /** - * Sample code: Get Command Job. - * + * Sample code: Get Workspace Environment Container. + * * @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 getWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers().getWithResponse("testrg123", "testworkspace", "testEnvironment", com.azure.core.util.Context.NONE); } +} +``` + +### EnvironmentContainers_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; +/** + * Samples for EnvironmentContainers List. + */ +public final class EnvironmentContainersListSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/EnvironmentContainer/list.json */ /** - * Sample code: Get AutoML Job. - * + * Sample code: List Workspace Environment Container. + * * @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 listWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers().list("testrg123", "testworkspace", null, null, com.azure.core.util.Context.NONE); } +} +``` + +### 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; +import com.azure.resourcemanager.machinelearning.models.Route; +import java.util.HashMap; +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/Job/SweepJob/get.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/EnvironmentVersion/createOrUpdate.json */ /** - * Sample code: Get Sweep Job. - * + * Sample code: CreateOrUpdate Workspace Environment Version. + * * @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 createOrUpdateWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions().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); } - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-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); + // 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_List +### EnvironmentVersions_Delete ```java -/** Samples for Jobs List. */ -public final class JobsListSamples { +/** + * Samples for EnvironmentVersions Delete. + */ +public final class EnvironmentVersionsDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/EnvironmentVersion/delete.json */ /** - * Sample code: List Command Job. - * + * Sample code: Delete Workspace Environment Version. + * * @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, com.azure.core.util.Context.NONE); + public static void deleteWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } +} +``` + +### EnvironmentVersions_Get +```java +/** + * Samples for EnvironmentVersions Get. + */ +public final class EnvironmentVersionsGetSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/EnvironmentVersion/get.json */ /** - * Sample code: List Pipeline Job. - * + * Sample code: Get Workspace Environment Version. + * * @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); + 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); } +} +``` + +### EnvironmentVersions_List +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for EnvironmentVersions List. + */ +public final class EnvironmentVersionsListSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/EnvironmentVersion/list.json */ /** - * Sample code: List Sweep Job. - * + * Sample code: List Workspace Environment Version. + * * @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, com.azure.core.util.Context.NONE); + public static void listWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions().list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, null, com.azure.core.util.Context.NONE); } +} +``` + +### EnvironmentVersions_Publish +```java +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/AutoMLJob/list.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/EnvironmentVersion/publish.json */ /** - * Sample code: List AutoML Job. - * + * Sample code: Publish Workspace Environment 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 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); } } ``` -### ModelContainers_CreateOrUpdate +### Features_Get ```java -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; +/** + * Samples for Features Get. + */ +public final class FeaturesGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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 +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for Features List. + */ +public final class FeaturesListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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 ModelContainers CreateOrUpdate. */ -public final class ModelContainersCreateOrUpdateSamples { +/** + * Samples for FeaturesetContainers CreateOrUpdate. + */ +public final class FeaturesetContainersCreateOrUpdateSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturesetContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Model Container. - * + * Sample code: CreateOrUpdate Workspace Featureset Container. + * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelContainer( - 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(); + 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<>(); @@ -2802,103 +2936,103 @@ public final class ModelContainersCreateOrUpdateSamples { } ``` -### ModelContainers_Delete +### FeaturesetContainers_Delete ```java -/** Samples for ModelContainers Delete. */ -public final class ModelContainersDeleteSamples { +/** + * Samples for FeaturesetContainers Delete. + */ +public final class FeaturesetContainersDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturesetContainer/delete.json */ /** - * Sample code: Delete Model Container. - * + * Sample code: Delete Workspace Featureset Container. + * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .modelContainers() - .deleteWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); + 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); } } ``` -### ModelContainers_Get +### FeaturesetContainers_GetEntity ```java -/** Samples for ModelContainers Get. */ -public final class ModelContainersGetSamples { +/** + * Samples for FeaturesetContainers GetEntity. + */ +public final class FeaturesetContainersGetEntitySamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturesetContainer/getEntity.json */ /** - * Sample code: Get Model Container. - * + * Sample code: GetEntity Workspace Featureset Container. + * * @param manager Entry point to MachineLearningManager. */ - public static void getModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .modelContainers() - .getWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); + 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); } } ``` -### ModelContainers_List +### FeaturesetContainers_List ```java -/** Samples for ModelContainers List. */ -public final class ModelContainersListSamples { +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for FeaturesetContainers List. + */ +public final class FeaturesetContainersListSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturesetContainer/list.json */ /** - * Sample code: List Model Container. - * + * Sample code: List Workspace Featureset 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 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); } } ``` -### ModelVersions_CreateOrUpdate +### FeaturesetVersions_Backfill ```java -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; +import com.azure.resourcemanager.machinelearning.models.FeatureWindow; +import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for ModelVersions CreateOrUpdate. */ -public final class ModelVersionsCreateOrUpdateSamples { +/** + * Samples for FeaturesetVersions Backfill. + */ +public final class FeaturesetVersionsBackfillSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturesetVersion/backfill.json */ /** - * Sample code: CreateOrUpdate Model Version. - * + * Sample code: Backfill Workspace Featureset Version. + * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateModelVersion( - 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(); + 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<>(); @@ -2912,233 +3046,145 @@ public final class ModelVersionsCreateOrUpdateSamples { } ``` -### ModelVersions_Delete +### FeaturesetVersions_CreateOrUpdate ```java -/** Samples for ModelVersions Delete. */ -public final class ModelVersionsDeleteSamples { +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; +import java.util.stream.Collectors; + +/** + * Samples for FeaturesetVersions CreateOrUpdate. + */ +public final class FeaturesetVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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; + } +} +``` + +### FeaturesetVersions_Delete + +```java +/** + * Samples for FeaturesetVersions Delete. + */ +public final class FeaturesetVersionsDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturesetVersion/delete.json */ /** - * Sample code: Delete Model Version. - * + * Sample code: Delete Workspace Featureset Version. + * * @param manager Entry point to MachineLearningManager. */ - public static void deleteModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .modelVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "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); } } ``` -### ModelVersions_Get +### FeaturesetVersions_Get ```java -/** Samples for ModelVersions Get. */ -public final class ModelVersionsGetSamples { +/** + * Samples for FeaturesetVersions Get. + */ +public final class FeaturesetVersionsGetSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturesetVersion/get.json */ /** - * Sample code: Get Model Version. - * + * Sample code: Get Workspace Featureset Version. + * * @param manager Entry point to MachineLearningManager. */ - public static void getModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .modelVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "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); } } ``` -### ModelVersions_List +### FeaturesetVersions_List ```java -/** Samples for ModelVersions List. */ -public final class ModelVersionsListSamples { +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for FeaturesetVersions List. + */ +public final class FeaturesetVersionsListSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturesetVersion/list.json */ /** - * Sample code: List Model Version. - * + * Sample code: List Workspace Featureset Version. + * * @param manager Entry point to MachineLearningManager. */ - public static void listModelVersion(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); + 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); } } ``` -### OnlineDeployments_CreateOrUpdate +### FeaturestoreEntityContainers_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.FeaturestoreEntityContainerProperties; import java.util.HashMap; import java.util.Map; -/** Samples for OnlineDeployments CreateOrUpdate. */ -public final class OnlineDeploymentsCreateOrUpdateSamples { +/** + * Samples for FeaturestoreEntityContainers CreateOrUpdate. + */ +public final class FeaturestoreEntityContainersCreateOrUpdateSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturestoreEntityContainer/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/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * Sample code: CreateOrUpdate Workspace Featurestore Entity Container. + * + * @param manager Entry point to MachineLearningManager. */ - /** - * 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(); + 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<>(); @@ -3152,322 +3198,210 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { } ``` -### OnlineDeployments_Delete +### FeaturestoreEntityContainers_Delete ```java -/** Samples for OnlineDeployments Delete. */ -public final class OnlineDeploymentsDeleteSamples { +/** + * Samples for FeaturestoreEntityContainers Delete. + */ +public final class FeaturestoreEntityContainersDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturestoreEntityContainer/delete.json */ /** - * Sample code: Delete Online Deployment. - * + * Sample code: Delete Workspace Featurestore Entity Container. + * * @param manager Entry point to MachineLearningManager. */ - public static void deleteOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .delete("testrg123", "workspace123", "testEndpoint", "testDeployment", 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); } } ``` -### OnlineDeployments_Get +### FeaturestoreEntityContainers_GetEntity ```java -/** 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 - */ - /** - * 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); - } - +/** + * Samples for FeaturestoreEntityContainers GetEntity. + */ +public final class FeaturestoreEntityContainersGetEntitySamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json */ /** - * Sample code: Get Managed Online Deployment. - * + * Sample code: GetEntity Workspace Featurestore Entity Container. + * * @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); + 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); } } ``` -### OnlineDeployments_GetLogs +### FeaturestoreEntityContainers_List ```java -import com.azure.resourcemanager.machinelearning.models.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; -/** Samples for OnlineDeployments GetLogs. */ -public final class OnlineDeploymentsGetLogsSamples { +/** + * Samples for FeaturestoreEntityContainers List. + */ +public final class FeaturestoreEntityContainersListSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturestoreEntityContainer/list.json */ /** - * Sample code: Get Online Deployment Logs. - * + * Sample code: List Workspace Featurestore Entity Container. + * * @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); + 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); } } ``` -### OnlineDeployments_List +### FeaturestoreEntityVersions_CreateOrUpdate ```java -/** Samples for OnlineDeployments List. */ -public final class OnlineDeploymentsListSamples { +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; +import java.util.stream.Collectors; + +/** + * Samples for FeaturestoreEntityVersions CreateOrUpdate. + */ +public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json */ /** - * Sample code: List Online Deployments. - * + * Sample code: CreateOrUpdate Workspace Featurestore Entity Version. + * * @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); + 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; } } ``` -### OnlineDeployments_ListSkus +### FeaturestoreEntityVersions_Delete ```java -/** Samples for OnlineDeployments ListSkus. */ -public final class OnlineDeploymentsListSkusSamples { +/** + * Samples for FeaturestoreEntityVersions Delete. + */ +public final class FeaturestoreEntityVersionsDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturestoreEntityVersion/delete.json */ /** - * Sample code: List Managed Online Deployment Skus. - * + * Sample code: Delete Workspace Featurestore Entity Version. + * * @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); + 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/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/FeaturestoreEntityVersion/get.json */ /** - * Sample code: List Kubernetes Online Deployment Skus. - * + * Sample code: Get Workspace Featurestore Entity Version. + * * @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); + 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); } } ``` -### OnlineDeployments_Update +### FeaturestoreEntityVersions_List ```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; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; -/** Samples for OnlineDeployments Update. */ -public final class OnlineDeploymentsUpdateSamples { +/** + * Samples for FeaturestoreEntityVersions List. + */ +public final class FeaturestoreEntityVersionsListSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/FeaturestoreEntityVersion/list.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/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * Sample code: List Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. */ - /** - * 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(); - } - - @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; + 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); } } ``` -### OnlineEndpoints_CreateOrUpdate +### InferenceEndpoints_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; +import com.azure.resourcemanager.machinelearning.models.AuthMode; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties; 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; +import java.util.stream.Collectors; -/** Samples for OnlineEndpoints CreateOrUpdate. */ -public final class OnlineEndpointsCreateOrUpdateSamples { +/** + * Samples for InferenceEndpoints CreateOrUpdate. + */ +public final class InferenceEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineEndpoint/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateOnlineEndpoint( - 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(); + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/InferenceEndpoint/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints().define("testEndpointName").withRegion("string").withExistingInferencePool("test-rg1", "my-aml-workspace", "string").withProperties(new InferenceEndpointProperties().withDescription("string").withProperties(mapOf("string", "string")).withAuthMode(AuthMode.AAD).withGroupId("string")).withTags(mapOf()).withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED).withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))).withKind("string").withSku(new Sku().withName("string").withTier(SkuTier.STANDARD).withSize("string").withFamily("string").withCapacity(1)).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -3481,200 +3415,127 @@ public final class OnlineEndpointsCreateOrUpdateSamples { } ``` -### OnlineEndpoints_Delete - -```java -/** 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 - */ - /** - * Sample code: Delete Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineEndpoints() - .delete("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); - } -} -``` - -### OnlineEndpoints_Get +### InferenceEndpoints_Delete ```java -/** Samples for OnlineEndpoints Get. */ -public final class OnlineEndpointsGetSamples { +/** + * Samples for InferenceEndpoints Delete. + */ +public final class InferenceEndpointsDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceEndpoint/delete.json */ /** - * Sample code: Get Online Endpoint. - * + * Sample code: Delete Workspace Inference Endpoint. + * * @param manager Entry point to MachineLearningManager. */ - public static void getOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints().delete("test-rg", "my-aml-workspace", "string", "testEndpointName", com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_GetToken +### InferenceEndpoints_Get ```java -/** Samples for OnlineEndpoints GetToken. */ -public final class OnlineEndpointsGetTokenSamples { +/** + * Samples for InferenceEndpoints Get. + */ +public final class InferenceEndpointsGetSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceEndpoint/get.json */ /** - * Sample code: GetToken Online Endpoint. - * + * Sample code: Get Workspace Inference Endpoint. + * * @param manager Entry point to MachineLearningManager. */ - public static void getTokenOnlineEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineEndpoints() - .getTokenWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + public static void getWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints().getWithResponse("test-rg", "my-aml-workspace", "string", "testEndpointName", com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_List +### InferenceEndpoints_List ```java -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; import com.azure.resourcemanager.machinelearning.models.OrderString; +import java.util.stream.Collectors; -/** 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 - */ - /** - * Sample code: List Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listOnlineEndpoint(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 { +/** + * Samples for InferenceEndpoints List. + */ +public final class InferenceEndpointsListSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceEndpoint/list.json */ /** - * Sample code: ListKeys Online Endpoint. - * + * Sample code: List Workspace Inference Endpoint. + * * @param manager Entry point to MachineLearningManager. */ - public static void listKeysOnlineEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineEndpoints() - .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + public static void listWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints().list("test-rg", "my-aml-workspace", "string", 1, null, "string", "string", OrderString.CREATED_AT_ASC, com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_RegenerateKeys +### InferenceEndpoints_Update ```java -import com.azure.resourcemanager.machinelearning.models.KeyType; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; -/** Samples for OnlineEndpoints RegenerateKeys. */ -public final class OnlineEndpointsRegenerateKeysSamples { +/** + * Samples for InferenceEndpoints Update. + */ +public final class InferenceEndpointsUpdateSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceEndpoint/update.json */ /** - * Sample code: RegenerateKeys Online Endpoint. - * + * Sample code: Update Workspace Inference Endpoint. + * * @param manager Entry point to MachineLearningManager. */ - public static void regenerateKeysOnlineEndpoint( - 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); + public static void updateWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager.inferenceEndpoints().update("test-rg", "my-aml-workspace", "string", "testEndpointName", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"tags\":{}}", Object.class, SerializerEncoding.JSON), com.azure.core.util.Context.NONE); } } ``` -### OnlineEndpoints_Update +### InferenceGroups_CreateOrUpdate ```java -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; 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.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for OnlineEndpoints Update. */ -public final class OnlineEndpointsUpdateSamples { +/** + * Samples for InferenceGroups CreateOrUpdate. + */ +public final class InferenceGroupsCreateOrUpdateSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceGroup/createOrUpdate.json */ /** - * Sample code: Update Online Endpoint. - * + * Sample code: CreateOrUpdate Workspace Inference Group. + * * @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 createOrUpdateWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().define("string").withRegion("string").withExistingInferencePool("test-rg", "my-aml-workspace", "string").withProperties(new InferenceGroupProperties().withDescription("string").withProperties(mapOf("string", "string")).withBonusExtraCapacity(1).withMetadata("string").withPriority(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<>(); @@ -3688,202 +3549,3452 @@ public final class OnlineEndpointsUpdateSamples { } ``` -### Operations_List +### InferenceGroups_Delete ```java -/** Samples for Operations List. */ -public final class OperationsListSamples { +/** + * Samples for InferenceGroups Delete. + */ +public final class InferenceGroupsDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceGroup/delete.json */ /** - * Sample code: OperationsList. - * + * Sample code: Delete Workspace Inference Group. + * * @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 deleteWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_CreateOrUpdate +### InferenceGroups_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 InferenceGroups Get. + */ +public final class InferenceGroupsGetSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceGroup/get.json */ /** - * Sample code: WorkspacePutPrivateEndpointConnection. - * + * Sample code: Get Workspace Inference Group. + * * @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(); + public static void getWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_Delete +### InferenceGroups_GetStatus ```java -/** Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsDeleteSamples { +/** + * Samples for InferenceGroups GetStatus. + */ +public final class InferenceGroupsGetStatusSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceGroup/getStatus.json */ /** - * Sample code: WorkspaceDeletePrivateEndpointConnection. - * + * Sample code: GetStatus Workspace Inference Group. + * * @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); + public static void getStatusWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().getStatusWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_Get +### InferenceGroups_List ```java -/** Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionsGetSamples { +import com.azure.resourcemanager.machinelearning.models.OrderString; +import java.util.stream.Collectors; + +/** + * Samples for InferenceGroups List. + */ +public final class InferenceGroupsListSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceGroup/list.json */ /** - * Sample code: WorkspaceGetPrivateEndpointConnection. - * + * Sample code: List Workspace Inference Group. + * * @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); + public static void listWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().list("test-rg", "my-aml-workspace", "string", 1, null, "string", "string", OrderString.CREATED_AT_DESC, com.azure.core.util.Context.NONE); } } ``` -### PrivateEndpointConnections_List +### InferenceGroups_ListSkus ```java -/** Samples for PrivateEndpointConnections List. */ -public final class PrivateEndpointConnectionsListSamples { +/** + * Samples for InferenceGroups ListSkus. + */ +public final class InferenceGroupsListSkusSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceGroup/listSkus.json */ /** - * Sample code: StorageAccountListPrivateEndpointConnections. - * + * Sample code: ListSkus Workspace Inference Group. + * * @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); + public static void listSkusWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().listSkus("test-rg", "my-aml-workspace", "string", "string", 1, null, com.azure.core.util.Context.NONE); } } ``` -### PrivateLinkResources_List +### InferenceGroups_Update ```java -/** Samples for PrivateLinkResources List. */ -public final class PrivateLinkResourcesListSamples { +import com.azure.resourcemanager.machinelearning.models.InferenceGroup; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for InferenceGroups Update. + */ +public final class InferenceGroupsUpdateSamples { /* - * 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/preview/2024-01-01-preview/examples/Workspace/InferenceGroup/update.json */ /** - * Sample code: WorkspaceListPrivateLinkResources. - * + * Sample code: Update Workspace Inference Group. + * * @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); + public static void updateWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + InferenceGroup resource = manager.inferenceGroups().getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf()).withSku(new PartialSku().withCapacity(1).withFamily("string").withName("string").withSize("string").withTier(SkuTier.STANDARD)).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; + } +} +``` + +### InferencePools_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; +import com.azure.resourcemanager.machinelearning.models.InferencePoolProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PoolEnvironmentConfiguration; +import com.azure.resourcemanager.machinelearning.models.PoolModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.ProbeSettings; +import com.azure.resourcemanager.machinelearning.models.RequestConfiguration; +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; +import java.util.stream.Collectors; + +/** + * Samples for InferencePools CreateOrUpdate. + */ +public final class InferencePoolsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/InferencePool/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().define("string").withRegion("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new InferencePoolProperties().withDescription("string").withProperties(mapOf("string", "string")).withCodeConfiguration(new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")).withEnvironmentConfiguration(new PoolEnvironmentConfiguration().withEnvironmentId("string").withEnvironmentVariables(mapOf("string", "string")).withLivenessProbe(new ProbeSettings().withFailureThreshold(1).withInitialDelay(Duration.parse("PT5M")).withPeriod(Duration.parse("PT5M")).withSuccessThreshold(1).withTimeout(Duration.parse("PT5M"))).withReadinessProbe(new ProbeSettings().withFailureThreshold(1).withInitialDelay(Duration.parse("PT5M")).withPeriod(Duration.parse("PT5M")).withSuccessThreshold(1).withTimeout(Duration.parse("PT5M"))).withStartupProbe(new ProbeSettings().withFailureThreshold(1).withInitialDelay(Duration.parse("PT5M")).withPeriod(Duration.parse("PT5M")).withSuccessThreshold(1).withTimeout(Duration.parse("PT5M")))).withModelConfiguration(new PoolModelConfiguration().withModelId("string")).withNodeSkuType("string").withRequestConfiguration(new RequestConfiguration().withMaxConcurrentRequestsPerInstance(1).withRequestTimeout(Duration.parse("PT5M")))).withTags(mapOf()).withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_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; + } +} +``` + +### InferencePools_Delete + +```java +/** + * Samples for InferencePools Delete. + */ +public final class InferencePoolsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/InferencePool/delete.json + */ + /** + * Sample code: Delete Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### InferencePools_Get + +```java +/** + * Samples for InferencePools Get. + */ +public final class InferencePoolsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/InferencePool/get.json + */ + /** + * Sample code: Get Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### InferencePools_GetStatus + +```java +/** + * Samples for InferencePools GetStatus. + */ +public final class InferencePoolsGetStatusSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/InferencePool/getStatus.json + */ + /** + * Sample code: GetStatus Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getStatusWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().getStatusWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### InferencePools_List + +```java +import com.azure.resourcemanager.machinelearning.models.OrderString; +import java.util.stream.Collectors; + +/** + * Samples for InferencePools List. + */ +public final class InferencePoolsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/InferencePool/list.json + */ + /** + * Sample code: List Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().list("test-rg", "my-aml-workspace", 1, null, "string", "string", OrderString.UPDATED_AT_ASC, com.azure.core.util.Context.NONE); + } +} +``` + +### InferencePools_ListSkus + +```java +/** + * Samples for InferencePools ListSkus. + */ +public final class InferencePoolsListSkusSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/InferencePool/listSkus.json + */ + /** + * Sample code: ListSkus Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listSkusWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().listSkus("test-rg", "my-aml-workspace", "string", 1, null, com.azure.core.util.Context.NONE); + } +} +``` + +### InferencePools_Update + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.InferencePool; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for InferencePools Update. + */ +public final class InferencePoolsUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/InferencePool/update.json + */ + /** + * Sample code: Update Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + InferencePool resource = manager.inferencePools().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf()).withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON)))).withSku(new PartialSku().withCapacity(1).withFamily("string").withName("string").withSize("string").withTier(SkuTier.STANDARD)).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; + } +} +``` + +### Jobs_Cancel + +```java +/** + * Samples for Jobs Cancel. + */ +public final class JobsCancelSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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.AllNodes; +import com.azure.resourcemanager.machinelearning.models.AmlToken; +import com.azure.resourcemanager.machinelearning.models.AutologgerSettings; +import com.azure.resourcemanager.machinelearning.models.CommandJob; +import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; +import com.azure.resourcemanager.machinelearning.models.CustomModelFineTuning; +import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; +import com.azure.resourcemanager.machinelearning.models.FineTuningJob; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; +import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; +import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobService; +import com.azure.resourcemanager.machinelearning.models.JobTier; +import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; +import com.azure.resourcemanager.machinelearning.models.MLFlowAutologgerState; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; +import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; +import com.azure.resourcemanager.machinelearning.models.PipelineJob; +import com.azure.resourcemanager.machinelearning.models.QueueSettings; +import com.azure.resourcemanager.machinelearning.models.TensorFlow; +import com.azure.resourcemanager.machinelearning.models.UriFileJobInput; +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; +import java.util.stream.Collectors; + +/** + * Samples for Jobs CreateOrUpdate. + */ +public final class JobsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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 CommandJob().withDescription("string").withProperties(mapOf("string", "string")).withTags(mapOf("string", "string")).withComponentId("string").withComputeId("string").withDisplayName("string").withExperimentName("string").withIdentity(new AmlToken()).withIsArchived(false).withNotificationSetting(new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED)).withEmails(Arrays.asList("string"))).withServices(mapOf("string", new JobService().withEndpoint("string").withJobServiceType("string").withNodes(new AllNodes()).withPort(1).withProperties(mapOf("string", "string")))).withAutologgerSettings(new AutologgerSettings().withMlflowAutologger(MLFlowAutologgerState.DISABLED)).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").withAssetName("string").withAssetVersion("string").withMode(OutputDeliveryMode.DIRECT).withUri("string"))).withQueueSettings(new QueueSettings().withJobTier(JobTier.PREMIUM).withPriority(1)).withResources(new JobResourceConfiguration().withInstanceCount(1).withInstanceType("string").withLocations(Arrays.asList("string")).withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"f69c8d5a-9b39-4183-92d3-a2b18944cf95\":null}", Object.class, SerializerEncoding.JSON))).withDockerArgs("string").withShmSize("2g"))).create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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 CommandJob().withDescription("string").withProperties(mapOf("string", "string")).withTags(mapOf("string", "string")).withComponentId("string").withComputeId("string").withDisplayName("string").withExperimentName("string").withIdentity(new AmlToken()).withIsArchived(false).withNotificationSetting(new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED)).withEmails(Arrays.asList("string"))).withServices(mapOf("string", new JobService().withEndpoint("string").withJobServiceType("string").withNodes(new AllNodes()).withPort(1).withProperties(mapOf("string", "string")))).withAutologgerSettings(new AutologgerSettings().withMlflowAutologger(MLFlowAutologgerState.DISABLED)).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").withAssetName("string").withAssetVersion("string").withMode(OutputDeliveryMode.READ_WRITE_MOUNT).withUri("string"))).withQueueSettings(new QueueSettings().withJobTier(JobTier.BASIC).withPriority(1)).withResources(new JobResourceConfiguration().withInstanceCount(1).withInstanceType("string").withLocations(Arrays.asList("string")).withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"5fc1f627-491e-45a0-a6a2-f5b4be884911\":null}", Object.class, SerializerEncoding.JSON))).withDockerArgs("string").withShmSize("2g"))).create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/examples/Job/FineTuningJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().define("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new FineTuningJob().withExperimentName("llm-finetuning").withFineTuningDetails(new CustomModelFineTuning().withModel(new MLFlowModelJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT).withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11")).withTaskType(FineTuningTaskType.TEXT_COMPLETION).withTrainingData(new UriFileJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT).withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11"))).withOutputs(mapOf("string", new MLFlowModelJobOutput().withDescription("string").withAssetName("string").withAssetVersion("string").withMode(OutputDeliveryMode.READ_WRITE_MOUNT).withUri("string")))).create(); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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")).withComponentId("string").withComputeId("string").withDisplayName("string").withExperimentName("string").withIdentity(new AmlToken()).withIsArchived(false).withNotificationSetting(new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED)).withEmails(Arrays.asList("string"))).withServices(mapOf("string", new JobService().withEndpoint("string").withJobServiceType("string").withNodes(new AllNodes()).withPort(1).withProperties(mapOf("string", "string")))).withAutologgerSettings(new AutologgerSettings().withMlflowAutologger(MLFlowAutologgerState.DISABLED)).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").withAssetName("string").withAssetVersion("string").withMode(OutputDeliveryMode.UPLOAD).withUri("string"))).withQueueSettings(new QueueSettings().withJobTier(JobTier.BASIC).withPriority(1)).withResources(new JobResourceConfiguration().withInstanceCount(1).withInstanceType("string").withLocations(Arrays.asList("string")).withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"c9ac10d0-915b-4de5-afe8-a4c78a37a558\":null}", Object.class, SerializerEncoding.JSON))).withDockerArgs("string").withShmSize("2g"))).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/preview/2024-01-01-preview/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", "string", 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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Job/FineTuningJob/get.json + */ + /** + * Sample code: Get FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Jobs_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for Jobs List. + */ +public final class JobsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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", ListViewType.ACTIVE_ONLY, null, "string", false, "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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, null, null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Job/FineTuningJob/list.json + */ + /** + * Sample code: List FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().list("test-rg", "my-aml-workspace", null, "string", "string", ListViewType.ALL, null, "string", false, "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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", ListViewType.ACTIVE_ONLY, null, "string", false, "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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, "string", "string", ListViewType.ALL, null, "string", false, "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Jobs_Update + +```java +import com.azure.resourcemanager.machinelearning.models.AzureDevOpsWebhook; +import com.azure.resourcemanager.machinelearning.models.JobBase; +import com.azure.resourcemanager.machinelearning.models.PartialJobBase; +import com.azure.resourcemanager.machinelearning.models.PartialNotificationSetting; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Jobs Update. + */ +public final class JobsUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Job/update.json + */ + /** + * Sample code: Update Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + JobBase resource = manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE).getValue(); + resource.update().withProperties(new PartialJobBase().withNotificationSetting(new PartialNotificationSetting().withWebhooks(mapOf("string", new AzureDevOpsWebhook().withEventType("string"))))).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; + } +} +``` + +### LabelingJobs_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; +import com.azure.resourcemanager.machinelearning.models.LabelCategory; +import com.azure.resourcemanager.machinelearning.models.LabelClass; +import com.azure.resourcemanager.machinelearning.models.LabelingJobImageProperties; +import com.azure.resourcemanager.machinelearning.models.LabelingJobInstructions; +import com.azure.resourcemanager.machinelearning.models.MLAssistConfigurationEnabled; +import com.azure.resourcemanager.machinelearning.models.MultiSelect; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for LabelingJobs CreateOrUpdate. + */ +public final class LabelingJobsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/LabelingJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().define("testLabelingJob").withExistingWorkspace("workspace-1234", "testworkspace").withProperties(new LabelingJobPropertiesInner().withDescription("string").withProperties(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")).withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")).withJobInstructions(new LabelingJobInstructions().withUri("link/to/instructions")).withLabelCategories(mapOf("myCategory1", new LabelCategory().withClasses(mapOf("myLabelClass1", new LabelClass().withDisplayName("myLabelClass1").withSubclasses(mapOf()), "myLabelClass2", new LabelClass().withDisplayName("myLabelClass2").withSubclasses(mapOf()))).withDisplayName("myCategory1Title").withMultiSelect(MultiSelect.DISABLED), "myCategory2", new LabelCategory().withClasses(mapOf("myLabelClass1", new LabelClass().withDisplayName("myLabelClass1").withSubclasses(mapOf()), "myLabelClass2", new LabelClass().withDisplayName("myLabelClass2").withSubclasses(mapOf()))).withDisplayName("myCategory2Title").withMultiSelect(MultiSelect.DISABLED))).withLabelingJobMediaProperties(new LabelingJobImageProperties()).withMlAssistConfiguration(new MLAssistConfigurationEnabled().withInferencingComputeBinding("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute").withTrainingComputeBinding("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute"))).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; + } +} +``` + +### LabelingJobs_Delete + +```java +/** + * Samples for LabelingJobs Delete. + */ +public final class LabelingJobsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/LabelingJob/delete.json + */ + /** + * Sample code: Delete Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().deleteWithResponse("workspace-1234", "testworkspace", "testLabelingJob", com.azure.core.util.Context.NONE); + } +} +``` + +### LabelingJobs_ExportLabels + +```java +import com.azure.resourcemanager.machinelearning.models.DatasetExportSummary; + +/** + * Samples for LabelingJobs ExportLabels. + */ +public final class LabelingJobsExportLabelsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/LabelingJob/exportLabels.json + */ + /** + * Sample code: ExportLabels Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void exportLabelsLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().exportLabels("workspace-1234", "testworkspace", "testLabelingJob", new DatasetExportSummary(), com.azure.core.util.Context.NONE); + } +} +``` + +### LabelingJobs_Get + +```java +/** + * Samples for LabelingJobs Get. + */ +public final class LabelingJobsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/LabelingJob/get.json + */ + /** + * Sample code: Get Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().getWithResponse("workspace-1234", "testworkspace", "testLabelingJob", com.azure.core.util.Context.NONE); + } +} +``` + +### LabelingJobs_List + +```java +/** + * Samples for LabelingJobs List. + */ +public final class LabelingJobsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/LabelingJob/list.json + */ + /** + * Sample code: List Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().list("workspace-1234", "testworkspace", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### LabelingJobs_Pause + +```java +/** + * Samples for LabelingJobs Pause. + */ +public final class LabelingJobsPauseSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/LabelingJob/pause.json + */ + /** + * Sample code: Pause Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void pauseLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().pauseWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### LabelingJobs_Resume + +```java +/** + * Samples for LabelingJobs Resume. + */ +public final class LabelingJobsResumeSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/LabelingJob/resume.json + */ + /** + * Sample code: Resume Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void resumeLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().resume("test-rg", "my-aml-workspace", "string", 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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for ManagedNetworkSettingsRule CreateOrUpdate. + */ +public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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-1").withExistingWorkspace("test-rg", "aml-workspace-name").withProperties(new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.ACTIVE).withDestination("some_string")).create(); + } +} +``` + +### ManagedNetworkSettingsRule_Delete + +```java +/** + * Samples for ManagedNetworkSettingsRule Delete. + */ +public final class ManagedNetworkSettingsRuleDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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", "some_string", 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/preview/2024-01-01-preview/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", "rule-1", 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/preview/2024-01-01-preview/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); + } +} +``` + +### MarketplaceSubscriptions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; + +/** + * Samples for MarketplaceSubscriptions CreateOrUpdate. + */ +public final class MarketplaceSubscriptionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/MarketplaceSubscription/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Marketplace Subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceMarketplaceSubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.marketplaceSubscriptions().define("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new MarketplaceSubscriptionProperties().withModelId("string")).create(); + } +} +``` + +### MarketplaceSubscriptions_Delete + +```java +/** + * Samples for MarketplaceSubscriptions Delete. + */ +public final class MarketplaceSubscriptionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/MarketplaceSubscription/delete.json + */ + /** + * Sample code: Delete Workspace Marketplace Subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceMarketplaceSubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.marketplaceSubscriptions().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### MarketplaceSubscriptions_Get + +```java +/** + * Samples for MarketplaceSubscriptions Get. + */ +public final class MarketplaceSubscriptionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/MarketplaceSubscription/get.json + */ + /** + * Sample code: Get Workspace Marketplace Subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceMarketplaceSubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.marketplaceSubscriptions().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### MarketplaceSubscriptions_List + +```java +/** + * Samples for MarketplaceSubscriptions List. + */ +public final class MarketplaceSubscriptionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/MarketplaceSubscription/list.json + */ + /** + * Sample code: List Workspace Marketplace Subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceMarketplaceSubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.marketplaceSubscriptions().list("test-rg", "my-aml-workspace", null, 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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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 +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for ModelContainers List. + */ +public final class ModelContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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 +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for ModelVersions List. + */ +public final class ModelVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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, null, com.azure.core.util.Context.NONE); + } +} +``` + +### ModelVersions_PackageMethod + +```java +import com.azure.resourcemanager.machinelearning.models.AzureMLBatchInferencingServer; +import com.azure.resourcemanager.machinelearning.models.BaseEnvironmentId; +import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelPackageInput; +import com.azure.resourcemanager.machinelearning.models.PackageInputDeliveryMode; +import com.azure.resourcemanager.machinelearning.models.PackageInputPathUrl; +import com.azure.resourcemanager.machinelearning.models.PackageInputType; +import com.azure.resourcemanager.machinelearning.models.PackageRequest; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for ModelVersions PackageMethod. + */ +public final class ModelVersionsPackageMethodSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/ModelVersion/package.json + */ + /** + * Sample code: Package Workspace Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void packageWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.modelVersions().packageMethod("test-rg", "my-aml-workspace", "string", "string", new PackageRequest().withBaseEnvironmentSource(new BaseEnvironmentId().withResourceId("string")).withEnvironmentVariables(mapOf("string", "string")).withInferencingServer(new AzureMLBatchInferencingServer().withCodeConfiguration(new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string"))).withInputs(Arrays.asList(new ModelPackageInput().withInputType(PackageInputType.URI_FILE).withMode(PackageInputDeliveryMode.DOWNLOAD).withMountPath("string").withPath(new PackageInputPathUrl().withUrl("string")))).withModelConfiguration(new ModelConfiguration().withMode(PackageInputDeliveryMode.fromString("ReadOnlyMount")).withMountPath("string")).withTags(mapOf("string", "string")).withTargetEnvironmentId("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_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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for OnlineDeployments CreateOrUpdate. + */ +public final class OnlineDeploymentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for OnlineDeployments GetLogs. + */ +public final class OnlineDeploymentsGetLogsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for OnlineDeployments Update. + */ +public final class OnlineDeploymentsUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for OnlineEndpoints CreateOrUpdate. + */ +public final class OnlineEndpointsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for OnlineEndpoints List. + */ +public final class OnlineEndpointsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for OnlineEndpoints RegenerateKeys. + */ +public final class OnlineEndpointsRegenerateKeysSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for OnlineEndpoints Update. + */ +public final class OnlineEndpointsUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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.EndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; +import java.util.stream.Collectors; + +/** + * Samples for PrivateEndpointConnections CreateOrUpdate. + */ +public final class PrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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().withDescription("Auto-Approved").withStatus(EndpointServiceConnectionStatus.APPROVED)).create(); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/PrivateEndpointConnection/delete.json + */ + /** + * Sample code: WorkspacePutPrivateEndpointConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void workspacePutPrivateEndpointConnection(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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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().list("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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for Quotas Update. + */ +public final class QuotasUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for Registries CreateOrUpdate. + */ +public final class RegistriesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for Registries RemoveRegions. + */ +public final class RegistriesRemoveRegionsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for Registries Update. + */ +public final class RegistriesUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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/preview/2024-01-01-preview/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; +import java.util.stream.Collectors; + +/** + * Samples for RegistryCodeVersions CreateOrGetStartPendingUpload. + */ +public final class RegistryCodeVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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.NONE), 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/preview/2024-01-01-preview/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 RegistryCodeVersions Delete. + */ +public final class RegistryCodeVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryCodeVersions_Get + +```java +/** + * Samples for RegistryCodeVersions Get. + */ +public final class RegistryCodeVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryCodeVersions_List + +```java +/** + * Samples for RegistryCodeVersions List. + */ +public final class RegistryCodeVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryComponentContainers_CreateOrUpdate + +```java +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/preview/2024-01-01-preview/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; + } +} +``` + +### RegistryComponentContainers_Delete + +```java +/** + * Samples for RegistryComponentContainers Delete. + */ +public final class RegistryComponentContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryComponentContainers_Get + +```java +/** + * Samples for RegistryComponentContainers Get. + */ +public final class RegistryComponentContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryComponentContainers_List + +```java +/** + * Samples for RegistryComponentContainers List. + */ +public final class RegistryComponentContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryComponentVersions_CreateOrUpdate + +```java +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/preview/2024-01-01-preview/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; + } +} +``` + +### RegistryComponentVersions_Delete + +```java +/** + * Samples for RegistryComponentVersions Delete. + */ +public final class RegistryComponentVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryComponentVersions_Get + +```java +/** + * Samples for RegistryComponentVersions Get. + */ +public final class RegistryComponentVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryComponentVersions_List + +```java +/** + * Samples for RegistryComponentVersions List. + */ +public final class RegistryComponentVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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, null, com.azure.core.util.Context.NONE); + } +} +``` + +### RegistryDataContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; +import com.azure.resourcemanager.machinelearning.models.DataType; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for RegistryDataContainers CreateOrUpdate. + */ +public final class RegistryDataContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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; + } +} +``` + +### RegistryDataContainers_Delete + +```java +/** + * Samples for RegistryDataContainers Delete. + */ +public final class RegistryDataContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryDataContainers_Get + +```java +/** + * Samples for RegistryDataContainers Get. + */ +public final class RegistryDataContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryDataContainers_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for RegistryDataContainers List. + */ +public final class RegistryDataContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryDataReferences_GetBlobReferenceSas + +```java +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/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryDataVersions_CreateOrGetStartPendingUpload + +```java +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; +import java.util.stream.Collectors; + +/** + * Samples for RegistryDataVersions CreateOrGetStartPendingUpload. + */ +public final class RegistryDataVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryDataVersions_CreateOrUpdate + +```java +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/preview/2024-01-01-preview/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; + } +} +``` + +### RegistryDataVersions_Delete + +```java +/** + * Samples for RegistryDataVersions Delete. + */ +public final class RegistryDataVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryDataVersions_Get + +```java +/** + * Samples for RegistryDataVersions Get. + */ +public final class RegistryDataVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryDataVersions_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for RegistryDataVersions List. + */ +public final class RegistryDataVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryEnvironmentContainers_CreateOrUpdate + +```java +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/preview/2024-01-01-preview/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; + } +} +``` + +### RegistryEnvironmentContainers_Delete + +```java +/** + * Samples for RegistryEnvironmentContainers Delete. + */ +public final class RegistryEnvironmentContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryEnvironmentContainers_Get + +```java +/** + * Samples for RegistryEnvironmentContainers Get. + */ +public final class RegistryEnvironmentContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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 +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for RegistryEnvironmentContainers List. + */ +public final class RegistryEnvironmentContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryEnvironmentVersions_CreateOrUpdate + +```java +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/preview/2024-01-01-preview/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; + } +} +``` + +### RegistryEnvironmentVersions_Delete + +```java +/** + * Samples for RegistryEnvironmentVersions Delete. + */ +public final class RegistryEnvironmentVersionsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryEnvironmentVersions_Get + +```java +/** + * Samples for RegistryEnvironmentVersions Get. + */ +public final class RegistryEnvironmentVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryEnvironmentVersions_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for RegistryEnvironmentVersions List. + */ +public final class RegistryEnvironmentVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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, null, com.azure.core.util.Context.NONE); + } +} +``` + +### RegistryModelContainers_CreateOrUpdate + +```java +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/preview/2024-01-01-preview/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; + } +} +``` + +### RegistryModelContainers_Delete + +```java +/** + * Samples for RegistryModelContainers Delete. + */ +public final class RegistryModelContainersDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryModelContainers_Get + +```java +/** + * Samples for RegistryModelContainers Get. + */ +public final class RegistryModelContainersGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryModelContainers_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for RegistryModelContainers List. + */ +public final class RegistryModelContainersListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryModelVersions_CreateOrGetStartPendingUpload + +```java +import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; +import com.azure.resourcemanager.machinelearning.models.PendingUploadType; +import java.util.stream.Collectors; + +/** + * Samples for RegistryModelVersions CreateOrGetStartPendingUpload. + */ +public final class RegistryModelVersionsCreateOrGetStartPendingUploadSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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.NONE), com.azure.core.util.Context.NONE); + } +} +``` + +### RegistryModelVersions_CreateOrUpdate + +```java +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/preview/2024-01-01-preview/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; + } +} ``` -### Quotas_List +### RegistryModelVersions_Delete ```java -/** Samples for Quotas List. */ -public final class QuotasListSamples { +/** + * Samples for RegistryModelVersions Delete. + */ +public final class RegistryModelVersionsDeleteSamples { /* - * 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/preview/2024-01-01-preview/examples/Registry/ModelVersion/delete.json */ /** - * Sample code: List workspace quotas by VMFamily. - * + * Sample code: Delete Registry Model Version. + * * @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); + 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); } } ``` -### Quotas_Update +### RegistryModelVersions_Get ```java -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; +/** + * Samples for RegistryModelVersions Get. + */ +public final class RegistryModelVersionsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryModelVersions_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import java.util.stream.Collectors; + +/** + * Samples for RegistryModelVersions List. + */ +public final class RegistryModelVersionsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/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); + } +} +``` + +### RegistryModelVersions_PackageMethod + +```java +import com.azure.resourcemanager.machinelearning.models.AzureMLBatchInferencingServer; +import com.azure.resourcemanager.machinelearning.models.BaseEnvironmentId; +import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelPackageInput; +import com.azure.resourcemanager.machinelearning.models.PackageInputDeliveryMode; +import com.azure.resourcemanager.machinelearning.models.PackageInputPathUrl; +import com.azure.resourcemanager.machinelearning.models.PackageInputType; +import com.azure.resourcemanager.machinelearning.models.PackageRequest; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; -/** Samples for Quotas Update. */ -public final class QuotasUpdateSamples { +/** + * Samples for RegistryModelVersions PackageMethod. + */ +public final class RegistryModelVersionsPackageMethodSamples { /* - * 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/preview/2024-01-01-preview/examples/Registry/ModelVersion/package.json */ /** - * Sample code: update quotas. - * + * Sample code: Package Registry Model Version. + * * @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); + public static void packageRegistryModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelVersions().packageMethod("test-rg", "my-aml-registry", "string", "string", new PackageRequest().withBaseEnvironmentSource(new BaseEnvironmentId().withResourceId("string")).withEnvironmentVariables(mapOf("string", "string")).withInferencingServer(new AzureMLBatchInferencingServer().withCodeConfiguration(new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string"))).withInputs(Arrays.asList(new ModelPackageInput().withInputType(PackageInputType.URI_FILE).withMode(PackageInputDeliveryMode.DOWNLOAD).withMountPath("string").withPath(new PackageInputPathUrl().withUrl("string")))).withModelConfiguration(new ModelConfiguration().withMode(PackageInputDeliveryMode.fromString("ReadOnlyMount")).withMountPath("string")).withTags(mapOf("string", "string")).withTargetEnvironmentId("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; } } ``` @@ -3900,47 +7011,23 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -/** Samples for Schedules CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/examples/Schedule/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Schedule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - manager - .schedules() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ScheduleProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withAction( - new EndpointScheduleAction() - .withEndpointInvocationDefinition( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", - Object.class, - SerializerEncoding.JSON))) - .withDisplayName("string") - .withIsEnabled(false) - .withTrigger( - new CronTrigger() - .withEndTime("string") - .withStartTime("string") - .withTimeZone("string") - .withExpression("string"))) - .create(); + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager.schedules().define("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new ScheduleProperties().withDescription("string").withProperties(mapOf("string", "string")).withTags(mapOf("string", "string")).withAction(new EndpointScheduleAction().withEndpointInvocationDefinition(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", Object.class, SerializerEncoding.JSON))).withDisplayName("string").withIsEnabled(false).withTrigger(new CronTrigger().withEndTime("string").withStartTime("string").withTimeZone("string").withExpression("string"))).create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -3957,14 +7044,16 @@ public final class SchedulesCreateOrUpdateSamples { ### Schedules_Delete ```java -/** Samples for Schedules Delete. */ +/** + * 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/preview/2024-01-01-preview/examples/Schedule/delete.json */ /** * Sample code: Delete Schedule. - * + * * @param manager Entry point to MachineLearningManager. */ public static void deleteSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -3976,14 +7065,16 @@ public final class SchedulesDeleteSamples { ### Schedules_Get ```java -/** Samples for Schedules Get. */ +/** + * 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/preview/2024-01-01-preview/examples/Schedule/get.json */ /** * Sample code: Get Schedule. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -3995,14 +7086,19 @@ public final class SchedulesGetSamples { ### Schedules_List ```java -/** Samples for Schedules List. */ +import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; +import java.util.stream.Collectors; + +/** + * 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/preview/2024-01-01-preview/examples/Schedule/list.json */ /** * Sample code: List Schedules. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listSchedules(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -4011,17 +7107,264 @@ public final class SchedulesListSamples { } ``` +### Schedules_Trigger + +```java +import com.azure.resourcemanager.machinelearning.models.TriggerOnceRequest; + +/** + * Samples for Schedules Trigger. + */ +public final class SchedulesTriggerSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Schedule/trigger.json + */ + /** + * Sample code: Trigger Schedule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void triggerSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.schedules().triggerWithResponse("test-rg", "my-aml-workspace", "test-schedule", new TriggerOnceRequest().withScheduleTime("2024-01-01T12:34:56.999Z"), com.azure.core.util.Context.NONE); + } +} +``` + +### ServerlessEndpoints_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointCapacityReservation; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; +import com.azure.resourcemanager.machinelearning.models.ServerlessOffer; +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 java.util.stream.Collectors; + +/** + * Samples for ServerlessEndpoints CreateOrUpdate. + */ +public final class ServerlessEndpointsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/ServerlessEndpoint/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().define("string").withRegion("string").withExistingWorkspace("test-rg", "my-aml-workspace").withProperties(new ServerlessEndpointProperties().withAuthMode(ServerlessInferenceEndpointAuthMode.AAD).withCapacityReservation(new ServerlessEndpointCapacityReservation().withCapacityReservationGroupId("string").withEndpointReservedCapacity(1)).withOffer(new ServerlessOffer().withOfferName("string").withPublisher("string"))).withTags(mapOf()).withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))).withKind("string").withSku(new Sku().withName("string").withTier(SkuTier.STANDARD).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; + } +} +``` + +### ServerlessEndpoints_Delete + +```java +/** + * Samples for ServerlessEndpoints Delete. + */ +public final class ServerlessEndpointsDeleteSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/ServerlessEndpoint/delete.json + */ + /** + * Sample code: Delete Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### ServerlessEndpoints_Get + +```java +/** + * Samples for ServerlessEndpoints Get. + */ +public final class ServerlessEndpointsGetSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/ServerlessEndpoint/get.json + */ + /** + * Sample code: Get Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### ServerlessEndpoints_GetStatus + +```java +/** + * Samples for ServerlessEndpoints GetStatus. + */ +public final class ServerlessEndpointsGetStatusSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/ServerlessEndpoint/getStatus.json + */ + /** + * Sample code: GetStatus Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getStatusWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().getStatusWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### ServerlessEndpoints_List + +```java +/** + * Samples for ServerlessEndpoints List. + */ +public final class ServerlessEndpointsListSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/ServerlessEndpoint/list.json + */ + /** + * Sample code: List Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().list("test-rg", "my-aml-workspace", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ServerlessEndpoints_ListKeys + +```java +/** + * Samples for ServerlessEndpoints ListKeys. + */ +public final class ServerlessEndpointsListKeysSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/ServerlessEndpoint/listKeys.json + */ + /** + * Sample code: ListKeys Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listKeysWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().listKeysWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### ServerlessEndpoints_RegenerateKeys + +```java +import com.azure.resourcemanager.machinelearning.models.KeyType; +import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; +import java.util.stream.Collectors; + +/** + * Samples for ServerlessEndpoints RegenerateKeys. + */ +public final class ServerlessEndpointsRegenerateKeysSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/ServerlessEndpoint/regenerateKeys.json + */ + /** + * Sample code: RegenerateKeys Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void regenerateKeysWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().regenerateKeys("test-rg", "my-aml-workspace", "string", new RegenerateEndpointKeysRequest().withKeyType(KeyType.PRIMARY).withKeyValue("fakeTokenPlaceholder"), com.azure.core.util.Context.NONE); + } +} +``` + +### ServerlessEndpoints_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.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Samples for ServerlessEndpoints Update. + */ +public final class ServerlessEndpointsUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/Workspace/ServerlessEndpoint/update.json + */ + /** + * Sample code: Update Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + ServerlessEndpoint resource = manager.serverlessEndpoints().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf()).withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE).withUserAssignedIdentities(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON)))).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; + } +} +``` + ### Usages_List ```java -/** Samples for Usages List. */ +/** + * 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/preview/2024-01-01-preview/examples/Usage/list.json */ /** * Sample code: List Usages. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listUsages(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -4033,14 +7376,16 @@ public final class UsagesListSamples { ### VirtualMachineSizes_List ```java -/** Samples for VirtualMachineSizes List. */ +/** + * 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/preview/2024-01-01-preview/examples/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -4054,28 +7399,24 @@ public final class VirtualMachineSizesListSamples { ```java import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.stream.Collectors; -/** Samples for WorkspaceConnections Create. */ +/** + * 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/preview/2024-01-01-preview/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void createWorkspaceConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .define("connection-1") - .withExistingWorkspace("resourceGroup-1", "workspace-1") - .withProperties( - new NoneAuthTypeWorkspaceConnectionProperties() - .withCategory(ConnectionCategory.CONTAINER_REGISTRY) - .withTarget("www.facebook.com")) - .create(); + public static void createWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().define("connection-1").withExistingWorkspace("resourceGroup-1", "workspace-1").withProperties(new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.CONTAINER_REGISTRY).withExpiryTime(OffsetDateTime.parse("2024-03-15T14:30:00Z")).withTarget("www.facebook.com")).create(); } } ``` @@ -4083,21 +7424,20 @@ public final class WorkspaceConnectionsCreateSamples { ### WorkspaceConnections_Delete ```java -/** Samples for WorkspaceConnections Delete. */ +/** + * 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/preview/2024-01-01-preview/examples/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void deleteWorkspaceConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .deleteWithResponse("resourceGroup-1", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().deleteWithResponse("resourceGroup-1", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); } } ``` @@ -4105,21 +7445,20 @@ public final class WorkspaceConnectionsDeleteSamples { ### WorkspaceConnections_Get ```java -/** Samples for WorkspaceConnections Get. */ +/** + * 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/preview/2024-01-01-preview/examples/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void getWorkspaceConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .getWithResponse("resourceGroup-1", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); + public static void getWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().getWithResponse("resourceGroup-1", "workspace-1", "connection-1", null, com.azure.core.util.Context.NONE); } } ``` @@ -4127,26 +7466,102 @@ public final class WorkspaceConnectionsGetSamples { ### WorkspaceConnections_List ```java -/** Samples for WorkspaceConnections List. */ +/** + * 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/preview/2024-01-01-preview/examples/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. - * + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listWorkspaceConnections(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", null, com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceConnections_ListSecrets + +```java +/** + * Samples for WorkspaceConnections ListSecrets. + */ +public final class WorkspaceConnectionsListSecretsSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/WorkspaceConnection/listSecrets.json + */ + /** + * Sample code: GetWorkspaceConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().listSecretsWithResponse("test-rg", "workspace-1", "connection-1", null, com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceConnections_TestConnection + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.stream.Collectors; + +/** + * Samples for WorkspaceConnections TestConnection. + */ +public final class WorkspaceConnectionsTestConnectionSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/WorkspaceConnection/testConnection.json + */ + /** + * Sample code: TestWorkspaceConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void testWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().testConnection("resourceGroup-1", "workspace-1", "connection-1", new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties(new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.CONTAINER_REGISTRY).withExpiryTime(OffsetDateTime.parse("2024-03-15T14:30:00Z")).withTarget("target_url")), com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceConnections_Update + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.AccessKeyAuthTypeWorkspaceConnectionProperties; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccessKey; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.stream.Collectors; + +/** + * Samples for WorkspaceConnections Update. + */ +public final class WorkspaceConnectionsUpdateSamples { + /* + * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01-preview/examples/WorkspaceConnection/update.json + */ + /** + * Sample code: UpdateWorkspaceConnection. + * * @param manager Entry point to MachineLearningManager. */ - public static void listWorkspaceConnections( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .list( - "resourceGroup-1", - "workspace-1", - "www.facebook.com", - "ContainerRegistry", - com.azure.core.util.Context.NONE); + public static void updateWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + WorkspaceConnectionPropertiesV2BasicResource resource = manager.workspaceConnections().getWithResponse("test-rg", "workspace-1", "connection-1", null, com.azure.core.util.Context.NONE).getValue(); + resource.update().withProperties(new AccessKeyAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.ADLSGEN2).withExpiryTime(OffsetDateTime.parse("2020-01-01T00:00:00Z")).withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, SerializerEncoding.JSON)).withTarget("some_string").withCredentials(new WorkspaceConnectionAccessKey().withAccessKeyId("fakeTokenPlaceholder").withSecretAccessKey("fakeTokenPlaceholder"))).apply(); } } ``` @@ -4154,14 +7569,16 @@ public final class WorkspaceConnectionsListSamples { ### WorkspaceFeatures_List ```java -/** Samples for WorkspaceFeatures List. */ +/** + * 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/preview/2024-01-01-preview/examples/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceFeatures(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -4173,78 +7590,37 @@ public final class WorkspaceFeaturesListSamples { ### Workspaces_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultProperties; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; import com.azure.resourcemanager.machinelearning.models.EncryptionStatus; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.IdentityForCmk; +import com.azure.resourcemanager.machinelearning.models.KeyVaultProperties; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for Workspaces CreateOrUpdate. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/create.json */ /** * Sample code: Create Workspace. - * + * * @param manager Entry point to MachineLearningManager. */ public static void createWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .define("testworkspace") - .withExistingResourceGroup("workspace-1234") - .withRegion("eastus2euap") - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai", - new UserAssignedIdentity()))) - .withDescription("test description") - .withFriendlyName("HelloName") - .withKeyVault( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") - .withApplicationInsights( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights") - .withContainerRegistry( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry") - .withStorageAccount( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") - .withEncryption( - new EncryptionProperty() - .withStatus(EncryptionStatus.ENABLED) - .withIdentity( - new IdentityForCmk() - .withUserAssignedIdentity( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")) - .withKeyVaultProperties( - new EncryptionKeyVaultProperties() - .withKeyVaultArmId("fakeTokenPlaceholder") - .withKeyIdentifier("fakeTokenPlaceholder") - .withIdentityClientId(""))) - .withHbiWorkspace(false) - .withSharedPrivateLinkResources( - Arrays - .asList( - new SharedPrivateLinkResource() - .withName("testdbresource") - .withPrivateLinkResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql") - .withGroupId("Sql") - .withRequestMessage("Please approve") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED))) - .create(); + manager.workspaces().define("testworkspace").withExistingResourceGroup("workspace-1234").withRegion("eastus2euap").withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED).withUserAssignedIdentities(mapOf("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai", new UserAssignedIdentity()))).withApplicationInsights("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights").withContainerRegistry("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry").withDescription("test description").withEncryption(new EncryptionProperty().withIdentity(new IdentityForCmk().withUserAssignedIdentity("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")).withKeyVaultProperties(new KeyVaultProperties().withIdentityClientId("").withKeyIdentifier("fakeTokenPlaceholder").withKeyVaultArmId("fakeTokenPlaceholder")).withStatus(EncryptionStatus.ENABLED)).withFriendlyName("HelloName").withHbiWorkspace(false).withKeyVault("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv").withSharedPrivateLinkResources(Arrays.asList(new SharedPrivateLinkResource().withName("testdbresource").withGroupId("Sql").withPrivateLinkResourceId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql").withRequestMessage("Please approve").withStatus(EndpointServiceConnectionStatus.APPROVED))).withStorageAccount("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount").create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -4261,18 +7637,20 @@ public final class WorkspacesCreateOrUpdateSamples { ### Workspaces_Delete ```java -/** Samples for Workspaces Delete. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/delete.json */ /** * Sample code: Delete Workspace. - * + * * @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); } } ``` @@ -4285,37 +7663,23 @@ import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParamet import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces Diagnose. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. - * + * * @param manager Entry point to MachineLearningManager. */ public static void diagnoseWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .diagnose( - "workspace-1234", - "testworkspace", - new DiagnoseWorkspaceParameters() - .withValue( - new DiagnoseRequestProperties() - .withUdr(mapOf()) - .withNsg(mapOf()) - .withResourceLock(mapOf()) - .withDnsResolution(mapOf()) - .withStorageAccount(mapOf()) - .withKeyVault(mapOf()) - .withContainerRegistry(mapOf()) - .withApplicationInsights(mapOf()) - .withOthers(mapOf())), - com.azure.core.util.Context.NONE); + manager.workspaces().diagnose("workspace-1234", "testworkspace", new DiagnoseWorkspaceParameters().withValue(new DiagnoseRequestProperties().withApplicationInsights(mapOf()).withContainerRegistry(mapOf()).withDnsResolution(mapOf()).withKeyVault(mapOf()).withNsg(mapOf()).withOthers(mapOf()).withResourceLock(mapOf()).withStorageAccount(mapOf()).withUdr(mapOf())), com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -4332,20 +7696,20 @@ public final class WorkspacesDiagnoseSamples { ### Workspaces_GetByResourceGroup ```java -/** Samples for Workspaces GetByResourceGroup. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/get.json */ /** * Sample code: Get Workspace. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.workspaces().getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4353,19 +7717,20 @@ public final class WorkspacesGetByResourceGroupSamples { ### Workspaces_List ```java -/** Samples for Workspaces List. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void getWorkspacesBySubscription( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); + public static void getWorkspacesBySubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaces().list(null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -4373,19 +7738,20 @@ public final class WorkspacesListSamples { ### Workspaces_ListByResourceGroup ```java -/** Samples for Workspaces ListByResourceGroup. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void getWorkspacesByResourceGroup( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listByResourceGroup("workspace-1234", null, com.azure.core.util.Context.NONE); + public static void getWorkspacesByResourceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaces().listByResourceGroup("workspace-1234", null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -4393,14 +7759,16 @@ public final class WorkspacesListByResourceGroupSamples { ### Workspaces_ListKeys ```java -/** Samples for Workspaces ListKeys. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -4412,20 +7780,20 @@ public final class WorkspacesListKeysSamples { ### Workspaces_ListNotebookAccessToken ```java -/** Samples for Workspaces ListNotebookAccessToken. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listNotebookAccessTokenWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.workspaces().listNotebookAccessTokenWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4433,20 +7801,20 @@ public final class WorkspacesListNotebookAccessTokenSamples { ### Workspaces_ListNotebookKeys ```java -/** Samples for Workspaces ListNotebookKeys. */ +/** + * 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/preview/2024-01-01-preview/examples/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listNotebookKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); + manager.workspaces().listNotebookKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); } } ``` @@ -4454,22 +7822,20 @@ public final class WorkspacesListNotebookKeysSamples { ### Workspaces_ListOutboundNetworkDependenciesEndpoints ```java -/** Samples for Workspaces ListOutboundNetworkDependenciesEndpoints. */ +/** + * 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/preview/2024-01-01-preview/examples/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void listOutboundNetworkDependenciesEndpoints( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listOutboundNetworkDependenciesEndpointsWithResponse( - "workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); + public static void listOutboundNetworkDependenciesEndpoints(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaces().listOutboundNetworkDependenciesEndpointsWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); } } ``` @@ -4477,20 +7843,20 @@ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { ### Workspaces_ListStorageAccountKeys ```java -/** Samples for Workspaces ListStorageAccountKeys. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listStorageAccountKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); + manager.workspaces().listStorageAccountKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); } } ``` @@ -4498,14 +7864,16 @@ public final class WorkspacesListStorageAccountKeysSamples { ### Workspaces_PrepareNotebook ```java -/** Samples for Workspaces PrepareNotebook. */ +/** + * 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/preview/2024-01-01-preview/examples/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. - * + * * @param manager Entry point to MachineLearningManager. */ public static void prepareNotebook(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -4517,14 +7885,16 @@ public final class WorkspacesPrepareNotebookSamples { ### Workspaces_ResyncKeys ```java -/** Samples for Workspaces ResyncKeys. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void resyncWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { @@ -4536,31 +7906,25 @@ public final class WorkspacesResyncKeysSamples { ### Workspaces_Update ```java -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType; import com.azure.resourcemanager.machinelearning.models.Workspace; +import java.util.stream.Collectors; -/** Samples for Workspaces Update. */ +/** + * 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/preview/2024-01-01-preview/examples/Workspace/update.json */ /** * Sample code: Update Workspace. - * + * * @param manager Entry point to MachineLearningManager. */ public static void updateWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDescription("new description") - .withFriendlyName("New friendly name") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .apply(); + Workspace resource = manager.workspaces().getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE).getValue(); + resource.update().withDescription("new description").withFriendlyName("New friendly name").withPublicNetworkAccess(PublicNetworkAccessType.DISABLED).apply(); } } ``` diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml index fe2a3e8ff4a9a..2170e3614facd 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-preview-2024-01. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,9 @@ UTF-8 - true + 0 + 0 + true @@ -105,8 +112,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy 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..1f4bed822e188 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,10 +23,11 @@ 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.CapacityReservationGroupsImpl; import com.azure.resourcemanager.machinelearning.implementation.CodeContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.CodeVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.ComponentContainersImpl; @@ -35,9 +36,23 @@ import com.azure.resourcemanager.machinelearning.implementation.DataContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.DataVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.DatastoresImpl; +import com.azure.resourcemanager.machinelearning.implementation.EndpointDeploymentsImpl; +import com.azure.resourcemanager.machinelearning.implementation.EndpointsImpl; 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.InferenceEndpointsImpl; +import com.azure.resourcemanager.machinelearning.implementation.InferenceGroupsImpl; +import com.azure.resourcemanager.machinelearning.implementation.InferencePoolsImpl; import com.azure.resourcemanager.machinelearning.implementation.JobsImpl; +import com.azure.resourcemanager.machinelearning.implementation.LabelingJobsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesImpl; +import com.azure.resourcemanager.machinelearning.implementation.MarketplaceSubscriptionsImpl; import com.azure.resourcemanager.machinelearning.implementation.ModelContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.ModelVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsImpl; @@ -46,7 +61,20 @@ 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.ServerlessEndpointsImpl; import com.azure.resourcemanager.machinelearning.implementation.UsagesImpl; import com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesImpl; import com.azure.resourcemanager.machinelearning.implementation.WorkspaceConnectionsImpl; @@ -54,6 +82,7 @@ import com.azure.resourcemanager.machinelearning.implementation.WorkspacesImpl; import com.azure.resourcemanager.machinelearning.models.BatchDeployments; import com.azure.resourcemanager.machinelearning.models.BatchEndpoints; +import com.azure.resourcemanager.machinelearning.models.CapacityReservationGroups; import com.azure.resourcemanager.machinelearning.models.CodeContainers; import com.azure.resourcemanager.machinelearning.models.CodeVersions; import com.azure.resourcemanager.machinelearning.models.ComponentContainers; @@ -62,9 +91,23 @@ import com.azure.resourcemanager.machinelearning.models.DataContainers; import com.azure.resourcemanager.machinelearning.models.DataVersions; import com.azure.resourcemanager.machinelearning.models.Datastores; +import com.azure.resourcemanager.machinelearning.models.EndpointDeployments; +import com.azure.resourcemanager.machinelearning.models.Endpoints; 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.InferenceEndpoints; +import com.azure.resourcemanager.machinelearning.models.InferenceGroups; +import com.azure.resourcemanager.machinelearning.models.InferencePools; import com.azure.resourcemanager.machinelearning.models.Jobs; +import com.azure.resourcemanager.machinelearning.models.LabelingJobs; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisions; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsRules; +import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptions; import com.azure.resourcemanager.machinelearning.models.ModelContainers; import com.azure.resourcemanager.machinelearning.models.ModelVersions; import com.azure.resourcemanager.machinelearning.models.OnlineDeployments; @@ -73,7 +116,20 @@ 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.ServerlessEndpoints; import com.azure.resourcemanager.machinelearning.models.Usages; import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizes; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnections; @@ -87,14 +143,10 @@ import java.util.stream.Collectors; /** - * Entry point to MachineLearningManager. These APIs allow end users to operate on Azure Machine Learning Workspace - * resources. + * Entry point to MachineLearningManager. + * These APIs allow end users to operate on Azure Machine Learning Workspace resources. */ public final class MachineLearningManager { - private Operations operations; - - private Workspaces workspaces; - private Usages usages; private VirtualMachineSizes virtualMachineSizes; @@ -103,11 +155,31 @@ public final class MachineLearningManager { private Computes computes; - private PrivateEndpointConnections privateEndpointConnections; + private CapacityReservationGroups capacityReservationGroups; - private PrivateLinkResources privateLinkResources; + private RegistryCodeContainers registryCodeContainers; - private WorkspaceConnections workspaceConnections; + 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 MarketplaceSubscriptions marketplaceSubscriptions; + + private RegistryModelContainers registryModelContainers; + + private RegistryModelVersions registryModelVersions; private BatchEndpoints batchEndpoints; @@ -131,8 +203,26 @@ public final class MachineLearningManager { private EnvironmentVersions environmentVersions; + private FeaturesetContainers featuresetContainers; + + private Features features; + + private FeaturesetVersions featuresetVersions; + + private FeaturestoreEntityContainers featurestoreEntityContainers; + + private FeaturestoreEntityVersions featurestoreEntityVersions; + + private InferencePools inferencePools; + + private InferenceEndpoints inferenceEndpoints; + + private InferenceGroups inferenceGroups; + private Jobs jobs; + private LabelingJobs labelingJobs; + private ModelContainers modelContainers; private ModelVersions modelVersions; @@ -143,25 +233,43 @@ public final class MachineLearningManager { private Schedules schedules; + private ServerlessEndpoints serverlessEndpoints; + + private Registries registries; + private WorkspaceFeatures workspaceFeatures; - private final AzureMachineLearningWorkspaces clientObject; + private Operations operations; + + private Workspaces workspaces; + + private WorkspaceConnections workspaceConnections; + + private EndpointDeployments endpointDeployments; + + private Endpoints endpoints; + + private ManagedNetworkSettingsRules managedNetworkSettingsRules; + + private PrivateEndpointConnections privateEndpointConnections; + + private PrivateLinkResources privateLinkResources; + + private ManagedNetworkProvisions managedNetworkProvisions; + + 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() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new AzureMachineLearningServicesBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of Machine Learning service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the Machine Learning service API instance. @@ -174,7 +282,7 @@ public static MachineLearningManager authenticate(TokenCredential credential, Az /** * Creates an instance of Machine Learning service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the Machine Learning service API instance. @@ -187,14 +295,16 @@ public static MachineLearningManager authenticate(HttpPipeline httpPipeline, Azu /** * Gets a Configurable instance that can be used to create MachineLearningManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new MachineLearningManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -266,8 +376,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

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

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -284,8 +394,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -305,21 +415,12 @@ public MachineLearningManager authenticate(TokenCredential credential, AzureProf Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.machinelearning") - .append("/") - .append("1.0.0"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.machinelearning") + .append("/").append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -338,62 +439,25 @@ public MachineLearningManager authenticate(TokenCredential credential, AzureProf policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new MachineLearningManager(httpPipeline, profile, defaultPollInterval); } } - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Workspaces. It manages Workspace. - * - * @return Resource collection API of Workspaces. - */ - public Workspaces workspaces() { - if (this.workspaces == null) { - this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); - } - return workspaces; - } - /** * Gets the resource collection API of Usages. - * + * * @return Resource collection API of Usages. */ public Usages usages() { @@ -405,7 +469,7 @@ public Usages usages() { /** * Gets the resource collection API of VirtualMachineSizes. - * + * * @return Resource collection API of VirtualMachineSizes. */ public VirtualMachineSizes virtualMachineSizes() { @@ -417,7 +481,7 @@ public VirtualMachineSizes virtualMachineSizes() { /** * Gets the resource collection API of Quotas. - * + * * @return Resource collection API of Quotas. */ public Quotas quotas() { @@ -429,7 +493,7 @@ public Quotas quotas() { /** * Gets the resource collection API of Computes. It manages ComputeResource. - * + * * @return Resource collection API of Computes. */ public Computes computes() { @@ -440,46 +504,174 @@ public Computes computes() { } /** - * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. - * - * @return Resource collection API of PrivateEndpointConnections. + * Gets the resource collection API of CapacityReservationGroups. It manages CapacityReservationGroup. + * + * @return Resource collection API of CapacityReservationGroups. */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections = - new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + public CapacityReservationGroups capacityReservationGroups() { + if (this.capacityReservationGroups == null) { + this.capacityReservationGroups + = new CapacityReservationGroupsImpl(clientObject.getCapacityReservationGroups(), this); } - return privateEndpointConnections; + return capacityReservationGroups; } /** - * Gets the resource collection API of PrivateLinkResources. - * - * @return Resource collection API of PrivateLinkResources. + * Gets the resource collection API of RegistryCodeContainers. It manages CodeContainer. + * + * @return Resource collection API of RegistryCodeContainers. */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + public RegistryCodeContainers registryCodeContainers() { + if (this.registryCodeContainers == null) { + this.registryCodeContainers + = new RegistryCodeContainersImpl(clientObject.getRegistryCodeContainers(), this); } - return privateLinkResources; + return registryCodeContainers; } /** - * Gets the resource collection API of WorkspaceConnections. It manages - * WorkspaceConnectionPropertiesV2BasicResource. - * - * @return Resource collection API of WorkspaceConnections. + * Gets the resource collection API of RegistryCodeVersions. It manages CodeVersion. + * + * @return Resource collection API of RegistryCodeVersions. */ - public WorkspaceConnections workspaceConnections() { - if (this.workspaceConnections == null) { - this.workspaceConnections = new WorkspaceConnectionsImpl(clientObject.getWorkspaceConnections(), this); + public RegistryCodeVersions registryCodeVersions() { + if (this.registryCodeVersions == null) { + this.registryCodeVersions = new RegistryCodeVersionsImpl(clientObject.getRegistryCodeVersions(), this); } - return workspaceConnections; + 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 MarketplaceSubscriptions. It manages MarketplaceSubscription. + * + * @return Resource collection API of MarketplaceSubscriptions. + */ + public MarketplaceSubscriptions marketplaceSubscriptions() { + if (this.marketplaceSubscriptions == null) { + this.marketplaceSubscriptions + = new MarketplaceSubscriptionsImpl(clientObject.getMarketplaceSubscriptions(), this); + } + return marketplaceSubscriptions; + } + + /** + * 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. - * + * * @return Resource collection API of BatchEndpoints. */ public BatchEndpoints batchEndpoints() { @@ -491,7 +683,7 @@ public BatchEndpoints batchEndpoints() { /** * Gets the resource collection API of BatchDeployments. It manages BatchDeployment. - * + * * @return Resource collection API of BatchDeployments. */ public BatchDeployments batchDeployments() { @@ -502,8 +694,8 @@ 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. */ public CodeContainers codeContainers() { @@ -514,8 +706,8 @@ 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. */ public CodeVersions codeVersions() { @@ -526,8 +718,8 @@ 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. */ public ComponentContainers componentContainers() { @@ -538,8 +730,8 @@ 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. */ public ComponentVersions componentVersions() { @@ -550,8 +742,8 @@ 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. */ public DataContainers dataContainers() { @@ -562,8 +754,8 @@ 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. */ public DataVersions dataVersions() { @@ -575,7 +767,7 @@ public DataVersions dataVersions() { /** * Gets the resource collection API of Datastores. It manages Datastore. - * + * * @return Resource collection API of Datastores. */ public Datastores datastores() { @@ -586,8 +778,8 @@ 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. */ public EnvironmentContainers environmentContainers() { @@ -598,8 +790,8 @@ 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. */ public EnvironmentVersions environmentVersions() { @@ -609,9 +801,107 @@ 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 InferencePools. It manages InferencePool. + * + * @return Resource collection API of InferencePools. + */ + public InferencePools inferencePools() { + if (this.inferencePools == null) { + this.inferencePools = new InferencePoolsImpl(clientObject.getInferencePools(), this); + } + return inferencePools; + } + + /** + * Gets the resource collection API of InferenceEndpoints. It manages InferenceEndpoint. + * + * @return Resource collection API of InferenceEndpoints. + */ + public InferenceEndpoints inferenceEndpoints() { + if (this.inferenceEndpoints == null) { + this.inferenceEndpoints = new InferenceEndpointsImpl(clientObject.getInferenceEndpoints(), this); + } + return inferenceEndpoints; + } + + /** + * Gets the resource collection API of InferenceGroups. It manages InferenceGroup. + * + * @return Resource collection API of InferenceGroups. + */ + public InferenceGroups inferenceGroups() { + if (this.inferenceGroups == null) { + this.inferenceGroups = new InferenceGroupsImpl(clientObject.getInferenceGroups(), this); + } + return inferenceGroups; + } + /** * Gets the resource collection API of Jobs. It manages JobBase. - * + * * @return Resource collection API of Jobs. */ public Jobs jobs() { @@ -622,8 +912,20 @@ public Jobs jobs() { } /** - * Gets the resource collection API of ModelContainers. It manages ModelContainer. - * + * Gets the resource collection API of LabelingJobs. It manages LabelingJob. + * + * @return Resource collection API of LabelingJobs. + */ + public LabelingJobs labelingJobs() { + if (this.labelingJobs == null) { + this.labelingJobs = new LabelingJobsImpl(clientObject.getLabelingJobs(), this); + } + return labelingJobs; + } + + /** + * Gets the resource collection API of ModelContainers. + * * @return Resource collection API of ModelContainers. */ public ModelContainers modelContainers() { @@ -634,8 +936,8 @@ 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. */ public ModelVersions modelVersions() { @@ -647,7 +949,7 @@ public ModelVersions modelVersions() { /** * Gets the resource collection API of OnlineEndpoints. It manages OnlineEndpoint. - * + * * @return Resource collection API of OnlineEndpoints. */ public OnlineEndpoints onlineEndpoints() { @@ -659,7 +961,7 @@ public OnlineEndpoints onlineEndpoints() { /** * Gets the resource collection API of OnlineDeployments. It manages OnlineDeployment. - * + * * @return Resource collection API of OnlineDeployments. */ public OnlineDeployments onlineDeployments() { @@ -671,7 +973,7 @@ public OnlineDeployments onlineDeployments() { /** * Gets the resource collection API of Schedules. It manages Schedule. - * + * * @return Resource collection API of Schedules. */ public Schedules schedules() { @@ -681,9 +983,33 @@ public Schedules schedules() { return schedules; } + /** + * Gets the resource collection API of ServerlessEndpoints. It manages ServerlessEndpoint. + * + * @return Resource collection API of ServerlessEndpoints. + */ + public ServerlessEndpoints serverlessEndpoints() { + if (this.serverlessEndpoints == null) { + this.serverlessEndpoints = new ServerlessEndpointsImpl(clientObject.getServerlessEndpoints(), this); + } + return serverlessEndpoints; + } + + /** + * 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. - * + * * @return Resource collection API of WorkspaceFeatures. */ public WorkspaceFeatures workspaceFeatures() { @@ -694,10 +1020,125 @@ public WorkspaceFeatures workspaceFeatures() { } /** - * @return Wrapped service client AzureMachineLearningWorkspaces providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + + /** + * Gets the resource collection API of Workspaces. It manages Workspace. + * + * @return Resource collection API of Workspaces. + */ + public Workspaces workspaces() { + if (this.workspaces == null) { + this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); + } + return workspaces; + } + + /** + * Gets the resource collection API of WorkspaceConnections. It manages + * WorkspaceConnectionPropertiesV2BasicResource. + * + * @return Resource collection API of WorkspaceConnections. + */ + public WorkspaceConnections workspaceConnections() { + if (this.workspaceConnections == null) { + this.workspaceConnections = new WorkspaceConnectionsImpl(clientObject.getWorkspaceConnections(), this); + } + return workspaceConnections; + } + + /** + * Gets the resource collection API of EndpointDeployments. It manages + * EndpointDeploymentResourcePropertiesBasicResource. + * + * @return Resource collection API of EndpointDeployments. + */ + public EndpointDeployments endpointDeployments() { + if (this.endpointDeployments == null) { + this.endpointDeployments = new EndpointDeploymentsImpl(clientObject.getEndpointDeployments(), this); + } + return endpointDeployments; + } + + /** + * Gets the resource collection API of Endpoints. It manages EndpointResourcePropertiesBasicResource. + * + * @return Resource collection API of Endpoints. + */ + public Endpoints endpoints() { + if (this.endpoints == null) { + this.endpoints = new EndpointsImpl(clientObject.getEndpoints(), this); + } + return endpoints; + } + + /** + * 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 PrivateEndpointConnections. It manages PrivateEndpointConnection. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + + /** + * 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 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/AzureMachineLearningServices.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningServices.java new file mode 100644 index 0000000000000..a63bab411f32e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningServices.java @@ -0,0 +1,433 @@ +// Copyright (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.http.HttpPipeline; +import java.time.Duration; + +/** + * The interface for AzureMachineLearningServices class. + */ +public interface AzureMachineLearningServices { + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the UsagesClient object to access its operations. + * + * @return the UsagesClient object. + */ + UsagesClient getUsages(); + + /** + * Gets the VirtualMachineSizesClient object to access its operations. + * + * @return the VirtualMachineSizesClient object. + */ + VirtualMachineSizesClient getVirtualMachineSizes(); + + /** + * Gets the QuotasClient object to access its operations. + * + * @return the QuotasClient object. + */ + QuotasClient getQuotas(); + + /** + * Gets the ComputesClient object to access its operations. + * + * @return the ComputesClient object. + */ + ComputesClient getComputes(); + + /** + * Gets the CapacityReservationGroupsClient object to access its operations. + * + * @return the CapacityReservationGroupsClient object. + */ + CapacityReservationGroupsClient getCapacityReservationGroups(); + + /** + * 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 MarketplaceSubscriptionsClient object to access its operations. + * + * @return the MarketplaceSubscriptionsClient object. + */ + MarketplaceSubscriptionsClient getMarketplaceSubscriptions(); + + /** + * 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. + * + * @return the BatchEndpointsClient object. + */ + BatchEndpointsClient getBatchEndpoints(); + + /** + * Gets the BatchDeploymentsClient object to access its operations. + * + * @return the BatchDeploymentsClient object. + */ + BatchDeploymentsClient getBatchDeployments(); + + /** + * Gets the CodeContainersClient object to access its operations. + * + * @return the CodeContainersClient object. + */ + CodeContainersClient getCodeContainers(); + + /** + * Gets the CodeVersionsClient object to access its operations. + * + * @return the CodeVersionsClient object. + */ + CodeVersionsClient getCodeVersions(); + + /** + * Gets the ComponentContainersClient object to access its operations. + * + * @return the ComponentContainersClient object. + */ + ComponentContainersClient getComponentContainers(); + + /** + * Gets the ComponentVersionsClient object to access its operations. + * + * @return the ComponentVersionsClient object. + */ + ComponentVersionsClient getComponentVersions(); + + /** + * Gets the DataContainersClient object to access its operations. + * + * @return the DataContainersClient object. + */ + DataContainersClient getDataContainers(); + + /** + * Gets the DataVersionsClient object to access its operations. + * + * @return the DataVersionsClient object. + */ + DataVersionsClient getDataVersions(); + + /** + * Gets the DatastoresClient object to access its operations. + * + * @return the DatastoresClient object. + */ + DatastoresClient getDatastores(); + + /** + * Gets the EnvironmentContainersClient object to access its operations. + * + * @return the EnvironmentContainersClient object. + */ + EnvironmentContainersClient getEnvironmentContainers(); + + /** + * Gets the EnvironmentVersionsClient object to access its operations. + * + * @return the EnvironmentVersionsClient object. + */ + 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 InferencePoolsClient object to access its operations. + * + * @return the InferencePoolsClient object. + */ + InferencePoolsClient getInferencePools(); + + /** + * Gets the InferenceEndpointsClient object to access its operations. + * + * @return the InferenceEndpointsClient object. + */ + InferenceEndpointsClient getInferenceEndpoints(); + + /** + * Gets the InferenceGroupsClient object to access its operations. + * + * @return the InferenceGroupsClient object. + */ + InferenceGroupsClient getInferenceGroups(); + + /** + * Gets the JobsClient object to access its operations. + * + * @return the JobsClient object. + */ + JobsClient getJobs(); + + /** + * Gets the LabelingJobsClient object to access its operations. + * + * @return the LabelingJobsClient object. + */ + LabelingJobsClient getLabelingJobs(); + + /** + * Gets the ModelContainersClient object to access its operations. + * + * @return the ModelContainersClient object. + */ + ModelContainersClient getModelContainers(); + + /** + * Gets the ModelVersionsClient object to access its operations. + * + * @return the ModelVersionsClient object. + */ + ModelVersionsClient getModelVersions(); + + /** + * Gets the OnlineEndpointsClient object to access its operations. + * + * @return the OnlineEndpointsClient object. + */ + OnlineEndpointsClient getOnlineEndpoints(); + + /** + * Gets the OnlineDeploymentsClient object to access its operations. + * + * @return the OnlineDeploymentsClient object. + */ + OnlineDeploymentsClient getOnlineDeployments(); + + /** + * Gets the SchedulesClient object to access its operations. + * + * @return the SchedulesClient object. + */ + SchedulesClient getSchedules(); + + /** + * Gets the ServerlessEndpointsClient object to access its operations. + * + * @return the ServerlessEndpointsClient object. + */ + ServerlessEndpointsClient getServerlessEndpoints(); + + /** + * Gets the RegistriesClient object to access its operations. + * + * @return the RegistriesClient object. + */ + RegistriesClient getRegistries(); + + /** + * Gets the WorkspaceFeaturesClient object to access its operations. + * + * @return the WorkspaceFeaturesClient object. + */ + WorkspaceFeaturesClient getWorkspaceFeatures(); + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + + /** + * Gets the WorkspacesClient object to access its operations. + * + * @return the WorkspacesClient object. + */ + WorkspacesClient getWorkspaces(); + + /** + * Gets the WorkspaceConnectionsClient object to access its operations. + * + * @return the WorkspaceConnectionsClient object. + */ + WorkspaceConnectionsClient getWorkspaceConnections(); + + /** + * Gets the EndpointDeploymentsClient object to access its operations. + * + * @return the EndpointDeploymentsClient object. + */ + EndpointDeploymentsClient getEndpointDeployments(); + + /** + * Gets the EndpointsClient object to access its operations. + * + * @return the EndpointsClient object. + */ + EndpointsClient getEndpoints(); + + /** + * Gets the ManagedNetworkSettingsRulesClient object to access its operations. + * + * @return the ManagedNetworkSettingsRulesClient object. + */ + ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules(); + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + PrivateLinkResourcesClient getPrivateLinkResources(); + + /** + * Gets the ManagedNetworkProvisionsClient object to access its operations. + * + * @return the ManagedNetworkProvisionsClient object. + */ + ManagedNetworkProvisionsClient getManagedNetworkProvisions(); +} 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/AzureMachineLearningWorkspaces.java deleted file mode 100644 index e8a40ef9b43c9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (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.http.HttpPipeline; -import java.time.Duration; - -/** The interface for AzureMachineLearningWorkspaces class. */ -public interface AzureMachineLearningWorkspaces { - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - WorkspacesClient getWorkspaces(); - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - UsagesClient getUsages(); - - /** - * Gets the VirtualMachineSizesClient object to access its operations. - * - * @return the VirtualMachineSizesClient object. - */ - VirtualMachineSizesClient getVirtualMachineSizes(); - - /** - * Gets the QuotasClient object to access its operations. - * - * @return the QuotasClient object. - */ - QuotasClient getQuotas(); - - /** - * Gets the ComputesClient object to access its operations. - * - * @return the ComputesClient object. - */ - ComputesClient getComputes(); - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - PrivateLinkResourcesClient getPrivateLinkResources(); - - /** - * Gets the WorkspaceConnectionsClient object to access its operations. - * - * @return the WorkspaceConnectionsClient object. - */ - WorkspaceConnectionsClient getWorkspaceConnections(); - - /** - * Gets the BatchEndpointsClient object to access its operations. - * - * @return the BatchEndpointsClient object. - */ - BatchEndpointsClient getBatchEndpoints(); - - /** - * Gets the BatchDeploymentsClient object to access its operations. - * - * @return the BatchDeploymentsClient object. - */ - BatchDeploymentsClient getBatchDeployments(); - - /** - * Gets the CodeContainersClient object to access its operations. - * - * @return the CodeContainersClient object. - */ - CodeContainersClient getCodeContainers(); - - /** - * Gets the CodeVersionsClient object to access its operations. - * - * @return the CodeVersionsClient object. - */ - CodeVersionsClient getCodeVersions(); - - /** - * Gets the ComponentContainersClient object to access its operations. - * - * @return the ComponentContainersClient object. - */ - ComponentContainersClient getComponentContainers(); - - /** - * Gets the ComponentVersionsClient object to access its operations. - * - * @return the ComponentVersionsClient object. - */ - ComponentVersionsClient getComponentVersions(); - - /** - * Gets the DataContainersClient object to access its operations. - * - * @return the DataContainersClient object. - */ - DataContainersClient getDataContainers(); - - /** - * Gets the DataVersionsClient object to access its operations. - * - * @return the DataVersionsClient object. - */ - DataVersionsClient getDataVersions(); - - /** - * Gets the DatastoresClient object to access its operations. - * - * @return the DatastoresClient object. - */ - DatastoresClient getDatastores(); - - /** - * Gets the EnvironmentContainersClient object to access its operations. - * - * @return the EnvironmentContainersClient object. - */ - EnvironmentContainersClient getEnvironmentContainers(); - - /** - * Gets the EnvironmentVersionsClient object to access its operations. - * - * @return the EnvironmentVersionsClient object. - */ - EnvironmentVersionsClient getEnvironmentVersions(); - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - JobsClient getJobs(); - - /** - * Gets the ModelContainersClient object to access its operations. - * - * @return the ModelContainersClient object. - */ - ModelContainersClient getModelContainers(); - - /** - * Gets the ModelVersionsClient object to access its operations. - * - * @return the ModelVersionsClient object. - */ - ModelVersionsClient getModelVersions(); - - /** - * Gets the OnlineEndpointsClient object to access its operations. - * - * @return the OnlineEndpointsClient object. - */ - OnlineEndpointsClient getOnlineEndpoints(); - - /** - * Gets the OnlineDeploymentsClient object to access its operations. - * - * @return the OnlineDeploymentsClient object. - */ - OnlineDeploymentsClient getOnlineDeployments(); - - /** - * Gets the SchedulesClient object to access its operations. - * - * @return the SchedulesClient object. - */ - SchedulesClient getSchedules(); - - /** - * Gets the WorkspaceFeaturesClient object to access its operations. - * - * @return the WorkspaceFeaturesClient object. - */ - WorkspaceFeaturesClient getWorkspaceFeatures(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java index f2ba7f59facb4..8ef782e7a521b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; -/** An instance of this class provides access to all the operations defined in BatchDeploymentsClient. */ +/** + * An instance of this class provides access to all the operations defined in BatchDeploymentsClient. + */ public interface BatchDeploymentsClient { /** * Lists Batch inference deployments in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -32,7 +34,7 @@ public interface BatchDeploymentsClient { /** * Lists Batch inference deployments in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -46,18 +48,12 @@ public interface BatchDeploymentsClient { * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context); /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -68,12 +64,12 @@ PagedIterable list( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -85,12 +81,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -104,7 +100,7 @@ SyncPoller, Void> beginDelete( /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -115,12 +111,12 @@ SyncPoller, Void> beginDelete( * @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 endpointName, String deploymentName, Context context); + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); /** * Gets a batch inference deployment by id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -132,12 +128,12 @@ void delete( * @return a batch inference deployment by id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** * Gets a batch inference deployment by id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -148,12 +144,12 @@ Response getWithResponse( * @return a batch inference deployment by id. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + BatchDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -165,16 +161,13 @@ BatchDeploymentInner get( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body); /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -187,17 +180,13 @@ SyncPoller, BatchDeploymentInner> beginUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context); + SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context); /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -209,16 +198,12 @@ SyncPoller, BatchDeploymentInner> beginUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body); + BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body); /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -231,17 +216,12 @@ BatchDeploymentInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context); + BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context); /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -253,16 +233,12 @@ BatchDeploymentInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body); + SyncPoller, BatchDeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body); /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -275,17 +251,12 @@ SyncPoller, BatchDeploymentInner> beginCreateOr * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context); + SyncPoller, BatchDeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body, Context context); /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -297,16 +268,12 @@ SyncPoller, BatchDeploymentInner> beginCreateOr * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body); + BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, BatchDeploymentInner body); /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -319,11 +286,6 @@ BatchDeploymentInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context); + BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, BatchDeploymentInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java index 4f335ddcec443..ad9d816bd2755 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java @@ -15,11 +15,13 @@ import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -/** An instance of this class provides access to all the operations defined in BatchEndpointsClient. */ +/** + * An instance of this class provides access to all the operations defined in BatchEndpointsClient. + */ public interface BatchEndpointsClient { /** * Lists Batch inference endpoint in the 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. @@ -32,7 +34,7 @@ public interface BatchEndpointsClient { /** * Lists Batch inference endpoint in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param count Number of endpoints to be retrieved in a page of results. @@ -44,12 +46,12 @@ public interface BatchEndpointsClient { * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + Context context); /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -63,7 +65,7 @@ PagedIterable list( /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -74,12 +76,12 @@ PagedIterable list( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -92,7 +94,7 @@ SyncPoller, Void> beginDelete( /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -106,7 +108,7 @@ SyncPoller, Void> beginDelete( /** * Gets a batch inference endpoint by name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. @@ -117,12 +119,12 @@ SyncPoller, Void> beginDelete( * @return a batch inference endpoint by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** * Gets a batch inference endpoint by name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. @@ -136,7 +138,7 @@ Response getWithResponse( /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -147,15 +149,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body); + SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body); /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -167,16 +166,12 @@ SyncPoller, BatchEndpointInner> beginUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context); + SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context); /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -187,15 +182,12 @@ SyncPoller, BatchEndpointInner> beginUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, + BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body); /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -207,16 +199,12 @@ BatchEndpointInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context); + BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body, Context context); /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -227,12 +215,12 @@ BatchEndpointInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body); + SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body); /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -244,12 +232,12 @@ SyncPoller, BatchEndpointInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context); + SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body, Context context); /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -260,12 +248,12 @@ SyncPoller, BatchEndpointInner> beginCreateOrUpda * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body); + BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + BatchEndpointInner body); /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -277,12 +265,12 @@ BatchEndpointInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context); + BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + BatchEndpointInner body, Context context); /** * Lists batch Inference Endpoint keys. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -293,12 +281,12 @@ BatchEndpointInner createOrUpdate( * @return keys for endpoint authentication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context); /** * Lists batch Inference Endpoint keys. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapacityReservationGroupsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapacityReservationGroupsClient.java new file mode 100644 index 0000000000000..e3c5d180061a4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapacityReservationGroupsClient.java @@ -0,0 +1,184 @@ +// Copyright (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.CapacityReservationGroupInner; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; + +/** + * An instance of this class provides access to all the operations defined in CapacityReservationGroupsClient. + */ +public interface CapacityReservationGroupsClient { + /** + * List CapacityReservationGroups 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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List CapacityReservationGroups by subscription. + * + * @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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String skip, Context context); + + /** + * Lists CapacityReservationGroups. + * + * @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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists CapacityReservationGroups. + * + * @param resourceGroupName The name of the resource group. The name 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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String skip, + Context context); + + /** + * Delete CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String groupId, Context context); + + /** + * Delete CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String groupId); + + /** + * Get CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group 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 capacityReservationGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String groupId, + Context context); + + /** + * Get CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group 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 capacityReservationGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CapacityReservationGroupInner getByResourceGroup(String resourceGroupName, String groupId); + + /** + * Update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String groupId, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); + + /** + * Update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CapacityReservationGroupInner update(String resourceGroupName, String groupId, + PartialMinimalTrackedResourceWithSkuAndIdentity body); + + /** + * Create or update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to create. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 createOrUpdateWithResponse(String resourceGroupName, String groupId, + CapacityReservationGroupInner body, Context context); + + /** + * Create or update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + CapacityReservationGroupInner createOrUpdate(String resourceGroupName, String groupId, + CapacityReservationGroupInner body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java index 04fdda11a5779..de4baa9510dda 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -/** An instance of this class provides access to all the operations defined in CodeContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in CodeContainersClient. + */ public interface CodeContainersClient { /** * List 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. @@ -28,7 +30,7 @@ public interface CodeContainersClient { /** * List 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. @@ -39,12 +41,12 @@ public interface CodeContainersClient { * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + 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. @@ -59,7 +61,7 @@ PagedIterable list( /** * 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. @@ -72,7 +74,7 @@ PagedIterable list( /** * 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. @@ -83,12 +85,12 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response getWithResponse(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. @@ -102,7 +104,7 @@ Response getWithResponse( /** * 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. @@ -114,12 +116,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + CodeContainerInner 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. @@ -130,6 +132,6 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body); + CodeContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CodeContainerInner body); } 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..abfbf9d071d69 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,14 +8,21 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in CodeVersionsClient. + */ public interface CodeVersionsClient { /** * 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 Container name. This is case-sensitive. @@ -29,13 +36,15 @@ public interface CodeVersionsClient { /** * 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 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 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. @@ -43,18 +52,12 @@ public interface CodeVersionsClient { * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, String hash, String hashVersion, 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. @@ -66,12 +69,12 @@ PagedIterable list( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -85,7 +88,7 @@ Response deleteWithResponse( /** * 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. @@ -97,12 +100,12 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + 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. @@ -117,7 +120,7 @@ Response getWithResponse( /** * 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. @@ -130,17 +133,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - CodeVersionInner body, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + String version, CodeVersionInner 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. @@ -152,6 +150,108 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body); + 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/ComponentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java index 0f44fde086c8e..9758c6b03bcf6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java @@ -12,11 +12,13 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; -/** An instance of this class provides access to all the operations defined in ComponentContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentContainersClient. + */ public interface ComponentContainersClient { /** * List component 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. @@ -29,7 +31,7 @@ public interface ComponentContainersClient { /** * List component 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. @@ -41,12 +43,12 @@ public interface ComponentContainersClient { * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, 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. @@ -61,7 +63,7 @@ PagedIterable list( /** * 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. @@ -74,7 +76,7 @@ PagedIterable list( /** * 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. @@ -85,12 +87,12 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response getWithResponse(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. @@ -104,7 +106,7 @@ Response getWithResponse( /** * 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. @@ -116,12 +118,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, ComponentContainerInner 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. @@ -132,6 +134,6 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body); + ComponentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ComponentContainerInner 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..1d468588d315b 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,15 +8,20 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in ComponentVersionsClient. + */ public interface ComponentVersionsClient { /** * List component versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Component name. @@ -30,7 +35,7 @@ public interface ComponentVersionsClient { /** * List component versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Component name. @@ -38,6 +43,7 @@ public interface ComponentVersionsClient { * @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 stage Component 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. @@ -45,19 +51,12 @@ public interface ComponentVersionsClient { * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, 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. @@ -69,12 +68,12 @@ PagedIterable list( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -88,7 +87,7 @@ Response deleteWithResponse( /** * 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. @@ -100,12 +99,12 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + 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. @@ -120,7 +119,7 @@ Response getWithResponse( /** * 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. @@ -133,17 +132,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ComponentVersionInner body, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, ComponentVersionInner 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. @@ -155,6 +149,73 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body); + 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/ComputesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java index 5676a642b1704..1709d438d51cf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java @@ -13,15 +13,23 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; +import java.util.List; -/** An instance of this class provides access to all the operations defined in ComputesClient. */ +/** + * An instance of this class provides access to all the operations defined in ComputesClient. + */ public interface ComputesClient { /** * Gets computes in specified 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. @@ -34,7 +42,7 @@ public interface ComputesClient { /** * Gets computes in specified workspace. - * + * * @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. @@ -45,13 +53,13 @@ public interface ComputesClient { * @return computes in specified workspace as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -62,13 +70,13 @@ PagedIterable list( * @return compute definition by its name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, + Context context); /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -83,7 +91,7 @@ Response getWithResponse( /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -94,13 +102,13 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters); + SyncPoller, ComputeResourceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String computeName, ComputeResourceInner parameters); /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -112,17 +120,13 @@ SyncPoller, ComputeResourceInner> beginCreateOr * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context); + SyncPoller, ComputeResourceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String computeName, ComputeResourceInner parameters, Context context); /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -133,13 +137,13 @@ SyncPoller, ComputeResourceInner> beginCreateOr * @return machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner createOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters); + ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, + ComputeResourceInner parameters); /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -151,17 +155,13 @@ ComputeResourceInner createOrUpdate( * @return machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context); + ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, + ComputeResourceInner parameters, Context context); /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -172,13 +172,13 @@ ComputeResourceInner createOrUpdate( * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginUpdate( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters); + SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, + String workspaceName, String computeName, ClusterUpdateParameters parameters); /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -190,17 +190,13 @@ SyncPoller, ComputeResourceInner> beginUpdate( * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context); + SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, + String workspaceName, String computeName, ClusterUpdateParameters parameters, Context context); /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -211,13 +207,13 @@ SyncPoller, ComputeResourceInner> beginUpdate( * @return machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner update( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters); + ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters); /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -229,41 +225,34 @@ ComputeResourceInner update( * @return machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner update( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context); + ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters, Context context); /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 computeName, + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String computeName, UnderlyingResourceAction underlyingResourceAction); /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -271,56 +260,77 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction, Context context); /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 computeName, + void delete(String resourceGroupName, String workspaceName, String computeName, UnderlyingResourceAction underlyingResourceAction); /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context); + void delete(String resourceGroupName, String workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction, Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateCustomServicesWithResponse(String resourceGroupName, String workspaceName, String computeName, + List customServices, Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateCustomServices(String resourceGroupName, String workspaceName, String computeName, + List customServices); /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -328,15 +338,15 @@ void delete( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName); + PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName); /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -345,15 +355,15 @@ PagedIterable listNodes( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName, Context context); + PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName, Context context); /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -361,16 +371,16 @@ PagedIterable listNodes( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); + Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String computeName, Context context); /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -382,9 +392,41 @@ Response listKeysWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName); + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating 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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateDataMountsWithResponse(String resourceGroupName, String workspaceName, String computeName, + List dataMounts, Context context); + + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void updateDataMounts(String resourceGroupName, String workspaceName, String computeName, + List dataMounts); + /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -398,7 +440,7 @@ Response listKeysWithResponse( /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -409,12 +451,12 @@ Response listKeysWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart( - String resourceGroupName, String workspaceName, String computeName, Context context); + SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, String computeName, + Context context); /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -427,7 +469,7 @@ SyncPoller, Void> beginStart( /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -441,7 +483,7 @@ SyncPoller, Void> beginStart( /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -455,7 +497,7 @@ SyncPoller, Void> beginStart( /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -466,12 +508,12 @@ SyncPoller, Void> beginStart( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop( - String resourceGroupName, String workspaceName, String computeName, Context context); + SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, String computeName, + Context context); /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -484,7 +526,7 @@ SyncPoller, Void> beginStop( /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -498,7 +540,7 @@ SyncPoller, Void> beginStop( /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -512,7 +554,7 @@ SyncPoller, Void> beginStop( /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -523,12 +565,12 @@ SyncPoller, Void> beginStop( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestart( - String resourceGroupName, String workspaceName, String computeName, Context context); + SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, String computeName, + Context context); /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -541,7 +583,7 @@ SyncPoller, Void> beginRestart( /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -552,4 +594,130 @@ SyncPoller, Void> beginRestart( */ @ServiceMethod(returns = ReturnType.SINGLE) void restart(String resourceGroupName, String workspaceName, String computeName, Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateIdleShutdownSettingWithResponse(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters, Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateIdleShutdownSetting(String resourceGroupName, String workspaceName, String computeName, + IdleShutdownSetting parameters); + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAllowedResizeSizesWithResponse(String resourceGroupName, + String workspaceName, String computeName, Context context); + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualMachineSizeListResultInner getAllowedResizeSizes(String resourceGroupName, String workspaceName, + String computeName); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResize(String resourceGroupName, String workspaceName, String computeName, + ResizeSchema parameters); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResize(String resourceGroupName, String workspaceName, String computeName, + ResizeSchema parameters, Context context); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java index ac1a5e3331934..27ae140fa88d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java @@ -12,11 +12,13 @@ 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 DataContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in DataContainersClient. + */ public interface DataContainersClient { /** * List data 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. @@ -29,7 +31,7 @@ public interface DataContainersClient { /** * List data 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. @@ -41,12 +43,12 @@ public interface DataContainersClient { * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, 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. @@ -61,7 +63,7 @@ PagedIterable list( /** * 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. @@ -74,7 +76,7 @@ PagedIterable list( /** * 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. @@ -85,12 +87,12 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response getWithResponse(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. @@ -104,7 +106,7 @@ Response getWithResponse( /** * 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. @@ -116,12 +118,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + DataContainerInner 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. @@ -132,6 +134,6 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerInner body); + DataContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + DataContainerInner body); } 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..9ceb4a3f494be 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,15 +8,20 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in DataVersionsClient. + */ public interface DataVersionsClient { /** * List data versions in the data container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Data container's name. @@ -30,17 +35,18 @@ public interface DataVersionsClient { /** * List data versions in the data container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @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 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. + * including/excluding (for example) archived entities. + * @param stage data 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. @@ -48,20 +54,13 @@ public interface DataVersionsClient { * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, + PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, 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. @@ -73,12 +72,12 @@ PagedIterable list( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -92,7 +91,7 @@ Response deleteWithResponse( /** * 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. @@ -104,12 +103,12 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + 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. @@ -124,7 +123,7 @@ Response getWithResponse( /** * 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. @@ -137,17 +136,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - DataVersionBaseInner body, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + 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 workspaceName Name of Azure Machine Learning workspace. * @param name Container name. @@ -159,6 +153,73 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body); + 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/DatastoresClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java index ca474d283aa20..4f1a49380464a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java @@ -13,11 +13,13 @@ import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; import java.util.List; -/** An instance of this class provides access to all the operations defined in DatastoresClient. */ +/** + * An instance of this class provides access to all the operations defined in DatastoresClient. + */ public interface DatastoresClient { /** * List datastores. - * + * * @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. @@ -30,7 +32,7 @@ public interface DatastoresClient { /** * List datastores. - * + * * @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. @@ -47,21 +49,12 @@ public interface DatastoresClient { * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context); /** * Delete datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -76,7 +69,7 @@ PagedIterable list( /** * Delete datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -89,7 +82,7 @@ PagedIterable list( /** * Get datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -100,12 +93,12 @@ PagedIterable list( * @return datastore along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** * Get datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -119,7 +112,7 @@ Response getWithResponse( /** * Create or update datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -132,17 +125,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - DatastoreInner body, - Boolean skipValidation, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + DatastoreInner body, Boolean skipValidation, Context context); /** * Create or update datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -157,7 +145,7 @@ Response createOrUpdateWithResponse( /** * Get datastore secrets. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -168,12 +156,12 @@ Response createOrUpdateWithResponse( * @return datastore secrets along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** * Get datastore secrets. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java new file mode 100644 index 0000000000000..3a82e28c87024 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.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.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointType; + +/** + * An instance of this class provides access to all the operations defined in EndpointDeploymentsClient. + */ +public interface EndpointDeploymentsClient { + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName); + + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName, EndpointType endpointType, String skip, Context context); + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName); + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName, Context context); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Context context); + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointDeploymentResourcePropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName); + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body); + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context); + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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) + EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body); + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java new file mode 100644 index 0000000000000..798b8072de376 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java @@ -0,0 +1,246 @@ +// Copyright (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.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountModelInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; + +/** + * An instance of this class provides access to all the operations defined in EndpointsClient. + */ +public interface EndpointsClient { + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + EndpointType endpointType, String skip, Context context); + + /** + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, Context context); + + /** + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointResourcePropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName); + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body); + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body, Context context); + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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) + EndpointResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body); + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body, Context context); + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context); + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getModels(String resourceGroupName, String workspaceName, String endpointName); + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getModels(String resourceGroupName, String workspaceName, String endpointName, + Context context); + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body, Context context); + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + AccountApiKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateServiceAccountKeyContent body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java index 1719267cb0ca5..ab219d8a088c0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java @@ -12,11 +12,13 @@ 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 EnvironmentContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in EnvironmentContainersClient. + */ public interface EnvironmentContainersClient { /** * List environment 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. @@ -29,7 +31,7 @@ public interface EnvironmentContainersClient { /** * List environment 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. @@ -41,12 +43,12 @@ public interface EnvironmentContainersClient { * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, 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. @@ -61,7 +63,7 @@ PagedIterable list( /** * 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. @@ -74,7 +76,7 @@ PagedIterable list( /** * 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. @@ -85,12 +87,12 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response getWithResponse(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. @@ -104,7 +106,7 @@ Response getWithResponse( /** * 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. @@ -116,12 +118,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, EnvironmentContainerInner 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. @@ -132,6 +134,6 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body); + EnvironmentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + EnvironmentContainerInner body); } 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..4bce0d1217a4b 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,15 +8,20 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in EnvironmentVersionsClient. + */ public interface EnvironmentVersionsClient { /** * 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 Container name. This is case-sensitive. @@ -30,7 +35,7 @@ public interface EnvironmentVersionsClient { /** * 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 Container name. This is case-sensitive. @@ -38,6 +43,7 @@ public interface EnvironmentVersionsClient { * @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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. * @param context The context to associate with this 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,19 +51,12 @@ public interface EnvironmentVersionsClient { * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, 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. @@ -69,12 +68,12 @@ PagedIterable list( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -88,7 +87,7 @@ Response deleteWithResponse( /** * 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. @@ -100,12 +99,12 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + 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. @@ -120,7 +119,7 @@ Response getWithResponse( /** * Creates or updates an EnvironmentVersion. - * + * * @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. @@ -133,17 +132,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - EnvironmentVersionInner body, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, EnvironmentVersionInner body, Context context); /** * Creates or updates an EnvironmentVersion. - * + * * @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. @@ -155,6 +149,73 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body); + 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..ed237ab0ca7cd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java @@ -0,0 +1,94 @@ +// Copyright (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..0ced038e3d205 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.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.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..86b8128c91afd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java @@ -0,0 +1,301 @@ +// Copyright (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..dee9cb58f7205 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.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.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..aa9d4b1c549b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java @@ -0,0 +1,227 @@ +// Copyright (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/InferenceEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceEndpointsClient.java new file mode 100644 index 0000000000000..5ff3e17a2091d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceEndpointsClient.java @@ -0,0 +1,291 @@ +// Copyright (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.InferenceEndpointInner; +import com.azure.resourcemanager.machinelearning.models.OrderString; + +/** + * An instance of this class provides access to all the operations defined in InferenceEndpointsClient. + */ +public interface InferenceEndpointsClient { + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String poolName); + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, + String endpointName); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, + String endpointName, Context context); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, String endpointName); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, String endpointName, Context context); + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 inferenceEndpoint along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Context context); + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 inferenceEndpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceEndpointInner get(String resourceGroupName, String workspaceName, String poolName, String endpointName); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, InferenceEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, Object body); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, Object body, Context context); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + InferenceEndpointInner update(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Object body); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceEndpointInner update(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Object body, Context context); + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, InferenceEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, InferenceEndpointInner body); + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, InferenceEndpointInner body, Context context); + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + InferenceEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String endpointName, InferenceEndpointInner body); + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String endpointName, InferenceEndpointInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java new file mode 100644 index 0000000000000..c8e978a651a21 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java @@ -0,0 +1,362 @@ +// Copyright (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.GroupStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; + +/** + * An instance of this class provides access to all the operations defined in InferenceGroupsClient. + */ +public interface InferenceGroupsClient { + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String poolName); + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, + String groupName); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, + String groupName, Context context); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, String groupName); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, String groupName, Context context); + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 inferenceGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context); + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 inferenceGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceGroupInner get(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, InferenceGroupInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body); + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceGroupInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body, + Context context); + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + InferenceGroupInner update(String resourceGroupName, String workspaceName, String poolName, String groupName, + PartialMinimalTrackedResourceWithSku body); + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceGroupInner update(String resourceGroupName, String workspaceName, String poolName, String groupName, + PartialMinimalTrackedResourceWithSku body, Context context); + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, InferenceGroupInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, InferenceGroupInner body); + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceGroupInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, InferenceGroupInner body, Context context); + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + InferenceGroupInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String groupName, InferenceGroupInner body); + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceGroupInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String groupName, InferenceGroupInner body, Context context); + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getStatusWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context); + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GroupStatusInner getStatus(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group 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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName); + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java new file mode 100644 index 0000000000000..7335837f9295b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java @@ -0,0 +1,341 @@ +// Copyright (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.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PoolStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; + +/** + * An instance of this class provides access to all the operations defined in InferencePoolsClient. + */ +public interface InferencePoolsClient { + /** + * List InferencePools. + * + * @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 InferencePool entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferencePool entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + String tags, String properties, OrderString orderBy, Context context); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 inferencePoolName); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 inferencePoolName, Context context); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 inferencePoolName); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 inferencePoolName, Context context); + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context); + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferencePoolInner get(String resourceGroupName, String workspaceName, String inferencePoolName); + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, InferencePoolInner> beginUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body); + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferencePoolInner> beginUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body, + Context context); + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + InferencePoolInner update(String resourceGroupName, String workspaceName, String inferencePoolName, + PartialMinimalTrackedResourceWithSkuAndIdentity body); + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferencePoolInner update(String resourceGroupName, String workspaceName, String inferencePoolName, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, InferencePoolInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner body); + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferencePoolInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner body, Context context); + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + InferencePoolInner createOrUpdate(String resourceGroupName, String workspaceName, String inferencePoolName, + InferencePoolInner body); + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferencePoolInner createOrUpdate(String resourceGroupName, String workspaceName, String inferencePoolName, + InferencePoolInner body, Context context); + + /** + * Retrieve inference pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 getStatusWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context); + + /** + * Retrieve inference pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + PoolStatusInner getStatus(String resourceGroupName, String workspaceName, String inferencePoolName); + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group 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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSkus(String resourceGroupName, String workspaceName, String inferencePoolName); + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSkus(String resourceGroupName, String workspaceName, String inferencePoolName, + Integer count, String skip, 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..f272383c5cc87 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 @@ -13,12 +13,15 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.PartialJobBasePartialResource; -/** An instance of this class provides access to all the operations defined in JobsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsClient. + */ public interface JobsClient { /** * Lists Jobs in the 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. @@ -31,13 +34,17 @@ public interface JobsClient { /** * Lists Jobs in the workspace. - * + * * @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 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 property names (and optionally values). Example: prop1,prop2=value2. + * @param assetName Asset name the job's named output is registered with. + * @param scheduled Indicator whether the job is scheduled job. + * @param scheduleId The scheduled id for listing the job triggered from. * @param context The context to associate with this 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,18 +52,13 @@ public interface JobsClient { * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - String jobType, - String tag, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, + String tag, ListViewType listViewType, String properties, String assetName, Boolean scheduled, + String scheduleId, Context context); /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -70,7 +72,7 @@ PagedIterable list( /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -81,12 +83,12 @@ PagedIterable list( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String id, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id, + Context context); /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -99,7 +101,7 @@ SyncPoller, Void> beginDelete( /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -113,7 +115,7 @@ SyncPoller, Void> beginDelete( /** * Gets a Job by name/id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -128,7 +130,7 @@ SyncPoller, Void> beginDelete( /** * Gets a Job by name/id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -140,9 +142,42 @@ SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.SINGLE) JobBaseInner get(String resourceGroupName, String workspaceName, String id); + /** + * Updates a Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition to apply during the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String workspaceName, String id, + PartialJobBasePartialResource body, Context context); + + /** + * Updates a Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition to apply during the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + JobBaseInner update(String resourceGroupName, String workspaceName, String id, PartialJobBasePartialResource body); + /** * 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. * @param id The name and identifier for the Job. This is case-sensitive. @@ -154,12 +189,13 @@ SyncPoller, Void> beginDelete( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String id, + JobBaseInner body, Context context); /** * 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. * @param id The name and identifier for the Job. This is case-sensitive. @@ -174,7 +210,7 @@ Response createOrUpdateWithResponse( /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -188,7 +224,7 @@ Response createOrUpdateWithResponse( /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -199,12 +235,12 @@ Response createOrUpdateWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCancel( - String resourceGroupName, String workspaceName, String id, Context context); + SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id, + Context context); /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -217,7 +253,7 @@ SyncPoller, Void> beginCancel( /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/LabelingJobsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/LabelingJobsClient.java new file mode 100644 index 0000000000000..ff0f7fa1fa1c0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/LabelingJobsClient.java @@ -0,0 +1,333 @@ +// Copyright (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.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; + +/** + * An instance of this class provides access to all the operations defined in LabelingJobsClient. + */ +public interface LabelingJobsClient { + /** + * Lists labeling jobs in the 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 a paginated list of LabelingJob entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists labeling jobs in the workspace. + * + * @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 top Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 LabelingJob entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer top, + Context context); + + /** + * Delete a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + + /** + * Delete a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 id); + + /** + * Gets a labeling job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String id, + Context context); + + /** + * Gets a labeling job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobInner get(String resourceGroupName, String workspaceName, String id); + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LabelingJobInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String id, LabelingJobInner body); + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LabelingJobInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String id, LabelingJobInner body, Context context); + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobInner createOrUpdate(String resourceGroupName, String workspaceName, String id, LabelingJobInner body); + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobInner createOrUpdate(String resourceGroupName, String workspaceName, String id, LabelingJobInner body, + Context context); + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, ExportSummaryInner> beginExportLabels(String resourceGroupName, + String workspaceName, String id, ExportSummaryInner body); + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, ExportSummaryInner> beginExportLabels(String resourceGroupName, + String workspaceName, String id, ExportSummaryInner body, Context context); + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + ExportSummaryInner exportLabels(String resourceGroupName, String workspaceName, String id, ExportSummaryInner body); + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + ExportSummaryInner exportLabels(String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, + Context context); + + /** + * Pause a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response pauseWithResponse(String resourceGroupName, String workspaceName, String id, + Context context); + + /** + * Pause a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobPropertiesInner pause(String resourceGroupName, String workspaceName, String id); + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of labeling job definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LabelingJobPropertiesInner> beginResume(String resourceGroupName, + String workspaceName, String id); + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of labeling job definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LabelingJobPropertiesInner> beginResume(String resourceGroupName, + String workspaceName, String id, Context context); + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobPropertiesInner resume(String resourceGroupName, String workspaceName, String id); + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LabelingJobPropertiesInner resume(String resourceGroupName, String workspaceName, String id, Context context); +} 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..d465c7a581e86 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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..03336b3bbbb45 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.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.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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 long-running operation. + */ + @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 Azure Machine Learning Workspace Name. + * @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 long-running operation. + */ + @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 Azure Machine Learning Workspace Name. + * @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 response. + */ + @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 Azure Machine Learning Workspace Name. + * @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 response. + */ + @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/MarketplaceSubscriptionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java new file mode 100644 index 0000000000000..33ef9a340bac5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.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.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.MarketplaceSubscriptionInner; + +/** + * An instance of this class provides access to all the operations defined in MarketplaceSubscriptionsClient. + */ +public interface MarketplaceSubscriptionsClient { + /** + * List 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 MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 workspaceName, String name); + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 workspaceName, String name, + Context context); + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 workspaceName, String name); + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + MarketplaceSubscriptionInner get(String resourceGroupName, String workspaceName, String name); + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, MarketplaceSubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body); + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, + Context context); + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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) + MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner body); + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java index 980ec45c56a38..847e25e1e82a9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java @@ -12,11 +12,13 @@ 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 ModelContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in ModelContainersClient. + */ public interface ModelContainersClient { /** * List model 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. @@ -29,7 +31,7 @@ public interface ModelContainersClient { /** * List model 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. @@ -42,17 +44,12 @@ public interface ModelContainersClient { * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + ListViewType listViewType, 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. @@ -67,7 +64,7 @@ PagedIterable list( /** * 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. @@ -80,7 +77,7 @@ PagedIterable list( /** * 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. @@ -91,12 +88,12 @@ PagedIterable list( * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response getWithResponse(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. @@ -110,7 +107,7 @@ Response getWithResponse( /** * 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. @@ -122,12 +119,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, ModelContainerInner 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. @@ -138,6 +135,6 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body); + ModelContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ModelContainerInner body); } 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..7768b13301786 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,15 +8,22 @@ 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.PackageResponseInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.PackageRequest; -/** An instance of this class provides access to all the operations defined in ModelVersionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ModelVersionsClient. + */ public interface ModelVersionsClient { /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -30,7 +37,7 @@ public interface ModelVersionsClient { /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -44,6 +51,7 @@ public interface ModelVersionsClient { * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. * @param feed Name of the feed. * @param listViewType View type for including/excluding (for example) archived entities. + * @param stage Model 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. @@ -51,25 +59,13 @@ public interface ModelVersionsClient { * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, + String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, + String feed, ListViewType listViewType, 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. @@ -81,12 +77,12 @@ PagedIterable list( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -100,7 +96,7 @@ Response deleteWithResponse( /** * 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. @@ -112,12 +108,12 @@ Response deleteWithResponse( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + 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. @@ -132,7 +128,7 @@ Response getWithResponse( /** * 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. @@ -145,17 +141,12 @@ Response getWithResponse( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ModelVersionInner body, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + String version, ModelVersionInner 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. @@ -167,6 +158,145 @@ Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body); + ModelVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + ModelVersionInner body); + + /** + * Model Version Package 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 Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PackageResponseInner> beginPackageMethod(String resourceGroupName, + String workspaceName, String name, String version, PackageRequest body); + + /** + * Model Version Package 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 Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PackageResponseInner> beginPackageMethod(String resourceGroupName, + String workspaceName, String name, String version, PackageRequest body, Context context); + + /** + * Model Version Package 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 Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PackageResponseInner packageMethod(String resourceGroupName, String workspaceName, String name, String version, + PackageRequest body); + + /** + * Model Version Package 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 Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PackageResponseInner packageMethod(String resourceGroupName, String workspaceName, String name, String version, + PackageRequest 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. + * @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/OnlineDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java index 8b20629178a8b..0f4e1a6102b29 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java @@ -17,11 +17,13 @@ import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; -/** An instance of this class provides access to all the operations defined in OnlineDeploymentsClient. */ +/** + * An instance of this class provides access to all the operations defined in OnlineDeploymentsClient. + */ public interface OnlineDeploymentsClient { /** * List Inference Endpoint Deployments. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -35,7 +37,7 @@ public interface OnlineDeploymentsClient { /** * List Inference Endpoint Deployments. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -49,18 +51,12 @@ public interface OnlineDeploymentsClient { * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context); /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -71,12 +67,12 @@ PagedIterable list( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -88,12 +84,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -107,7 +103,7 @@ SyncPoller, Void> beginDelete( /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -118,12 +114,12 @@ SyncPoller, Void> beginDelete( * @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 endpointName, String deploymentName, Context context); + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); /** * Get Inference Deployment Deployment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -135,12 +131,12 @@ void delete( * @return inference Deployment Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** * Get Inference Deployment Deployment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -151,12 +147,12 @@ Response getWithResponse( * @return inference Deployment Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + OnlineDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -168,16 +164,12 @@ OnlineDeploymentInner get( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body); + SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body); /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -190,17 +182,13 @@ SyncPoller, OnlineDeploymentInner> beginUpdate * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, + SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context); /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -212,16 +200,12 @@ SyncPoller, OnlineDeploymentInner> beginUpdate * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body); + OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialMinimalTrackedResourceWithSku body); /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -234,17 +218,12 @@ OnlineDeploymentInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context); + OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context); /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -256,16 +235,12 @@ OnlineDeploymentInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body); + SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body); /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -278,17 +253,12 @@ SyncPoller, OnlineDeploymentInner> beginCreate * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context); + SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body, Context context); /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -300,16 +270,12 @@ SyncPoller, OnlineDeploymentInner> beginCreate * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body); + OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, OnlineDeploymentInner body); /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -322,17 +288,12 @@ OnlineDeploymentInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context); + OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, OnlineDeploymentInner body, Context context); /** * Polls an Endpoint operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -345,17 +306,12 @@ OnlineDeploymentInner createOrUpdate( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getLogsWithResponse( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context); + Response getLogsWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, DeploymentLogsRequest body, Context context); /** * Polls an Endpoint operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -367,16 +323,12 @@ Response getLogsWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentLogsInner getLogs( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body); + DeploymentLogsInner getLogs(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, DeploymentLogsRequest body); /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -387,12 +339,12 @@ DeploymentLogsInner getLogs( * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -406,12 +358,6 @@ PagedIterable listSkus( * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context); + PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Integer count, String skip, 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..0eb371edea142 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 @@ -19,11 +19,13 @@ import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -/** An instance of this class provides access to all the operations defined in OnlineEndpointsClient. */ +/** + * An instance of this class provides access to all the operations defined in OnlineEndpointsClient. + */ public interface OnlineEndpointsClient { /** * List Online Endpoints. - * + * * @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. @@ -36,7 +38,7 @@ public interface OnlineEndpointsClient { /** * List Online Endpoints. - * + * * @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 the endpoint. @@ -44,9 +46,9 @@ public interface OnlineEndpointsClient { * @param computeType EndpointComputeType to be filtered by. * @param skip Continuation token for pagination. * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . * @param orderBy The option to order the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -55,21 +57,13 @@ public interface OnlineEndpointsClient { * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, + PagedIterable list(String resourceGroupName, String workspaceName, String name, Integer count, + EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy, Context context); /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -83,7 +77,7 @@ PagedIterable list( /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -94,12 +88,12 @@ PagedIterable list( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -112,7 +106,7 @@ SyncPoller, Void> beginDelete( /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -126,7 +120,7 @@ SyncPoller, Void> beginDelete( /** * Get Online Endpoint. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -137,12 +131,12 @@ SyncPoller, Void> beginDelete( * @return online Endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** * Get Online Endpoint. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -156,7 +150,7 @@ Response getWithResponse( /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -167,15 +161,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body); + SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body); /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -187,16 +178,12 @@ SyncPoller, OnlineEndpointInner> beginUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context); + SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context); /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -207,15 +194,12 @@ SyncPoller, OnlineEndpointInner> beginUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, + OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body); /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -227,16 +211,12 @@ OnlineEndpointInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context); + OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body, Context context); /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -247,12 +227,12 @@ OnlineEndpointInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body); + SyncPoller, OnlineEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, OnlineEndpointInner body); /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -264,12 +244,12 @@ SyncPoller, OnlineEndpointInner> beginCreateOrUp * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, Context context); + SyncPoller, OnlineEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, OnlineEndpointInner body, Context context); /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -280,12 +260,12 @@ SyncPoller, OnlineEndpointInner> beginCreateOrUp * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body); + OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + OnlineEndpointInner body); /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -297,12 +277,12 @@ OnlineEndpointInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, Context context); + OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + OnlineEndpointInner body, Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -313,12 +293,12 @@ OnlineEndpointInner createOrUpdate( * @return keys for endpoint authentication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -332,7 +312,7 @@ Response listKeysWithResponse( /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -343,12 +323,12 @@ Response listKeysWithResponse( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRegenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body); + SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, + String endpointName, RegenerateEndpointKeysRequest body); /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -360,16 +340,12 @@ SyncPoller, Void> beginRegenerateKeys( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRegenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context); + SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, + String endpointName, RegenerateEndpointKeysRequest body, Context context); /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -379,12 +355,12 @@ SyncPoller, Void> beginRegenerateKeys( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void regenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body); + void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateEndpointKeysRequest body); /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -395,16 +371,12 @@ void regenerateKeys( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void regenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context); + void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -415,12 +387,12 @@ void regenerateKeys( * @return service Token along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getTokenWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + 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. * @param endpointName Online Endpoint name. 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..b222e86651c94 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,31 +8,33 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Lists all of the available Azure Machine Learning Workspaces REST API 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 - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + PagedIterable list(); /** * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @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 - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + PagedIterable list(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java index 2b613c7f88e3f..fa48b2a483c86 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java @@ -11,75 +11,74 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public interface PrivateEndpointConnectionsClient { /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName, Context context); /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 specified private endpoint connection associated with the workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** - * Update the state of specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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. @@ -87,58 +86,56 @@ PrivateEndpointConnectionInner get( * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties, - Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** - * Update the state of specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties); + PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName); /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection 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 {@link Response}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner body, Context context); /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection 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 Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java index 1dc6edf69f64a..d26cec6172460 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java @@ -6,37 +6,46 @@ import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public interface PrivateLinkResourcesClient { /** - * Gets the private link resources that need to be created for a workspace. - * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace along with {@link Response}. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets the private link resources that need to be created for a workspace. - * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java index f7d696e1bf38f..bff12926f7fb4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java @@ -13,11 +13,13 @@ import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -/** An instance of this class provides access to all the operations defined in QuotasClient. */ +/** + * An instance of this class provides access to all the operations defined in QuotasClient. + */ public interface QuotasClient { /** * Update quota for each VM family in workspace. - * + * * @param location The location for update quota is queried. * @param parameters Quota update parameters. * @param context The context to associate with this operation. @@ -27,12 +29,12 @@ public interface QuotasClient { * @return the result of update workspace quota along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context); + Response updateWithResponse(String location, QuotaUpdateParameters parameters, + Context context); /** * Update quota for each VM family in workspace. - * + * * @param location The location for update quota is queried. * @param parameters Quota update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,27 +47,27 @@ Response updateWithResponse( /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. + * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location); /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. + * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location, 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..30efcfc24822b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java @@ -0,0 +1,297 @@ +// Copyright (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..db782ef7731df --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java @@ -0,0 +1,200 @@ +// Copyright (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..abda21cb6547f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java @@ -0,0 +1,253 @@ +// Copyright (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..4ab7c9853bf6f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.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.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..b19e26c2cf8a0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java @@ -0,0 +1,217 @@ +// Copyright (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 stage Component 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 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, String stage, 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..e53c73329815e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java @@ -0,0 +1,203 @@ +// Copyright (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..f6ba6cf82f597 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.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.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 value. + * + * @param resourceGroupName 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 value 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 value. + * + * @param resourceGroupName 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 value. + */ + @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..746599d4390ab --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java @@ -0,0 +1,258 @@ +// Copyright (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..1a05274522d5b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java @@ -0,0 +1,205 @@ +// Copyright (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..6bdb77f86ac39 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java @@ -0,0 +1,221 @@ +// Copyright (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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, String stage, 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..ffd6476b53c6d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java @@ -0,0 +1,203 @@ +// Copyright (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..f18c936f091f6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java @@ -0,0 +1,334 @@ +// Copyright (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.PackageResponseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.PackageRequest; +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); + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PackageResponseInner> beginPackageMethod(String resourceGroupName, + String registryName, String modelName, String version, PackageRequest body); + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PackageResponseInner> beginPackageMethod(String resourceGroupName, + String registryName, String modelName, String version, PackageRequest body, Context context); + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PackageResponseInner packageMethod(String resourceGroupName, String registryName, String modelName, String version, + PackageRequest body); + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PackageResponseInner packageMethod(String resourceGroupName, String registryName, String modelName, String version, + PackageRequest 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/SchedulesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java index ad9f8256ddeed..498b971eb6b70 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java @@ -12,13 +12,17 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; +import com.azure.resourcemanager.machinelearning.fluent.models.TriggerRunSubmissionDtoInner; import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; +import com.azure.resourcemanager.machinelearning.models.TriggerOnceRequest; -/** An instance of this class provides access to all the operations defined in SchedulesClient. */ +/** + * An instance of this class provides access to all the operations defined in SchedulesClient. + */ public interface SchedulesClient { /** * List schedules in specified 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. @@ -31,7 +35,7 @@ public interface SchedulesClient { /** * List schedules in specified workspace. - * + * * @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. @@ -43,16 +47,12 @@ public interface SchedulesClient { * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context); /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -66,7 +66,7 @@ PagedIterable list( /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -77,12 +77,12 @@ PagedIterable list( * @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); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context); /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -95,7 +95,7 @@ SyncPoller, Void> beginDelete( /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -109,7 +109,7 @@ SyncPoller, Void> beginDelete( /** * Get schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -120,12 +120,12 @@ SyncPoller, Void> beginDelete( * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** * Get schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -139,7 +139,7 @@ Response getWithResponse( /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -150,12 +150,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScheduleInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body); + SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, ScheduleInner body); /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -167,12 +167,12 @@ SyncPoller, ScheduleInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScheduleInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context); + SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, ScheduleInner body, Context context); /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -187,7 +187,7 @@ SyncPoller, ScheduleInner> beginCreateOrUpdate( /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -199,6 +199,39 @@ SyncPoller, ScheduleInner> beginCreateOrUpdate( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context); + ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body, + Context context); + + /** + * Trigger run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Request body for trigger once. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 triggerWithResponse(String resourceGroupName, String workspaceName, + String name, TriggerOnceRequest body, Context context); + + /** + * Trigger run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Request body for trigger once. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + TriggerRunSubmissionDtoInner trigger(String resourceGroupName, String workspaceName, String name, + TriggerOnceRequest body); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java new file mode 100644 index 0000000000000..4a8ede4e5b47b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java @@ -0,0 +1,397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointStatusInner; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; + +/** + * An instance of this class provides access to all the operations defined in ServerlessEndpointsClient. + */ +public interface ServerlessEndpointsClient { + /** + * List Serverless Endpoints. + * + * @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 ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List Serverless Endpoints. + * + * @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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name); + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name, + Context context); + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name); + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name, Context context); + + /** + * Get Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 serverless Endpoint along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); + + /** + * Get Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 serverless Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerlessEndpointInner get(String resourceGroupName, String workspaceName, String name); + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, ServerlessEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String name, PartialMinimalTrackedResourceWithSkuAndIdentity body); + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ServerlessEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String name, PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body); + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, ServerlessEndpointInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body); + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ServerlessEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context); + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body); + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body, Context context); + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getStatusWithResponse(String resourceGroupName, String workspaceName, + String name, Context context); + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServerlessEndpointStatusInner getStatus(String resourceGroupName, String workspaceName, String name); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 keys for endpoint authentication along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKeysWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String name); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys(String resourceGroupName, + String workspaceName, String name, RegenerateEndpointKeysRequest body); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys(String resourceGroupName, + String workspaceName, String name, RegenerateEndpointKeysRequest body, Context context); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java index e51b16de1b3d9..675c00685de40 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java @@ -10,31 +10,33 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -/** An instance of this class provides access to all the operations defined in UsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in UsagesClient. + */ public interface UsagesClient { /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location); /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location, Context context); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java index 15b40d65457f1..c0febf79a6e40 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; -/** An instance of this class provides access to all the operations defined in VirtualMachineSizesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualMachineSizesClient. + */ public interface VirtualMachineSizesClient { /** * Returns supported VM Sizes in a location. - * + * * @param location The location upon which virtual-machine-sizes is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -27,7 +29,7 @@ public interface VirtualMachineSizesClient { /** * Returns supported VM Sizes in a location. - * + * * @param location The location upon which virtual-machine-sizes is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java index 442aaf6a54807..b8586b0a5ba97 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java @@ -8,57 +8,117 @@ 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.WorkspaceConnectionPropertiesV2BasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter; -/** An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. + */ public interface WorkspaceConnectionsClient { /** - * The create operation. - * + * Lists all the available machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + String workspaceName); + + /** + * Lists all the available machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param target Target of the workspace connection. + * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + String workspaceName, String target, String category, Boolean includeAll, Context context); + + /** + * Delete machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters, + Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, Context context); /** - * The create operation. - * + * Delete machine learning workspaces connections by name. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 connectionName); + + /** + * Lists machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String aoaiModelsToDeploy, Context context); + + /** + * Lists machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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) - WorkspaceConnectionPropertiesV2BasicResourceInner create( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters); + WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName); /** - * The get operation. - * + * Update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body Parameters for workspace connection 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. @@ -66,14 +126,14 @@ WorkspaceConnectionPropertiesV2BasicResourceInner create( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); + Response updateWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionUpdateParameter body, Context context); /** - * The get operation. - * + * Update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -81,66 +141,132 @@ Response getWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionPropertiesV2BasicResourceInner get( - String resourceGroupName, String workspaceName, String connectionName); + WorkspaceConnectionPropertiesV2BasicResourceInner update(String resourceGroupName, String workspaceName, + String connectionName); /** - * The delete operation. - * + * Create or update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body The object for creating or updating a new workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); + Response createWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, + Context context); /** - * The delete operation. - * + * Create or update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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) - void delete(String resourceGroupName, String workspaceName, String connectionName); + WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName); /** - * The list operation. - * + * List all the secrets of a machine learning workspaces connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSecretsWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String aoaiModelsToDeploy, Context context); /** - * The list operation. - * + * List all the secrets of a machine learning workspaces connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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> beginTestConnection(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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 paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginTestConnection(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 testConnection(String resourceGroupName, String workspaceName, String connectionName); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java index 9c67243899aba..8437e6ab4254e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -/** An instance of this class provides access to all the operations defined in WorkspaceFeaturesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspaceFeaturesClient. + */ public interface WorkspaceFeaturesClient { /** * Lists all enabled features for a 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. @@ -27,7 +29,7 @@ public interface WorkspaceFeaturesClient { /** * Lists all enabled features for a 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. 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..f59e61833c08c 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 @@ -19,173 +19,175 @@ import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspacesClient. + */ public interface WorkspacesClient { /** - * Gets the properties of the specified 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. + * Lists all the available machine learning workspaces under the specified 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 the properties of the specified machine learning workspace along with {@link Response}. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String kind, String skip, String aiCapabilities, Context context); /** - * Creates or updates a workspace with the specified parameters. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating 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 an object that represents a machine learning workspace. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Creates or updates a workspace with the specified parameters. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String kind, String skip, + String aiCapabilities, Context context); /** - * Creates or updates a workspace with the specified parameters. - * + * 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 parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 an object that represents a machine learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); /** - * Creates or updates a workspace with the specified parameters. - * + * 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 parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @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. - * @return an object that represents a machine learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Boolean forceToPurge, + Context 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 workspaceName Azure Machine Learning Workspace 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 workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + 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 workspaceName Azure Machine Learning Workspace Name. + * @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. - * @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); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context); /** - * Deletes a machine learning workspace. - * + * Gets the properties of the specified 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 workspaceName Azure Machine Learning Workspace 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 properties of the specified machine learning workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context); /** - * Deletes a machine learning workspace. - * + * Gets the properties of the specified 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. + * @param workspaceName Azure Machine Learning Workspace 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 properties of the specified machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, Context context); + WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters); + SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body); /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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. @@ -193,29 +195,29 @@ SyncPoller, WorkspaceInner> beginUpdate( * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context); + SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body, Context context); /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters); + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParametersInner body); /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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. @@ -223,57 +225,89 @@ SyncPoller, WorkspaceInner> beginUpdate( * @return an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context); + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParametersInner body, + Context context); /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Creates or updates a workspace with the specified parameters. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner body); /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Creates or updates a workspace with the specified parameters. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner body, Context context); + + /** + * Creates or updates a workspace with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 an object that represents a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner body); + + /** + * Creates or updates a workspace with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 an object that represents a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner body, Context context); /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName); + SyncPoller, DiagnoseResponseResultInner> + beginDiagnose(String resourceGroupName, String workspaceName); /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -282,13 +316,13 @@ SyncPoller, DiagnoseResponseResultInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context); + String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body, Context context); /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -299,10 +333,10 @@ SyncPoller, DiagnoseResponseResultInner> /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -310,15 +344,15 @@ SyncPoller, DiagnoseResponseResultInner> * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - DiagnoseResponseResultInner diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context); + DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body, Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -326,15 +360,15 @@ DiagnoseResponseResultInner diagnose( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); + Response listKeysWithResponse(String resourceGroupName, String workspaceName, + Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -344,91 +378,94 @@ Response listKeysWithResponse( ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Get Azure Machine Learning Workspace notebook access token. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. + * @return azure Machine Learning Workspace notebook access token along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listNotebookAccessTokenWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Get Azure Machine Learning Workspace notebook access token. + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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. + * @return azure Machine Learning Workspace notebook access token. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName); + Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, + Context context); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName, Context context); + ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName); /** - * Lists all the available machine learning workspaces under the specified subscription. - * + * Lists keys of Azure Machine Learning Workspace's storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listStorageAccountKeysWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * Lists keys of Azure Machine Learning Workspace's storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skip, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName); /** - * return notebook access token and refresh token. - * + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -436,41 +473,41 @@ Response listKeysWithResponse( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookAccessTokenWithResponse( - String resourceGroupName, String workspaceName, Context context); + Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * return notebook access token and refresh token. - * + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName); + ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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, NotebookResourceInfoInner> beginPrepareNotebook( - String resourceGroupName, String workspaceName); + SyncPoller, NotebookResourceInfoInner> + beginPrepareNotebook(String resourceGroupName, String workspaceName); /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -478,14 +515,14 @@ SyncPoller, NotebookResourceInfoInner> beg * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( - String resourceGroupName, String workspaceName, Context context); + SyncPoller, NotebookResourceInfoInner> + beginPrepareNotebook(String resourceGroupName, String workspaceName, Context context); /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -495,10 +532,10 @@ SyncPoller, NotebookResourceInfoInner> beg NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName); /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -509,86 +546,58 @@ SyncPoller, NotebookResourceInfoInner> beg NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context); /** - * List storage account keys of a 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 the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listStorageAccountKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * List storage account keys of a workspace. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName); /** - * List keys of a notebook. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, Context context); /** - * List keys of a notebook. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName); + void resyncKeys(String resourceGroupName, String workspaceName); /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); + void resyncKeys(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java new file mode 100644 index 0000000000000..09e66b7de2b4a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AccountApiKeys model. + */ +@Fluent +public final class AccountApiKeysInner { + /* + * The key1 property. + */ + @JsonProperty(value = "key1") + private String key1; + + /* + * The key2 property. + */ + @JsonProperty(value = "key2") + private String key2; + + /** + * Creates an instance of AccountApiKeysInner class. + */ + public AccountApiKeysInner() { + } + + /** + * Get the key1 property: The key1 property. + * + * @return the key1 value. + */ + public String key1() { + return this.key1; + } + + /** + * Set the key1 property: The key1 property. + * + * @param key1 the key1 value to set. + * @return the AccountApiKeysInner object itself. + */ + public AccountApiKeysInner withKey1(String key1) { + this.key1 = key1; + return this; + } + + /** + * Get the key2 property: The key2 property. + * + * @return the key2 value. + */ + public String key2() { + return this.key2; + } + + /** + * Set the key2 property: The key2 property. + * + * @param key2 the key2 value to set. + * @return the AccountApiKeysInner object itself. + */ + public AccountApiKeysInner withKey2(String key2) { + this.key2 = key2; + 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/AccountModelInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountModelInner.java new file mode 100644 index 0000000000000..98b2635d15b4b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountModelInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.models.DeploymentModel; +import com.azure.resourcemanager.machinelearning.models.ModelDeprecationInfo; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +import com.azure.resourcemanager.machinelearning.models.ModelSku; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Cognitive Services account Model. + */ +@Fluent +public final class AccountModelInner extends DeploymentModel { + /* + * Base Model Identifier. + */ + @JsonProperty(value = "baseModel") + private DeploymentModel baseModel; + + /* + * If the model is default version. + */ + @JsonProperty(value = "isDefaultVersion") + private Boolean isDefaultVersion; + + /* + * The list of Model Sku. + */ + @JsonProperty(value = "skus") + private List skus; + + /* + * The max capacity. + */ + @JsonProperty(value = "maxCapacity") + private Integer maxCapacity; + + /* + * The capabilities. + */ + @JsonProperty(value = "capabilities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map capabilities; + + /* + * The capabilities for finetune models. + */ + @JsonProperty(value = "finetuneCapabilities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map finetuneCapabilities; + + /* + * Cognitive Services account ModelDeprecationInfo. + */ + @JsonProperty(value = "deprecation") + private ModelDeprecationInfo deprecation; + + /* + * Model lifecycle status. + */ + @JsonProperty(value = "lifecycleStatus") + private ModelLifecycleStatus lifecycleStatus; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AccountModelInner class. + */ + public AccountModelInner() { + } + + /** + * Get the baseModel property: Base Model Identifier. + * + * @return the baseModel value. + */ + public DeploymentModel baseModel() { + return this.baseModel; + } + + /** + * Set the baseModel property: Base Model Identifier. + * + * @param baseModel the baseModel value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withBaseModel(DeploymentModel baseModel) { + this.baseModel = baseModel; + return this; + } + + /** + * Get the isDefaultVersion property: If the model is default version. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Set the isDefaultVersion property: If the model is default version. + * + * @param isDefaultVersion the isDefaultVersion value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withIsDefaultVersion(Boolean isDefaultVersion) { + this.isDefaultVersion = isDefaultVersion; + return this; + } + + /** + * Get the skus property: The list of Model Sku. + * + * @return the skus value. + */ + public List skus() { + return this.skus; + } + + /** + * Set the skus property: The list of Model Sku. + * + * @param skus the skus value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withSkus(List skus) { + this.skus = skus; + return this; + } + + /** + * Get the maxCapacity property: The max capacity. + * + * @return the maxCapacity value. + */ + public Integer maxCapacity() { + return this.maxCapacity; + } + + /** + * Set the maxCapacity property: The max capacity. + * + * @param maxCapacity the maxCapacity value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withMaxCapacity(Integer maxCapacity) { + this.maxCapacity = maxCapacity; + return this; + } + + /** + * Get the capabilities property: The capabilities. + * + * @return the capabilities value. + */ + public Map capabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: The capabilities. + * + * @param capabilities the capabilities value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withCapabilities(Map capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Get the finetuneCapabilities property: The capabilities for finetune models. + * + * @return the finetuneCapabilities value. + */ + public Map finetuneCapabilities() { + return this.finetuneCapabilities; + } + + /** + * Set the finetuneCapabilities property: The capabilities for finetune models. + * + * @param finetuneCapabilities the finetuneCapabilities value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withFinetuneCapabilities(Map finetuneCapabilities) { + this.finetuneCapabilities = finetuneCapabilities; + return this; + } + + /** + * Get the deprecation property: Cognitive Services account ModelDeprecationInfo. + * + * @return the deprecation value. + */ + public ModelDeprecationInfo deprecation() { + return this.deprecation; + } + + /** + * Set the deprecation property: Cognitive Services account ModelDeprecationInfo. + * + * @param deprecation the deprecation value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withDeprecation(ModelDeprecationInfo deprecation) { + this.deprecation = deprecation; + return this; + } + + /** + * Get the lifecycleStatus property: Model lifecycle status. + * + * @return the lifecycleStatus value. + */ + public ModelLifecycleStatus lifecycleStatus() { + return this.lifecycleStatus; + } + + /** + * Set the lifecycleStatus property: Model lifecycle status. + * + * @param lifecycleStatus the lifecycleStatus value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withLifecycleStatus(ModelLifecycleStatus lifecycleStatus) { + this.lifecycleStatus = lifecycleStatus; + return this; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountModelInner withFormat(String format) { + super.withFormat(format); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountModelInner withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountModelInner withVersion(String version) { + super.withVersion(version); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountModelInner withSource(String source) { + super.withSource(source); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (baseModel() != null) { + baseModel().validate(); + } + if (skus() != null) { + skus().forEach(e -> e.validate()); + } + if (deprecation() != null) { + deprecation().validate(); + } + } +} 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/AmlUserFeatureInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java index a089fbd59b950..bae224cfd3aac 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Features enabled for a workspace. */ +/** + * Features enabled for a workspace. + */ @Fluent public final class AmlUserFeatureInner { /* @@ -28,13 +30,15 @@ public final class AmlUserFeatureInner { @JsonProperty(value = "description") private String description; - /** Creates an instance of AmlUserFeatureInner class. */ + /** + * Creates an instance of AmlUserFeatureInner class. + */ public AmlUserFeatureInner() { } /** * Get the id property: Specifies the feature ID. - * + * * @return the id value. */ public String id() { @@ -43,7 +47,7 @@ public String id() { /** * Set the id property: Specifies the feature ID. - * + * * @param id the id value to set. * @return the AmlUserFeatureInner object itself. */ @@ -54,7 +58,7 @@ public AmlUserFeatureInner withId(String id) { /** * Get the displayName property: Specifies the feature name. - * + * * @return the displayName value. */ public String displayName() { @@ -63,7 +67,7 @@ public String displayName() { /** * Set the displayName property: Specifies the feature name. - * + * * @param displayName the displayName value to set. * @return the AmlUserFeatureInner object itself. */ @@ -74,7 +78,7 @@ public AmlUserFeatureInner withDisplayName(String displayName) { /** * Get the description property: Describes the feature for user experience. - * + * * @return the description value. */ public String description() { @@ -83,7 +87,7 @@ public String description() { /** * Set the description property: Describes the feature for user experience. - * + * * @param description the description value to set. * @return the AmlUserFeatureInner object itself. */ @@ -94,7 +98,7 @@ public AmlUserFeatureInner withDescription(String 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/fluent/models/BatchDeploymentInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java index 3ec008adca648..f815044dfc61c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The BatchDeployment model. */ +/** + * The BatchDeployment model. + */ @Fluent public final class BatchDeploymentInner extends Resource { /* @@ -47,13 +49,15 @@ public final class BatchDeploymentInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of BatchDeploymentInner class. */ + /** + * Creates an instance of BatchDeploymentInner class. + */ public BatchDeploymentInner() { } /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -62,7 +66,7 @@ public ManagedServiceIdentity identity() { /** * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @param identity the identity value to set. * @return the BatchDeploymentInner object itself. */ @@ -74,7 +78,7 @@ public BatchDeploymentInner withIdentity(ManagedServiceIdentity identity) { /** * 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() { @@ -84,7 +88,7 @@ public String 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 BatchDeploymentInner object itself. */ @@ -95,7 +99,7 @@ public BatchDeploymentInner withKind(String kind) { /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public BatchDeploymentProperties properties() { @@ -104,7 +108,7 @@ public BatchDeploymentProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the BatchDeploymentInner object itself. */ @@ -115,7 +119,7 @@ public BatchDeploymentInner withProperties(BatchDeploymentProperties properties) /** * Get the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @return the sku value. */ public Sku sku() { @@ -124,7 +128,7 @@ public Sku sku() { /** * Set the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @param sku the sku value to set. * @return the BatchDeploymentInner object itself. */ @@ -135,21 +139,25 @@ public BatchDeploymentInner withSku(Sku sku) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchDeploymentInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchDeploymentInner withTags(Map tags) { super.withTags(tags); @@ -158,7 +166,7 @@ public BatchDeploymentInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -166,9 +174,8 @@ public void validate() { identity().validate(); } if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model BatchDeploymentInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model BatchDeploymentInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java index 487307ea149b4..9e9faee0801ef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The BatchEndpoint model. */ +/** + * The BatchEndpoint model. + */ @Fluent public final class BatchEndpointInner extends Resource { /* @@ -47,13 +49,15 @@ public final class BatchEndpointInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of BatchEndpointInner class. */ + /** + * Creates an instance of BatchEndpointInner class. + */ public BatchEndpointInner() { } /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -62,7 +66,7 @@ public ManagedServiceIdentity identity() { /** * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @param identity the identity value to set. * @return the BatchEndpointInner object itself. */ @@ -74,7 +78,7 @@ public BatchEndpointInner withIdentity(ManagedServiceIdentity identity) { /** * 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() { @@ -84,7 +88,7 @@ public String 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 BatchEndpointInner object itself. */ @@ -95,7 +99,7 @@ public BatchEndpointInner withKind(String kind) { /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public BatchEndpointProperties properties() { @@ -104,7 +108,7 @@ public BatchEndpointProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the BatchEndpointInner object itself. */ @@ -115,7 +119,7 @@ public BatchEndpointInner withProperties(BatchEndpointProperties properties) { /** * Get the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @return the sku value. */ public Sku sku() { @@ -124,7 +128,7 @@ public Sku sku() { /** * Set the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @param sku the sku value to set. * @return the BatchEndpointInner object itself. */ @@ -135,21 +139,25 @@ public BatchEndpointInner withSku(Sku sku) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchEndpointInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchEndpointInner withTags(Map tags) { super.withTags(tags); @@ -158,7 +166,7 @@ public BatchEndpointInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -166,9 +174,8 @@ public void validate() { identity().validate(); } if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model BatchEndpointInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model BatchEndpointInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapacityReservationGroupInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapacityReservationGroupInner.java new file mode 100644 index 0000000000000..8bb87312f2387 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapacityReservationGroupInner.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.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.CapacityReservationGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The CapacityReservationGroup model. + */ +@Fluent +public final class CapacityReservationGroupInner 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 CapacityReservationGroupProperties properties; + + /* + * 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 CapacityReservationGroupInner class. + */ + public CapacityReservationGroupInner() { + } + + /** + * 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 CapacityReservationGroupInner object itself. + */ + public CapacityReservationGroupInner 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 CapacityReservationGroupInner object itself. + */ + public CapacityReservationGroupInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public CapacityReservationGroupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the CapacityReservationGroupInner object itself. + */ + public CapacityReservationGroupInner withProperties(CapacityReservationGroupProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 CapacityReservationGroupInner object itself. + */ + public CapacityReservationGroupInner 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 CapacityReservationGroupInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CapacityReservationGroupInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property properties in model CapacityReservationGroupInner")); + } else { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CapacityReservationGroupInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java index 4abc0bf1e9e19..6f5ad0a2b9bcd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of a amlCompute that need to be updated. */ +/** + * The properties of a amlCompute that need to be updated. + */ @Fluent public final class ClusterUpdateProperties { /* @@ -17,13 +19,15 @@ public final class ClusterUpdateProperties { @JsonProperty(value = "properties") private ScaleSettingsInformation properties; - /** Creates an instance of ClusterUpdateProperties class. */ + /** + * Creates an instance of ClusterUpdateProperties class. + */ public ClusterUpdateProperties() { } /** * Get the properties property: Properties of ClusterUpdate. - * + * * @return the properties value. */ public ScaleSettingsInformation properties() { @@ -32,7 +36,7 @@ public ScaleSettingsInformation properties() { /** * Set the properties property: Properties of ClusterUpdate. - * + * * @param properties the properties value to set. * @return the ClusterUpdateProperties object itself. */ @@ -43,7 +47,7 @@ public ClusterUpdateProperties withProperties(ScaleSettingsInformation propertie /** * 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/CodeContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java index 627c39dd4d842..da224fa9035c7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class CodeContainerInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class CodeContainerInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of CodeContainerInner class. */ + /** + * Creates an instance of CodeContainerInner class. + */ public CodeContainerInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public CodeContainerProperties properties() { @@ -41,7 +45,7 @@ public CodeContainerProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the CodeContainerInner object itself. */ @@ -52,7 +56,7 @@ public CodeContainerInner withProperties(CodeContainerProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData 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 CodeContainerInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model CodeContainerInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java index ec872c6209d14..e6ecc3d025829 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class CodeVersionInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class CodeVersionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of CodeVersionInner class. */ + /** + * Creates an instance of CodeVersionInner class. + */ public CodeVersionInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public CodeVersionProperties properties() { @@ -41,7 +45,7 @@ public CodeVersionProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the CodeVersionInner object itself. */ @@ -52,7 +56,7 @@ public CodeVersionInner withProperties(CodeVersionProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData 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 CodeVersionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model CodeVersionInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java index cfcf51505906b..dc8b1eccd7f87 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class ComponentContainerInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class ComponentContainerInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ComponentContainerInner class. */ + /** + * Creates an instance of ComponentContainerInner class. + */ public ComponentContainerInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public ComponentContainerProperties properties() { @@ -41,7 +45,7 @@ public ComponentContainerProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the ComponentContainerInner object itself. */ @@ -52,7 +56,7 @@ public ComponentContainerInner withProperties(ComponentContainerProperties prope /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,15 +65,13 @@ public SystemData 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 ComponentContainerInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model ComponentContainerInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java index 55676a9cd644c..27ddbc3949cca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class ComponentVersionInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class ComponentVersionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ComponentVersionInner class. */ + /** + * Creates an instance of ComponentVersionInner class. + */ public ComponentVersionInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public ComponentVersionProperties properties() { @@ -41,7 +45,7 @@ public ComponentVersionProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the ComponentVersionInner object itself. */ @@ -52,7 +56,7 @@ public ComponentVersionInner withProperties(ComponentVersionProperties propertie /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,15 +65,13 @@ public SystemData 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 ComponentVersionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model ComponentVersionInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java index 170e868b87e95..5e5b4696f30f3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Machine Learning compute object wrapped into ARM resource envelope. */ +/** + * Machine Learning compute object wrapped into ARM resource envelope. + */ @Fluent public final class ComputeResourceInner extends ProxyResource { /* @@ -54,13 +56,15 @@ public final class ComputeResourceInner extends ProxyResource { @JsonProperty(value = "properties") private Compute properties; - /** Creates an instance of ComputeResourceInner class. */ + /** + * Creates an instance of ComputeResourceInner class. + */ public ComputeResourceInner() { } /** * Get the identity property: The identity of the resource. - * + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -69,7 +73,7 @@ public ManagedServiceIdentity identity() { /** * Set the identity property: The identity of the resource. - * + * * @param identity the identity value to set. * @return the ComputeResourceInner object itself. */ @@ -80,7 +84,7 @@ public ComputeResourceInner withIdentity(ManagedServiceIdentity identity) { /** * Get the location property: Specifies the location of the resource. - * + * * @return the location value. */ public String location() { @@ -89,7 +93,7 @@ public String location() { /** * Set the location property: Specifies the location of the resource. - * + * * @param location the location value to set. * @return the ComputeResourceInner object itself. */ @@ -100,7 +104,7 @@ public ComputeResourceInner withLocation(String location) { /** * Get the tags property: Contains resource tags defined as key/value pairs. - * + * * @return the tags value. */ public Map tags() { @@ -109,7 +113,7 @@ public Map tags() { /** * Set the tags property: Contains resource tags defined as key/value pairs. - * + * * @param tags the tags value to set. * @return the ComputeResourceInner object itself. */ @@ -120,7 +124,7 @@ public ComputeResourceInner withTags(Map tags) { /** * Get the sku property: The sku of the workspace. - * + * * @return the sku value. */ public Sku sku() { @@ -129,7 +133,7 @@ public Sku sku() { /** * Set the sku property: The sku of the workspace. - * + * * @param sku the sku value to set. * @return the ComputeResourceInner object itself. */ @@ -140,7 +144,7 @@ public ComputeResourceInner withSku(Sku sku) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -149,7 +153,7 @@ public SystemData systemData() { /** * Get the properties property: Compute properties. - * + * * @return the properties value. */ public Compute properties() { @@ -158,7 +162,7 @@ public Compute properties() { /** * Set the properties property: Compute properties. - * + * * @param properties the properties value to set. * @return the ComputeResourceInner object itself. */ @@ -169,7 +173,7 @@ public ComputeResourceInner withProperties(Compute properties) { /** * 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/ComputeSecretsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java index ad8ddc04d37d5..5769187800110 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Secrets related to a Machine Learning compute. Might differ for every type of compute. */ +/** + * Secrets related to a Machine Learning compute. Might differ for every type of compute. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -22,17 +24,18 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "AKS", value = AksComputeSecrets.class), @JsonSubTypes.Type(name = "VirtualMachine", value = VirtualMachineSecrets.class), - @JsonSubTypes.Type(name = "Databricks", value = DatabricksComputeSecrets.class) -}) + @JsonSubTypes.Type(name = "Databricks", value = DatabricksComputeSecrets.class) }) @Immutable public class ComputeSecretsInner { - /** Creates an instance of ComputeSecretsInner class. */ + /** + * Creates an instance of ComputeSecretsInner class. + */ public ComputeSecretsInner() { } /** * 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/DataContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java index 71116c0b5ad20..af9932076d6da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class DataContainerInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class DataContainerInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of DataContainerInner class. */ + /** + * Creates an instance of DataContainerInner class. + */ public DataContainerInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public DataContainerProperties properties() { @@ -41,7 +45,7 @@ public DataContainerProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the DataContainerInner object itself. */ @@ -52,7 +56,7 @@ public DataContainerInner withProperties(DataContainerProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData 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 DataContainerInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model DataContainerInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java index 4496968987269..2c502f63e8f41 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class DataVersionBaseInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class DataVersionBaseInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of DataVersionBaseInner class. */ + /** + * Creates an instance of DataVersionBaseInner class. + */ public DataVersionBaseInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public DataVersionBaseProperties properties() { @@ -41,7 +45,7 @@ public DataVersionBaseProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the DataVersionBaseInner object itself. */ @@ -52,7 +56,7 @@ public DataVersionBaseInner withProperties(DataVersionBaseProperties properties) /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData 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 DataVersionBaseInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model DataVersionBaseInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java index d462f55031fdf..594585aebcc34 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.DatastoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class DatastoreInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class DatastoreInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of DatastoreInner class. */ + /** + * Creates an instance of DatastoreInner class. + */ public DatastoreInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public DatastoreProperties properties() { @@ -41,7 +45,7 @@ public DatastoreProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the DatastoreInner object itself. */ @@ -52,7 +56,7 @@ public DatastoreInner withProperties(DatastoreProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData 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 DatastoreInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model DatastoreInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java index 2cb1bcd991478..b4a47e1d60010 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java @@ -7,13 +7,17 @@ import com.azure.core.annotation.Immutable; import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets; import com.azure.resourcemanager.machinelearning.models.CertificateDatastoreSecrets; +import com.azure.resourcemanager.machinelearning.models.KerberosKeytabSecrets; +import com.azure.resourcemanager.machinelearning.models.KerberosPasswordSecrets; import com.azure.resourcemanager.machinelearning.models.SasDatastoreSecrets; import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base definition for datastore secrets. */ +/** + * Base definition for datastore secrets. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -23,18 +27,21 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "AccountKey", value = AccountKeyDatastoreSecrets.class), @JsonSubTypes.Type(name = "Certificate", value = CertificateDatastoreSecrets.class), + @JsonSubTypes.Type(name = "KerberosKeytab", value = KerberosKeytabSecrets.class), + @JsonSubTypes.Type(name = "KerberosPassword", value = KerberosPasswordSecrets.class), @JsonSubTypes.Type(name = "Sas", value = SasDatastoreSecrets.class), - @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreSecrets.class) -}) + @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreSecrets.class) }) @Immutable public class DatastoreSecretsInner { - /** Creates an instance of DatastoreSecretsInner class. */ + /** + * Creates an instance of DatastoreSecretsInner class. + */ public DatastoreSecretsInner() { } /** * 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/DeploymentLogsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java index d9e251314114f..f421b74a4bb6b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The DeploymentLogs model. */ +/** + * The DeploymentLogs model. + */ @Fluent public final class DeploymentLogsInner { /* @@ -16,13 +18,15 @@ public final class DeploymentLogsInner { @JsonProperty(value = "content") private String content; - /** Creates an instance of DeploymentLogsInner class. */ + /** + * Creates an instance of DeploymentLogsInner class. + */ public DeploymentLogsInner() { } /** * Get the content property: The retrieved online deployment logs. - * + * * @return the content value. */ public String content() { @@ -31,7 +35,7 @@ public String content() { /** * Set the content property: The retrieved online deployment logs. - * + * * @param content the content value to set. * @return the DeploymentLogsInner object itself. */ @@ -42,7 +46,7 @@ public DeploymentLogsInner withContent(String content) { /** * 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/DiagnoseResponseResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java index 0294a92441bb6..74be4385548f7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResultValue; import com.fasterxml.jackson.annotation.JsonProperty; -/** The DiagnoseResponseResult model. */ +/** + * The DiagnoseResponseResult model. + */ @Fluent public final class DiagnoseResponseResultInner { /* @@ -17,13 +19,15 @@ public final class DiagnoseResponseResultInner { @JsonProperty(value = "value") private DiagnoseResponseResultValue value; - /** Creates an instance of DiagnoseResponseResultInner class. */ + /** + * Creates an instance of DiagnoseResponseResultInner class. + */ public DiagnoseResponseResultInner() { } /** * Get the value property: The value property. - * + * * @return the value value. */ public DiagnoseResponseResultValue value() { @@ -32,7 +36,7 @@ public DiagnoseResponseResultValue value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the DiagnoseResponseResultInner object itself. */ @@ -43,7 +47,7 @@ public DiagnoseResponseResultInner withValue(DiagnoseResponseResultValue 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/fluent/models/EndpointAuthKeysInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java index cd26c1312628f..3cab7b6b61726 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Keys for endpoint authentication. */ +/** + * Keys for endpoint authentication. + */ @Fluent public final class EndpointAuthKeysInner { /* @@ -22,13 +24,15 @@ public final class EndpointAuthKeysInner { @JsonProperty(value = "secondaryKey") private String secondaryKey; - /** Creates an instance of EndpointAuthKeysInner class. */ + /** + * Creates an instance of EndpointAuthKeysInner class. + */ public EndpointAuthKeysInner() { } /** * Get the primaryKey property: The primary key. - * + * * @return the primaryKey value. */ public String primaryKey() { @@ -37,7 +41,7 @@ public String primaryKey() { /** * Set the primaryKey property: The primary key. - * + * * @param primaryKey the primaryKey value to set. * @return the EndpointAuthKeysInner object itself. */ @@ -48,7 +52,7 @@ public EndpointAuthKeysInner withPrimaryKey(String primaryKey) { /** * Get the secondaryKey property: The secondary key. - * + * * @return the secondaryKey value. */ public String secondaryKey() { @@ -57,7 +61,7 @@ public String secondaryKey() { /** * Set the secondaryKey property: The secondary key. - * + * * @param secondaryKey the secondaryKey value to set. * @return the EndpointAuthKeysInner object itself. */ @@ -68,7 +72,7 @@ public EndpointAuthKeysInner withSecondaryKey(String secondaryKey) { /** * 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/EndpointAuthTokenInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java index f0a288636a6cd..ce265fadc5885 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Service Token. */ +/** + * Service Token. + */ @Fluent public final class EndpointAuthTokenInner { /* @@ -34,13 +36,15 @@ public final class EndpointAuthTokenInner { @JsonProperty(value = "tokenType") private String tokenType; - /** Creates an instance of EndpointAuthTokenInner class. */ + /** + * Creates an instance of EndpointAuthTokenInner class. + */ public EndpointAuthTokenInner() { } /** * Get the accessToken property: Access token for endpoint authentication. - * + * * @return the accessToken value. */ public String accessToken() { @@ -49,7 +53,7 @@ public String accessToken() { /** * Set the accessToken property: Access token for endpoint authentication. - * + * * @param accessToken the accessToken value to set. * @return the EndpointAuthTokenInner object itself. */ @@ -60,7 +64,7 @@ public EndpointAuthTokenInner withAccessToken(String accessToken) { /** * Get the expiryTimeUtc property: Access token expiry time (UTC). - * + * * @return the expiryTimeUtc value. */ public Long expiryTimeUtc() { @@ -69,7 +73,7 @@ public Long expiryTimeUtc() { /** * Set the expiryTimeUtc property: Access token expiry time (UTC). - * + * * @param expiryTimeUtc the expiryTimeUtc value to set. * @return the EndpointAuthTokenInner object itself. */ @@ -80,7 +84,7 @@ public EndpointAuthTokenInner withExpiryTimeUtc(Long expiryTimeUtc) { /** * Get the refreshAfterTimeUtc property: Refresh access token after time (UTC). - * + * * @return the refreshAfterTimeUtc value. */ public Long refreshAfterTimeUtc() { @@ -89,7 +93,7 @@ public Long refreshAfterTimeUtc() { /** * Set the refreshAfterTimeUtc property: Refresh access token after time (UTC). - * + * * @param refreshAfterTimeUtc the refreshAfterTimeUtc value to set. * @return the EndpointAuthTokenInner object itself. */ @@ -100,7 +104,7 @@ public EndpointAuthTokenInner withRefreshAfterTimeUtc(Long refreshAfterTimeUtc) /** * Get the tokenType property: Access token type. - * + * * @return the tokenType value. */ public String tokenType() { @@ -109,7 +113,7 @@ public String tokenType() { /** * Set the tokenType property: Access token type. - * + * * @param tokenType the tokenType value to set. * @return the EndpointAuthTokenInner object itself. */ @@ -120,7 +124,7 @@ public EndpointAuthTokenInner withTokenType(String tokenType) { /** * 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/EndpointDeploymentResourcePropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointDeploymentResourcePropertiesBasicResourceInner.java new file mode 100644 index 0000000000000..ccc67900443a0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointDeploymentResourcePropertiesBasicResourceInner.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.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.EndpointDeploymentResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The EndpointDeploymentResourcePropertiesBasicResource model. + */ +@Fluent +public final class EndpointDeploymentResourcePropertiesBasicResourceInner extends ProxyResource { + /* + * The properties property. + */ + @JsonProperty(value = "properties", required = true) + private EndpointDeploymentResourceProperties 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 EndpointDeploymentResourcePropertiesBasicResourceInner class. + */ + public EndpointDeploymentResourcePropertiesBasicResourceInner() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public EndpointDeploymentResourceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the EndpointDeploymentResourcePropertiesBasicResourceInner object itself. + */ + public EndpointDeploymentResourcePropertiesBasicResourceInner + withProperties(EndpointDeploymentResourceProperties 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 EndpointDeploymentResourcePropertiesBasicResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(EndpointDeploymentResourcePropertiesBasicResourceInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java new file mode 100644 index 0000000000000..64d2f29c983a7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The EndpointKeys model. + */ +@Fluent +public final class EndpointKeysInner { + /* + * Dictionary of Keys for the endpoint. + */ + @JsonProperty(value = "keys") + private AccountApiKeysInner keys; + + /** + * Creates an instance of EndpointKeysInner class. + */ + public EndpointKeysInner() { + } + + /** + * Get the keys property: Dictionary of Keys for the endpoint. + * + * @return the keys value. + */ + public AccountApiKeysInner keys() { + return this.keys; + } + + /** + * Set the keys property: Dictionary of Keys for the endpoint. + * + * @param keys the keys value to set. + * @return the EndpointKeysInner object itself. + */ + public EndpointKeysInner withKeys(AccountApiKeysInner keys) { + this.keys = keys; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keys() != null) { + keys().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java index 6219e1e61a6c7..5370e6fb9745c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Inference Endpoint base definition. */ +/** + * Inference Endpoint base definition. + */ @Fluent public class EndpointPropertiesBaseInner { /* @@ -53,14 +55,16 @@ public class EndpointPropertiesBaseInner { @JsonProperty(value = "swaggerUri", access = JsonProperty.Access.WRITE_ONLY) private String swaggerUri; - /** Creates an instance of EndpointPropertiesBaseInner class. */ + /** + * Creates an instance of EndpointPropertiesBaseInner class. + */ public EndpointPropertiesBaseInner() { } /** * Get the authMode property: [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine * Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - * + * * @return the authMode value. */ public EndpointAuthMode authMode() { @@ -70,7 +74,7 @@ public EndpointAuthMode authMode() { /** * Set the authMode property: [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine * Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - * + * * @param authMode the authMode value to set. * @return the EndpointPropertiesBaseInner object itself. */ @@ -81,7 +85,7 @@ public EndpointPropertiesBaseInner withAuthMode(EndpointAuthMode authMode) { /** * Get the description property: Description of the inference endpoint. - * + * * @return the description value. */ public String description() { @@ -90,7 +94,7 @@ public String description() { /** * Set the description property: Description of the inference endpoint. - * + * * @param description the description value to set. * @return the EndpointPropertiesBaseInner object itself. */ @@ -100,9 +104,9 @@ public EndpointPropertiesBaseInner withDescription(String description) { } /** - * Get the keys property: EndpointAuthKeys to set initially on an Endpoint. This property will always be returned as - * null. AuthKey values must be retrieved using the ListKeys API. - * + * Get the keys property: EndpointAuthKeys to set initially on an Endpoint. + * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + * * @return the keys value. */ public EndpointAuthKeysInner keys() { @@ -110,9 +114,9 @@ public EndpointAuthKeysInner keys() { } /** - * Set the keys property: EndpointAuthKeys to set initially on an Endpoint. This property will always be returned as - * null. AuthKey values must be retrieved using the ListKeys API. - * + * Set the keys property: EndpointAuthKeys to set initially on an Endpoint. + * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + * * @param keys the keys value to set. * @return the EndpointPropertiesBaseInner object itself. */ @@ -123,7 +127,7 @@ public EndpointPropertiesBaseInner withKeys(EndpointAuthKeysInner keys) { /** * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. - * + * * @return the properties value. */ public Map properties() { @@ -132,7 +136,7 @@ public Map 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 EndpointPropertiesBaseInner object itself. */ @@ -143,7 +147,7 @@ public EndpointPropertiesBaseInner withProperties(Map properties /** * Get the scoringUri property: Endpoint URI. - * + * * @return the scoringUri value. */ public String scoringUri() { @@ -152,7 +156,7 @@ public String scoringUri() { /** * Get the swaggerUri property: Endpoint Swagger URI. - * + * * @return the swaggerUri value. */ public String swaggerUri() { @@ -161,15 +165,13 @@ public String swaggerUri() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (authMode() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property authMode in model EndpointPropertiesBaseInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property authMode in model EndpointPropertiesBaseInner")); } if (keys() != null) { keys().validate(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java new file mode 100644 index 0000000000000..6c3e0d6bad8ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.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.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.EndpointResourceProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The EndpointResourcePropertiesBasicResource model. + */ +@Fluent +public final class EndpointResourcePropertiesBasicResourceInner extends ProxyResource { + /* + * The properties property. + */ + @JsonProperty(value = "properties", required = true) + private EndpointResourceProperties 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 EndpointResourcePropertiesBasicResourceInner class. + */ + public EndpointResourcePropertiesBasicResourceInner() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public EndpointResourceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the EndpointResourcePropertiesBasicResourceInner object itself. + */ + public EndpointResourcePropertiesBasicResourceInner withProperties(EndpointResourceProperties 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 EndpointResourcePropertiesBasicResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EndpointResourcePropertiesBasicResourceInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java index a6d47c5fe1aa8..1cfaa6d8a86bd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class EnvironmentContainerInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class EnvironmentContainerInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of EnvironmentContainerInner class. */ + /** + * Creates an instance of EnvironmentContainerInner class. + */ public EnvironmentContainerInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public EnvironmentContainerProperties properties() { @@ -41,7 +45,7 @@ public EnvironmentContainerProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the EnvironmentContainerInner object itself. */ @@ -52,7 +56,7 @@ public EnvironmentContainerInner withProperties(EnvironmentContainerProperties p /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,15 +65,13 @@ public SystemData 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 EnvironmentContainerInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property properties in model EnvironmentContainerInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java index ce8d1971fc7a3..ff5a0b6a821b7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class EnvironmentVersionInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class EnvironmentVersionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of EnvironmentVersionInner class. */ + /** + * Creates an instance of EnvironmentVersionInner class. + */ public EnvironmentVersionInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public EnvironmentVersionProperties properties() { @@ -41,7 +45,7 @@ public EnvironmentVersionProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the EnvironmentVersionInner object itself. */ @@ -52,7 +56,7 @@ public EnvironmentVersionInner withProperties(EnvironmentVersionProperties prope /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,15 +65,13 @@ public SystemData 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 EnvironmentVersionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model EnvironmentVersionInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExportSummaryInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExportSummaryInner.java new file mode 100644 index 0000000000000..794243b9d6a76 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExportSummaryInner.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.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.machinelearning.models.CocoExportSummary; +import com.azure.resourcemanager.machinelearning.models.CsvExportSummary; +import com.azure.resourcemanager.machinelearning.models.DatasetExportSummary; +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.time.OffsetDateTime; + +/** + * The ExportSummary model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "format", + defaultImpl = ExportSummaryInner.class) +@JsonTypeName("ExportSummary") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Coco", value = CocoExportSummary.class), + @JsonSubTypes.Type(name = "CSV", value = CsvExportSummary.class), + @JsonSubTypes.Type(name = "Dataset", value = DatasetExportSummary.class) }) +@Immutable +public class ExportSummaryInner { + /* + * The time when the export was completed. + */ + @JsonProperty(value = "endDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endDateTime; + + /* + * The total number of labeled datapoints exported. + */ + @JsonProperty(value = "exportedRowCount", access = JsonProperty.Access.WRITE_ONLY) + private Long exportedRowCount; + + /* + * Name and identifier of the job containing exported labels. + */ + @JsonProperty(value = "labelingJobId", access = JsonProperty.Access.WRITE_ONLY) + private String labelingJobId; + + /* + * The time when the export was requested. + */ + @JsonProperty(value = "startDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startDateTime; + + /** + * Creates an instance of ExportSummaryInner class. + */ + public ExportSummaryInner() { + } + + /** + * Get the endDateTime property: The time when the export was completed. + * + * @return the endDateTime value. + */ + public OffsetDateTime endDateTime() { + return this.endDateTime; + } + + /** + * Get the exportedRowCount property: The total number of labeled datapoints exported. + * + * @return the exportedRowCount value. + */ + public Long exportedRowCount() { + return this.exportedRowCount; + } + + /** + * Get the labelingJobId property: Name and identifier of the job containing exported labels. + * + * @return the labelingJobId value. + */ + public String labelingJobId() { + return this.labelingJobId; + } + + /** + * Get the startDateTime property: The time when the export was requested. + * + * @return the startDateTime value. + */ + public OffsetDateTime startDateTime() { + return this.startDateTime; + } + + /** + * 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/ExternalFqdnResponseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java index 8dbef74cad4f9..fb4315d2c9b02 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java @@ -5,46 +5,50 @@ package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; +import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The ExternalFqdnResponse model. */ +/** + * The ExternalFqdnResponse model. + */ @Fluent public final class ExternalFqdnResponseInner { /* * The value property. */ @JsonProperty(value = "value") - private List value; + private List value; - /** Creates an instance of ExternalFqdnResponseInner class. */ + /** + * Creates an instance of ExternalFqdnResponseInner class. + */ public ExternalFqdnResponseInner() { } /** * Get the value property: The value property. - * + * * @return the value value. */ - public List value() { + public List value() { return this.value; } /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the ExternalFqdnResponseInner object itself. */ - public ExternalFqdnResponseInner withValue(List value) { + public ExternalFqdnResponseInner withValue(List 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/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..aee5ac6d6d064 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.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.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..ae713b15e712a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.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.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..6f13af8200a9e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.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.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..23de6849e5525 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.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.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..46b85b2d986ed --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.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.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..379e0e72b5a62 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.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.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..1ba14a1bace11 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.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.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/GroupStatusInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java new file mode 100644 index 0000000000000..0a4e907a119a4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The GroupStatus model. + */ +@Fluent +public final class GroupStatusInner { + /* + * Gets or sets the actual capacity info for the group. + */ + @JsonProperty(value = "actualCapacityInfo") + private ActualCapacityInfo actualCapacityInfo; + + /* + * Gets or sets capacity used from the pool's reserved capacity. + */ + @JsonProperty(value = "bonusExtraCapacity") + private Integer bonusExtraCapacity; + + /* + * Gets or sets the actual number of endpoints in the group. + */ + @JsonProperty(value = "endpointCount") + private Integer endpointCount; + + /* + * Gets or sets the request number of instances for the group. + */ + @JsonProperty(value = "requestedCapacity") + private Integer requestedCapacity; + + /** + * Creates an instance of GroupStatusInner class. + */ + public GroupStatusInner() { + } + + /** + * Get the actualCapacityInfo property: Gets or sets the actual capacity info for the group. + * + * @return the actualCapacityInfo value. + */ + public ActualCapacityInfo actualCapacityInfo() { + return this.actualCapacityInfo; + } + + /** + * Set the actualCapacityInfo property: Gets or sets the actual capacity info for the group. + * + * @param actualCapacityInfo the actualCapacityInfo value to set. + * @return the GroupStatusInner object itself. + */ + public GroupStatusInner withActualCapacityInfo(ActualCapacityInfo actualCapacityInfo) { + this.actualCapacityInfo = actualCapacityInfo; + return this; + } + + /** + * Get the bonusExtraCapacity property: Gets or sets capacity used from the pool's reserved capacity. + * + * @return the bonusExtraCapacity value. + */ + public Integer bonusExtraCapacity() { + return this.bonusExtraCapacity; + } + + /** + * Set the bonusExtraCapacity property: Gets or sets capacity used from the pool's reserved capacity. + * + * @param bonusExtraCapacity the bonusExtraCapacity value to set. + * @return the GroupStatusInner object itself. + */ + public GroupStatusInner withBonusExtraCapacity(Integer bonusExtraCapacity) { + this.bonusExtraCapacity = bonusExtraCapacity; + return this; + } + + /** + * Get the endpointCount property: Gets or sets the actual number of endpoints in the group. + * + * @return the endpointCount value. + */ + public Integer endpointCount() { + return this.endpointCount; + } + + /** + * Set the endpointCount property: Gets or sets the actual number of endpoints in the group. + * + * @param endpointCount the endpointCount value to set. + * @return the GroupStatusInner object itself. + */ + public GroupStatusInner withEndpointCount(Integer endpointCount) { + this.endpointCount = endpointCount; + return this; + } + + /** + * Get the requestedCapacity property: Gets or sets the request number of instances for the group. + * + * @return the requestedCapacity value. + */ + public Integer requestedCapacity() { + return this.requestedCapacity; + } + + /** + * Set the requestedCapacity property: Gets or sets the request number of instances for the group. + * + * @param requestedCapacity the requestedCapacity value to set. + * @return the GroupStatusInner object itself. + */ + public GroupStatusInner withRequestedCapacity(Integer requestedCapacity) { + this.requestedCapacity = requestedCapacity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (actualCapacityInfo() != null) { + actualCapacityInfo().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java new file mode 100644 index 0000000000000..60bfcf5fd5166 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.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.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.InferenceEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The InferenceEndpoint model. + */ +@Fluent +public final class InferenceEndpointInner 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 InferenceEndpointProperties properties; + + /* + * 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 InferenceEndpointInner class. + */ + public InferenceEndpointInner() { + } + + /** + * 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 InferenceEndpointInner object itself. + */ + public InferenceEndpointInner 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 InferenceEndpointInner object itself. + */ + public InferenceEndpointInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public InferenceEndpointProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the InferenceEndpointInner object itself. + */ + public InferenceEndpointInner withProperties(InferenceEndpointProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 InferenceEndpointInner object itself. + */ + public InferenceEndpointInner 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 InferenceEndpointInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceEndpointInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model InferenceEndpointInner")); + } else { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InferenceEndpointInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java new file mode 100644 index 0000000000000..de4b9dda02812 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.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.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.InferenceGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The InferenceGroup model. + */ +@Fluent +public final class InferenceGroupInner 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 InferenceGroupProperties properties; + + /* + * 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 InferenceGroupInner class. + */ + public InferenceGroupInner() { + } + + /** + * 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 InferenceGroupInner object itself. + */ + public InferenceGroupInner 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 InferenceGroupInner object itself. + */ + public InferenceGroupInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public InferenceGroupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the InferenceGroupInner object itself. + */ + public InferenceGroupInner withProperties(InferenceGroupProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 InferenceGroupInner object itself. + */ + public InferenceGroupInner 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 InferenceGroupInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceGroupInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model InferenceGroupInner")); + } else { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InferenceGroupInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java new file mode 100644 index 0000000000000..dd1074ccb1be7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.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.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.InferencePoolProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The InferencePool model. + */ +@Fluent +public final class InferencePoolInner 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 InferencePoolProperties properties; + + /* + * 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 InferencePoolInner class. + */ + public InferencePoolInner() { + } + + /** + * 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 InferencePoolInner object itself. + */ + public InferencePoolInner 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 InferencePoolInner object itself. + */ + public InferencePoolInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public InferencePoolProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the InferencePoolInner object itself. + */ + public InferencePoolInner withProperties(InferencePoolProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 InferencePoolInner object itself. + */ + public InferencePoolInner 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 InferencePoolInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferencePoolInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model InferencePoolInner")); + } else { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InferencePoolInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java index 031843b713324..39e1f05025b95 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class JobBaseInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class JobBaseInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of JobBaseInner class. */ + /** + * Creates an instance of JobBaseInner class. + */ public JobBaseInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public JobBaseProperties properties() { @@ -41,7 +45,7 @@ public JobBaseProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the JobBaseInner object itself. */ @@ -52,7 +56,7 @@ public JobBaseInner withProperties(JobBaseProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData 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 JobBaseInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model JobBaseInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobInner.java new file mode 100644 index 0000000000000..7cc0b72ab90f3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobInner.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Resource Manager resource envelope. + */ +@Fluent +public final class LabelingJobInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private LabelingJobPropertiesInner 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 LabelingJobInner class. + */ + public LabelingJobInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public LabelingJobPropertiesInner properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the LabelingJobInner object itself. + */ + public LabelingJobInner withProperties(LabelingJobPropertiesInner 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 LabelingJobInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LabelingJobInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobPropertiesInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobPropertiesInner.java new file mode 100644 index 0000000000000..12b31ddc727d2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/LabelingJobPropertiesInner.java @@ -0,0 +1,392 @@ +// Copyright (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.IdentityConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; +import com.azure.resourcemanager.machinelearning.models.JobProvisioningState; +import com.azure.resourcemanager.machinelearning.models.JobService; +import com.azure.resourcemanager.machinelearning.models.LabelCategory; +import com.azure.resourcemanager.machinelearning.models.LabelingDataConfiguration; +import com.azure.resourcemanager.machinelearning.models.LabelingJobInstructions; +import com.azure.resourcemanager.machinelearning.models.LabelingJobMediaProperties; +import com.azure.resourcemanager.machinelearning.models.MLAssistConfiguration; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; +import com.azure.resourcemanager.machinelearning.models.ProgressMetrics; +import com.azure.resourcemanager.machinelearning.models.SecretConfiguration; +import com.azure.resourcemanager.machinelearning.models.StatusMessage; +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.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** + * Labeling job definition. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") +@JsonTypeName("Labeling") +@Fluent +public final class LabelingJobPropertiesInner extends JobBaseProperties { + /* + * Created time of the job in UTC timezone. + */ + @JsonProperty(value = "createdDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateTime; + + /* + * Configuration of data used in the job. + */ + @JsonProperty(value = "dataConfiguration") + private LabelingDataConfiguration dataConfiguration; + + /* + * Labeling instructions of the job. + */ + @JsonProperty(value = "jobInstructions") + private LabelingJobInstructions jobInstructions; + + /* + * Label categories of the job. + */ + @JsonProperty(value = "labelCategories") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map labelCategories; + + /* + * Media type specific properties in the job. + */ + @JsonProperty(value = "labelingJobMediaProperties") + private LabelingJobMediaProperties labelingJobMediaProperties; + + /* + * Configuration of MLAssist feature in the job. + */ + @JsonProperty(value = "mlAssistConfiguration") + private MLAssistConfiguration mlAssistConfiguration; + + /* + * Progress metrics of the job. + */ + @JsonProperty(value = "progressMetrics", access = JsonProperty.Access.WRITE_ONLY) + private ProgressMetrics progressMetrics; + + /* + * Internal id of the job(Previously called project). + */ + @JsonProperty(value = "projectId", access = JsonProperty.Access.WRITE_ONLY) + private UUID projectId; + + /* + * Specifies the labeling job provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private JobProvisioningState provisioningState; + + /* + * Status messages of the job. + */ + @JsonProperty(value = "statusMessages", access = JsonProperty.Access.WRITE_ONLY) + private List statusMessages; + + /** + * Creates an instance of LabelingJobPropertiesInner class. + */ + public LabelingJobPropertiesInner() { + } + + /** + * Get the createdDateTime property: Created time of the job in UTC timezone. + * + * @return the createdDateTime value. + */ + public OffsetDateTime createdDateTime() { + return this.createdDateTime; + } + + /** + * Get the dataConfiguration property: Configuration of data used in the job. + * + * @return the dataConfiguration value. + */ + public LabelingDataConfiguration dataConfiguration() { + return this.dataConfiguration; + } + + /** + * Set the dataConfiguration property: Configuration of data used in the job. + * + * @param dataConfiguration the dataConfiguration value to set. + * @return the LabelingJobPropertiesInner object itself. + */ + public LabelingJobPropertiesInner withDataConfiguration(LabelingDataConfiguration dataConfiguration) { + this.dataConfiguration = dataConfiguration; + return this; + } + + /** + * Get the jobInstructions property: Labeling instructions of the job. + * + * @return the jobInstructions value. + */ + public LabelingJobInstructions jobInstructions() { + return this.jobInstructions; + } + + /** + * Set the jobInstructions property: Labeling instructions of the job. + * + * @param jobInstructions the jobInstructions value to set. + * @return the LabelingJobPropertiesInner object itself. + */ + public LabelingJobPropertiesInner withJobInstructions(LabelingJobInstructions jobInstructions) { + this.jobInstructions = jobInstructions; + return this; + } + + /** + * Get the labelCategories property: Label categories of the job. + * + * @return the labelCategories value. + */ + public Map labelCategories() { + return this.labelCategories; + } + + /** + * Set the labelCategories property: Label categories of the job. + * + * @param labelCategories the labelCategories value to set. + * @return the LabelingJobPropertiesInner object itself. + */ + public LabelingJobPropertiesInner withLabelCategories(Map labelCategories) { + this.labelCategories = labelCategories; + return this; + } + + /** + * Get the labelingJobMediaProperties property: Media type specific properties in the job. + * + * @return the labelingJobMediaProperties value. + */ + public LabelingJobMediaProperties labelingJobMediaProperties() { + return this.labelingJobMediaProperties; + } + + /** + * Set the labelingJobMediaProperties property: Media type specific properties in the job. + * + * @param labelingJobMediaProperties the labelingJobMediaProperties value to set. + * @return the LabelingJobPropertiesInner object itself. + */ + public LabelingJobPropertiesInner + withLabelingJobMediaProperties(LabelingJobMediaProperties labelingJobMediaProperties) { + this.labelingJobMediaProperties = labelingJobMediaProperties; + return this; + } + + /** + * Get the mlAssistConfiguration property: Configuration of MLAssist feature in the job. + * + * @return the mlAssistConfiguration value. + */ + public MLAssistConfiguration mlAssistConfiguration() { + return this.mlAssistConfiguration; + } + + /** + * Set the mlAssistConfiguration property: Configuration of MLAssist feature in the job. + * + * @param mlAssistConfiguration the mlAssistConfiguration value to set. + * @return the LabelingJobPropertiesInner object itself. + */ + public LabelingJobPropertiesInner withMlAssistConfiguration(MLAssistConfiguration mlAssistConfiguration) { + this.mlAssistConfiguration = mlAssistConfiguration; + return this; + } + + /** + * Get the progressMetrics property: Progress metrics of the job. + * + * @return the progressMetrics value. + */ + public ProgressMetrics progressMetrics() { + return this.progressMetrics; + } + + /** + * Get the projectId property: Internal id of the job(Previously called project). + * + * @return the projectId value. + */ + public UUID projectId() { + return this.projectId; + } + + /** + * Get the provisioningState property: Specifies the labeling job provisioning state. + * + * @return the provisioningState value. + */ + public JobProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the statusMessages property: Status messages of the job. + * + * @return the statusMessages value. + */ + public List statusMessages() { + return this.statusMessages; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withComponentId(String componentId) { + super.withComponentId(componentId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withComputeId(String computeId) { + super.withComputeId(computeId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withExperimentName(String experimentName) { + super.withExperimentName(experimentName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withSecretsConfiguration(Map secretsConfiguration) { + super.withSecretsConfiguration(secretsConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withServices(Map services) { + super.withServices(services); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelingJobPropertiesInner 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 (dataConfiguration() != null) { + dataConfiguration().validate(); + } + if (jobInstructions() != null) { + jobInstructions().validate(); + } + if (labelCategories() != null) { + labelCategories().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (labelingJobMediaProperties() != null) { + labelingJobMediaProperties().validate(); + } + if (mlAssistConfiguration() != null) { + mlAssistConfiguration().validate(); + } + if (progressMetrics() != null) { + progressMetrics().validate(); + } + if (statusMessages() != null) { + statusMessages().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java index 7750f1375b4c3..f8f22527dead9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java @@ -7,28 +7,32 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ListNotebookKeysResult model. */ +/** + * The ListNotebookKeysResult model. + */ @Immutable public final class ListNotebookKeysResultInner { /* - * The primaryAccessKey property. + * The primary access key of the Notebook */ @JsonProperty(value = "primaryAccessKey", access = JsonProperty.Access.WRITE_ONLY) private String primaryAccessKey; /* - * The secondaryAccessKey property. + * The secondary access key of the Notebook */ @JsonProperty(value = "secondaryAccessKey", access = JsonProperty.Access.WRITE_ONLY) private String secondaryAccessKey; - /** Creates an instance of ListNotebookKeysResultInner class. */ + /** + * Creates an instance of ListNotebookKeysResultInner class. + */ public ListNotebookKeysResultInner() { } /** - * Get the primaryAccessKey property: The primaryAccessKey property. - * + * Get the primaryAccessKey property: The primary access key of the Notebook. + * * @return the primaryAccessKey value. */ public String primaryAccessKey() { @@ -36,8 +40,8 @@ public String primaryAccessKey() { } /** - * Get the secondaryAccessKey property: The secondaryAccessKey property. - * + * Get the secondaryAccessKey property: The secondary access key of the Notebook. + * * @return the secondaryAccessKey value. */ public String secondaryAccessKey() { @@ -46,7 +50,7 @@ public String secondaryAccessKey() { /** * 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/ListStorageAccountKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java index f4fd116ddf389..c7f6b59d69563 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java @@ -7,22 +7,26 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ListStorageAccountKeysResult model. */ +/** + * The ListStorageAccountKeysResult model. + */ @Immutable public final class ListStorageAccountKeysResultInner { /* - * The userStorageKey property. + * The access key of the storage */ @JsonProperty(value = "userStorageKey", access = JsonProperty.Access.WRITE_ONLY) private String userStorageKey; - /** Creates an instance of ListStorageAccountKeysResultInner class. */ + /** + * Creates an instance of ListStorageAccountKeysResultInner class. + */ public ListStorageAccountKeysResultInner() { } /** - * Get the userStorageKey property: The userStorageKey property. - * + * Get the userStorageKey property: The access key of the storage. + * * @return the userStorageKey value. */ public String userStorageKey() { @@ -31,7 +35,7 @@ public String userStorageKey() { /** * 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/ListWorkspaceKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java index 7e18cd1ee62ea..db76572d9d1d7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java @@ -4,27 +4,17 @@ package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.machinelearning.models.RegistryListCredentialsResult; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ListWorkspaceKeysResult model. */ -@Immutable +/** + * The ListWorkspaceKeysResult model. + */ +@Fluent public final class ListWorkspaceKeysResultInner { /* - * The userStorageKey property. - */ - @JsonProperty(value = "userStorageKey", access = JsonProperty.Access.WRITE_ONLY) - private String userStorageKey; - - /* - * The userStorageResourceId property. - */ - @JsonProperty(value = "userStorageResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String userStorageResourceId; - - /* - * The appInsightsInstrumentationKey property. + * The access key of the workspace app insights */ @JsonProperty(value = "appInsightsInstrumentationKey", access = JsonProperty.Access.WRITE_ONLY) private String appInsightsInstrumentationKey; @@ -32,40 +22,36 @@ public final class ListWorkspaceKeysResultInner { /* * The containerRegistryCredentials property. */ - @JsonProperty(value = "containerRegistryCredentials", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "containerRegistryCredentials") private RegistryListCredentialsResult containerRegistryCredentials; /* * The notebookAccessKeys property. */ - @JsonProperty(value = "notebookAccessKeys", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "notebookAccessKeys") private ListNotebookKeysResultInner notebookAccessKeys; - /** Creates an instance of ListWorkspaceKeysResultInner class. */ - public ListWorkspaceKeysResultInner() { - } + /* + * The arm Id key of the workspace storage + */ + @JsonProperty(value = "userStorageArmId", access = JsonProperty.Access.WRITE_ONLY) + private String userStorageArmId; - /** - * Get the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. + /* + * The access key of the workspace storage */ - public String userStorageKey() { - return this.userStorageKey; - } + @JsonProperty(value = "userStorageKey", access = JsonProperty.Access.WRITE_ONLY) + private String userStorageKey; /** - * Get the userStorageResourceId property: The userStorageResourceId property. - * - * @return the userStorageResourceId value. + * Creates an instance of ListWorkspaceKeysResultInner class. */ - public String userStorageResourceId() { - return this.userStorageResourceId; + public ListWorkspaceKeysResultInner() { } /** - * Get the appInsightsInstrumentationKey property: The appInsightsInstrumentationKey property. - * + * Get the appInsightsInstrumentationKey property: The access key of the workspace app insights. + * * @return the appInsightsInstrumentationKey value. */ public String appInsightsInstrumentationKey() { @@ -74,25 +60,66 @@ public String appInsightsInstrumentationKey() { /** * Get the containerRegistryCredentials property: The containerRegistryCredentials property. - * + * * @return the containerRegistryCredentials value. */ public RegistryListCredentialsResult containerRegistryCredentials() { return this.containerRegistryCredentials; } + /** + * Set the containerRegistryCredentials property: The containerRegistryCredentials property. + * + * @param containerRegistryCredentials the containerRegistryCredentials value to set. + * @return the ListWorkspaceKeysResultInner object itself. + */ + public ListWorkspaceKeysResultInner + withContainerRegistryCredentials(RegistryListCredentialsResult containerRegistryCredentials) { + this.containerRegistryCredentials = containerRegistryCredentials; + return this; + } + /** * Get the notebookAccessKeys property: The notebookAccessKeys property. - * + * * @return the notebookAccessKeys value. */ public ListNotebookKeysResultInner notebookAccessKeys() { return this.notebookAccessKeys; } + /** + * Set the notebookAccessKeys property: The notebookAccessKeys property. + * + * @param notebookAccessKeys the notebookAccessKeys value to set. + * @return the ListWorkspaceKeysResultInner object itself. + */ + public ListWorkspaceKeysResultInner withNotebookAccessKeys(ListNotebookKeysResultInner notebookAccessKeys) { + this.notebookAccessKeys = notebookAccessKeys; + return this; + } + + /** + * Get the userStorageArmId property: The arm Id key of the workspace storage. + * + * @return the userStorageArmId value. + */ + public String userStorageArmId() { + return this.userStorageArmId; + } + + /** + * Get the userStorageKey property: The access key of the workspace storage. + * + * @return the userStorageKey value. + */ + public String userStorageKey() { + return this.userStorageKey; + } + /** * 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/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..7c552ee309d46 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.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.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..6c8ed5b3d2fe2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java @@ -0,0 +1,152 @@ +// Copyright (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.List; +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; + + /* + * The changeableIsolationModes property. + */ + @JsonProperty(value = "changeableIsolationModes", access = JsonProperty.Access.WRITE_ONLY) + private List changeableIsolationModes; + + /** + * 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; + } + + /** + * Get the changeableIsolationModes property: The changeableIsolationModes property. + * + * @return the changeableIsolationModes value. + */ + public List changeableIsolationModes() { + return this.changeableIsolationModes; + } + + /** + * 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/MarketplaceSubscriptionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java new file mode 100644 index 0000000000000..26d20bdba93fb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.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.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.MarketplaceSubscriptionProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Resource Manager resource envelope. + */ +@Fluent +public final class MarketplaceSubscriptionInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + @JsonProperty(value = "properties", required = true) + private MarketplaceSubscriptionProperties 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 MarketplaceSubscriptionInner class. + */ + public MarketplaceSubscriptionInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public MarketplaceSubscriptionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the MarketplaceSubscriptionInner object itself. + */ + public MarketplaceSubscriptionInner withProperties(MarketplaceSubscriptionProperties 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 MarketplaceSubscriptionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSubscriptionInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java index 59b94aaaf36e2..e4fa703ded6b2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class ModelContainerInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class ModelContainerInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ModelContainerInner class. */ + /** + * Creates an instance of ModelContainerInner class. + */ public ModelContainerInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public ModelContainerProperties properties() { @@ -41,7 +45,7 @@ public ModelContainerProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the ModelContainerInner object itself. */ @@ -52,7 +56,7 @@ public ModelContainerInner withProperties(ModelContainerProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData 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 ModelContainerInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model ModelContainerInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java index 8d5e0c69f79d5..f0ec811d2e793 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class ModelVersionInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class ModelVersionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ModelVersionInner class. */ + /** + * Creates an instance of ModelVersionInner class. + */ public ModelVersionInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public ModelVersionProperties properties() { @@ -41,7 +45,7 @@ public ModelVersionProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the ModelVersionInner object itself. */ @@ -52,7 +56,7 @@ public ModelVersionInner withProperties(ModelVersionProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData 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 ModelVersionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model ModelVersionInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java index 6fb3125ba2403..7e64b01bd0f87 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java @@ -7,44 +7,40 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The NotebookAccessTokenResult model. */ +/** + * The NotebookAccessTokenResult model. + */ @Immutable public final class NotebookAccessTokenResultInner { /* - * The notebookResourceId property. - */ - @JsonProperty(value = "notebookResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String notebookResourceId; - - /* - * The hostName property. + * The accessToken property. */ - @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; + @JsonProperty(value = "accessToken", access = JsonProperty.Access.WRITE_ONLY) + private String accessToken; /* - * The publicDns property. + * The expiresIn property. */ - @JsonProperty(value = "publicDns", access = JsonProperty.Access.WRITE_ONLY) - private String publicDns; + @JsonProperty(value = "expiresIn", access = JsonProperty.Access.WRITE_ONLY) + private Integer expiresIn; /* - * The accessToken property. + * The hostName property. */ - @JsonProperty(value = "accessToken", access = JsonProperty.Access.WRITE_ONLY) - private String accessToken; + @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; /* - * The tokenType property. + * The notebookResourceId property. */ - @JsonProperty(value = "tokenType", access = JsonProperty.Access.WRITE_ONLY) - private String tokenType; + @JsonProperty(value = "notebookResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String notebookResourceId; /* - * The expiresIn property. + * The publicDns property. */ - @JsonProperty(value = "expiresIn", access = JsonProperty.Access.WRITE_ONLY) - private Integer expiresIn; + @JsonProperty(value = "publicDns", access = JsonProperty.Access.WRITE_ONLY) + private String publicDns; /* * The refreshToken property. @@ -58,67 +54,66 @@ public final class NotebookAccessTokenResultInner { @JsonProperty(value = "scope", access = JsonProperty.Access.WRITE_ONLY) private String scope; - /** Creates an instance of NotebookAccessTokenResultInner class. */ - public NotebookAccessTokenResultInner() { - } + /* + * The tokenType property. + */ + @JsonProperty(value = "tokenType", access = JsonProperty.Access.WRITE_ONLY) + private String tokenType; /** - * Get the notebookResourceId property: The notebookResourceId property. - * - * @return the notebookResourceId value. + * Creates an instance of NotebookAccessTokenResultInner class. */ - public String notebookResourceId() { - return this.notebookResourceId; + public NotebookAccessTokenResultInner() { } /** - * Get the hostname property: The hostName property. - * - * @return the hostname value. + * Get the accessToken property: The accessToken property. + * + * @return the accessToken value. */ - public String hostname() { - return this.hostname; + public String accessToken() { + return this.accessToken; } /** - * Get the publicDns property: The publicDns property. - * - * @return the publicDns value. + * Get the expiresIn property: The expiresIn property. + * + * @return the expiresIn value. */ - public String publicDns() { - return this.publicDns; + public Integer expiresIn() { + return this.expiresIn; } /** - * Get the accessToken property: The accessToken property. - * - * @return the accessToken value. + * Get the hostname property: The hostName property. + * + * @return the hostname value. */ - public String accessToken() { - return this.accessToken; + public String hostname() { + return this.hostname; } /** - * Get the tokenType property: The tokenType property. - * - * @return the tokenType value. + * Get the notebookResourceId property: The notebookResourceId property. + * + * @return the notebookResourceId value. */ - public String tokenType() { - return this.tokenType; + public String notebookResourceId() { + return this.notebookResourceId; } /** - * Get the expiresIn property: The expiresIn property. - * - * @return the expiresIn value. + * Get the publicDns property: The publicDns property. + * + * @return the publicDns value. */ - public Integer expiresIn() { - return this.expiresIn; + public String publicDns() { + return this.publicDns; } /** * Get the refreshToken property: The refreshToken property. - * + * * @return the refreshToken value. */ public String refreshToken() { @@ -127,16 +122,25 @@ public String refreshToken() { /** * Get the scope property: The scope property. - * + * * @return the scope value. */ public String scope() { return this.scope; } + /** + * Get the tokenType property: The tokenType property. + * + * @return the tokenType value. + */ + public String tokenType() { + return this.tokenType; + } + /** * 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/NotebookResourceInfoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java index 9433886680171..992e96e3fe761 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.machinelearning.models.NotebookPreparationError; import com.fasterxml.jackson.annotation.JsonProperty; -/** The NotebookResourceInfo model. */ +/** + * The NotebookResourceInfo model. + */ @Fluent public final class NotebookResourceInfoInner { /* @@ -18,10 +20,10 @@ public final class NotebookResourceInfoInner { private String fqdn; /* - * the data plane resourceId that used to initialize notebook component + * The isPrivateLinkEnabled property. */ - @JsonProperty(value = "resourceId") - private String resourceId; + @JsonProperty(value = "isPrivateLinkEnabled") + private Boolean isPrivateLinkEnabled; /* * The error that occurs when preparing notebook. @@ -29,13 +31,21 @@ public final class NotebookResourceInfoInner { @JsonProperty(value = "notebookPreparationError") private NotebookPreparationError notebookPreparationError; - /** Creates an instance of NotebookResourceInfoInner class. */ + /* + * the data plane resourceId that used to initialize notebook component + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Creates an instance of NotebookResourceInfoInner class. + */ public NotebookResourceInfoInner() { } /** * Get the fqdn property: The fqdn property. - * + * * @return the fqdn value. */ public String fqdn() { @@ -44,7 +54,7 @@ public String fqdn() { /** * Set the fqdn property: The fqdn property. - * + * * @param fqdn the fqdn value to set. * @return the NotebookResourceInfoInner object itself. */ @@ -54,28 +64,28 @@ public NotebookResourceInfoInner withFqdn(String fqdn) { } /** - * Get the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @return the resourceId value. + * Get the isPrivateLinkEnabled property: The isPrivateLinkEnabled property. + * + * @return the isPrivateLinkEnabled value. */ - public String resourceId() { - return this.resourceId; + public Boolean isPrivateLinkEnabled() { + return this.isPrivateLinkEnabled; } /** - * Set the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @param resourceId the resourceId value to set. + * Set the isPrivateLinkEnabled property: The isPrivateLinkEnabled property. + * + * @param isPrivateLinkEnabled the isPrivateLinkEnabled value to set. * @return the NotebookResourceInfoInner object itself. */ - public NotebookResourceInfoInner withResourceId(String resourceId) { - this.resourceId = resourceId; + public NotebookResourceInfoInner withIsPrivateLinkEnabled(Boolean isPrivateLinkEnabled) { + this.isPrivateLinkEnabled = isPrivateLinkEnabled; return this; } /** * Get the notebookPreparationError property: The error that occurs when preparing notebook. - * + * * @return the notebookPreparationError value. */ public NotebookPreparationError notebookPreparationError() { @@ -84,7 +94,7 @@ public NotebookPreparationError notebookPreparationError() { /** * Set the notebookPreparationError property: The error that occurs when preparing notebook. - * + * * @param notebookPreparationError the notebookPreparationError value to set. * @return the NotebookResourceInfoInner object itself. */ @@ -93,9 +103,29 @@ public NotebookResourceInfoInner withNotebookPreparationError(NotebookPreparatio return this; } + /** + * Get the resourceId property: the data plane resourceId that used to initialize notebook component. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: the data plane resourceId that used to initialize notebook component. + * + * @param resourceId the resourceId value to set. + * @return the NotebookResourceInfoInner object itself. + */ + public NotebookResourceInfoInner 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/fluent/models/OnlineDeploymentInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java index d48288f3c4471..ce74c6940ba6a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The OnlineDeployment model. */ +/** + * The OnlineDeployment model. + */ @Fluent public final class OnlineDeploymentInner extends Resource { /* @@ -47,13 +49,15 @@ public final class OnlineDeploymentInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of OnlineDeploymentInner class. */ + /** + * Creates an instance of OnlineDeploymentInner class. + */ public OnlineDeploymentInner() { } /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -62,7 +66,7 @@ public ManagedServiceIdentity identity() { /** * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @param identity the identity value to set. * @return the OnlineDeploymentInner object itself. */ @@ -74,7 +78,7 @@ public OnlineDeploymentInner withIdentity(ManagedServiceIdentity identity) { /** * 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() { @@ -84,7 +88,7 @@ public String 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 OnlineDeploymentInner object itself. */ @@ -95,7 +99,7 @@ public OnlineDeploymentInner withKind(String kind) { /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public OnlineDeploymentProperties properties() { @@ -104,7 +108,7 @@ public OnlineDeploymentProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the OnlineDeploymentInner object itself. */ @@ -115,7 +119,7 @@ public OnlineDeploymentInner withProperties(OnlineDeploymentProperties propertie /** * Get the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @return the sku value. */ public Sku sku() { @@ -124,7 +128,7 @@ public Sku sku() { /** * Set the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @param sku the sku value to set. * @return the OnlineDeploymentInner object itself. */ @@ -135,21 +139,25 @@ public OnlineDeploymentInner withSku(Sku sku) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineDeploymentInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineDeploymentInner withTags(Map tags) { super.withTags(tags); @@ -158,7 +166,7 @@ public OnlineDeploymentInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -166,10 +174,8 @@ public void validate() { identity().validate(); } if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model OnlineDeploymentInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model OnlineDeploymentInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java index 0f940fd5bb9f6..cc1e5be0dc5a8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java @@ -14,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The OnlineEndpoint model. */ +/** + * The OnlineEndpoint model. + */ @Fluent public final class OnlineEndpointInner extends Resource { /* @@ -47,13 +49,15 @@ public final class OnlineEndpointInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of OnlineEndpointInner class. */ + /** + * Creates an instance of OnlineEndpointInner class. + */ public OnlineEndpointInner() { } /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -62,7 +66,7 @@ public ManagedServiceIdentity identity() { /** * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @param identity the identity value to set. * @return the OnlineEndpointInner object itself. */ @@ -74,7 +78,7 @@ public OnlineEndpointInner withIdentity(ManagedServiceIdentity identity) { /** * 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() { @@ -84,7 +88,7 @@ public String 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 OnlineEndpointInner object itself. */ @@ -95,7 +99,7 @@ public OnlineEndpointInner withKind(String kind) { /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public OnlineEndpointProperties properties() { @@ -104,7 +108,7 @@ public OnlineEndpointProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the OnlineEndpointInner object itself. */ @@ -115,7 +119,7 @@ public OnlineEndpointInner withProperties(OnlineEndpointProperties properties) { /** * Get the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @return the sku value. */ public Sku sku() { @@ -124,7 +128,7 @@ public Sku sku() { /** * Set the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @param sku the sku value to set. * @return the OnlineEndpointInner object itself. */ @@ -135,21 +139,25 @@ public OnlineEndpointInner withSku(Sku sku) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineEndpointInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineEndpointInner withTags(Map tags) { super.withTags(tags); @@ -158,7 +166,7 @@ public OnlineEndpointInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -166,9 +174,8 @@ public void validate() { identity().validate(); } if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model OnlineEndpointInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model OnlineEndpointInner")); } else { properties().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..b82c1f28a6f43 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.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.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..6bf7a85c4aa84 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.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.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; + +/** + * The OutboundRuleBasicResource model. + */ +@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/PackageResponseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PackageResponseInner.java new file mode 100644 index 0000000000000..2c4e203b9d672 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PackageResponseInner.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.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.machinelearning.models.BaseEnvironmentSource; +import com.azure.resourcemanager.machinelearning.models.InferencingServer; +import com.azure.resourcemanager.machinelearning.models.ModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelPackageInput; +import com.azure.resourcemanager.machinelearning.models.PackageBuildState; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Package response returned after async package operation completes successfully. + */ +@Immutable +public final class PackageResponseInner { + /* + * Base environment to start with. + */ + @JsonProperty(value = "baseEnvironmentSource", access = JsonProperty.Access.WRITE_ONLY) + private BaseEnvironmentSource baseEnvironmentSource; + + /* + * Build id of the image build operation. + */ + @JsonProperty(value = "buildId", access = JsonProperty.Access.WRITE_ONLY) + private String buildId; + + /* + * Build state of the image build operation. + */ + @JsonProperty(value = "buildState", access = JsonProperty.Access.WRITE_ONLY) + private PackageBuildState buildState; + + /* + * Collection of environment variables. + */ + @JsonProperty(value = "environmentVariables", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * Inferencing server configurations. + */ + @JsonProperty(value = "inferencingServer", access = JsonProperty.Access.WRITE_ONLY) + private InferencingServer inferencingServer; + + /* + * Collection of inputs. + */ + @JsonProperty(value = "inputs", access = JsonProperty.Access.WRITE_ONLY) + private List inputs; + + /* + * Log url of the image build operation. + */ + @JsonProperty(value = "logUrl", access = JsonProperty.Access.WRITE_ONLY) + private String logUrl; + + /* + * Model configuration including the mount mode. + */ + @JsonProperty(value = "modelConfiguration", access = JsonProperty.Access.WRITE_ONLY) + private ModelConfiguration modelConfiguration; + + /* + * Property dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * Asset ID of the target environment created by package operation. + */ + @JsonProperty(value = "targetEnvironmentId", access = JsonProperty.Access.WRITE_ONLY) + private String targetEnvironmentId; + + /** + * Creates an instance of PackageResponseInner class. + */ + public PackageResponseInner() { + } + + /** + * Get the baseEnvironmentSource property: Base environment to start with. + * + * @return the baseEnvironmentSource value. + */ + public BaseEnvironmentSource baseEnvironmentSource() { + return this.baseEnvironmentSource; + } + + /** + * Get the buildId property: Build id of the image build operation. + * + * @return the buildId value. + */ + public String buildId() { + return this.buildId; + } + + /** + * Get the buildState property: Build state of the image build operation. + * + * @return the buildState value. + */ + public PackageBuildState buildState() { + return this.buildState; + } + + /** + * Get the environmentVariables property: Collection of environment variables. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Get the inferencingServer property: Inferencing server configurations. + * + * @return the inferencingServer value. + */ + public InferencingServer inferencingServer() { + return this.inferencingServer; + } + + /** + * Get the inputs property: Collection of inputs. + * + * @return the inputs value. + */ + public List inputs() { + return this.inputs; + } + + /** + * Get the logUrl property: Log url of the image build operation. + * + * @return the logUrl value. + */ + public String logUrl() { + return this.logUrl; + } + + /** + * Get the modelConfiguration property: Model configuration including the mount mode. + * + * @return the modelConfiguration value. + */ + public ModelConfiguration modelConfiguration() { + return this.modelConfiguration; + } + + /** + * Get the properties property: Property dictionary. Tags can be added, removed, and updated. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Get the tags property: Tag dictionary. Tags can be added, removed, and updated. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Get the targetEnvironmentId property: Asset ID of the target environment created by package operation. + * + * @return the targetEnvironmentId value. + */ + public String targetEnvironmentId() { + return this.targetEnvironmentId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (baseEnvironmentSource() != null) { + baseEnvironmentSource().validate(); + } + if (inferencingServer() != null) { + inferencingServer().validate(); + } + if (inputs() != null) { + inputs().forEach(e -> e.validate()); + } + if (modelConfiguration() != null) { + modelConfiguration().validate(); + } + } +} 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..3a7fcbe1cf0dc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java @@ -0,0 +1,112 @@ +// Copyright (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/PoolStatusInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PoolStatusInner.java new file mode 100644 index 0000000000000..9685af1dada5a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PoolStatusInner.java @@ -0,0 +1,132 @@ +// Copyright (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; + +/** + * The PoolStatus model. + */ +@Fluent +public final class PoolStatusInner { + /* + * Gets or sets the actual number of instances in the pool. + */ + @JsonProperty(value = "actualCapacity") + private Integer actualCapacity; + + /* + * Gets or sets the actual number of groups in the pool. + */ + @JsonProperty(value = "groupCount") + private Integer groupCount; + + /* + * Gets or sets the requested number of instances for the pool. + */ + @JsonProperty(value = "requestedCapacity") + private Integer requestedCapacity; + + /* + * Gets or sets the number of instances in the pool reserved by the system. + */ + @JsonProperty(value = "reservedCapacity") + private Integer reservedCapacity; + + /** + * Creates an instance of PoolStatusInner class. + */ + public PoolStatusInner() { + } + + /** + * Get the actualCapacity property: Gets or sets the actual number of instances in the pool. + * + * @return the actualCapacity value. + */ + public Integer actualCapacity() { + return this.actualCapacity; + } + + /** + * Set the actualCapacity property: Gets or sets the actual number of instances in the pool. + * + * @param actualCapacity the actualCapacity value to set. + * @return the PoolStatusInner object itself. + */ + public PoolStatusInner withActualCapacity(Integer actualCapacity) { + this.actualCapacity = actualCapacity; + return this; + } + + /** + * Get the groupCount property: Gets or sets the actual number of groups in the pool. + * + * @return the groupCount value. + */ + public Integer groupCount() { + return this.groupCount; + } + + /** + * Set the groupCount property: Gets or sets the actual number of groups in the pool. + * + * @param groupCount the groupCount value to set. + * @return the PoolStatusInner object itself. + */ + public PoolStatusInner withGroupCount(Integer groupCount) { + this.groupCount = groupCount; + return this; + } + + /** + * Get the requestedCapacity property: Gets or sets the requested number of instances for the pool. + * + * @return the requestedCapacity value. + */ + public Integer requestedCapacity() { + return this.requestedCapacity; + } + + /** + * Set the requestedCapacity property: Gets or sets the requested number of instances for the pool. + * + * @param requestedCapacity the requestedCapacity value to set. + * @return the PoolStatusInner object itself. + */ + public PoolStatusInner withRequestedCapacity(Integer requestedCapacity) { + this.requestedCapacity = requestedCapacity; + return this; + } + + /** + * Get the reservedCapacity property: Gets or sets the number of instances in the pool reserved by the system. + * + * @return the reservedCapacity value. + */ + public Integer reservedCapacity() { + return this.reservedCapacity; + } + + /** + * Set the reservedCapacity property: Gets or sets the number of instances in the pool reserved by the system. + * + * @param reservedCapacity the reservedCapacity value to set. + * @return the PoolStatusInner object itself. + */ + public PoolStatusInner withReservedCapacity(Integer reservedCapacity) { + this.reservedCapacity = reservedCapacity; + 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/PrivateEndpointConnectionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java index ac7de011781ba..b7e76f64c49dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java @@ -8,70 +8,65 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The Private Endpoint Connection resource. */ +/** + * The Private Endpoint Connection resource. + */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private PrivateEndpointConnectionProperties innerProperties; - - /* - * The identity of the resource. + * Managed service identity (system assigned and/or user assigned identities) */ @JsonProperty(value = "identity") private ManagedServiceIdentity identity; /* - * Specifies the location of the resource. + * Same as workspace location. */ @JsonProperty(value = "location") private String location; /* - * Contains resource tags defined as key/value pairs. + * Private endpoint connection properties. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; /* - * The sku of the workspace. + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier */ @JsonProperty(value = "sku") private Sku sku; + /* + * Dictionary of + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of PrivateEndpointConnectionInner class. */ - public PrivateEndpointConnectionInner() { - } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + * Creates an instance of PrivateEndpointConnectionInner class. */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; + public PrivateEndpointConnectionInner() { } /** - * Get the identity property: The identity of the resource. - * + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -79,8 +74,8 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: The identity of the resource. - * + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * * @param identity the identity value to set. * @return the PrivateEndpointConnectionInner object itself. */ @@ -90,8 +85,8 @@ public PrivateEndpointConnectionInner withIdentity(ManagedServiceIdentity identi } /** - * Get the location property: Specifies the location of the resource. - * + * Get the location property: Same as workspace location. + * * @return the location value. */ public String location() { @@ -99,8 +94,8 @@ public String location() { } /** - * Set the location property: Specifies the location of the resource. - * + * Set the location property: Same as workspace location. + * * @param location the location value to set. * @return the PrivateEndpointConnectionInner object itself. */ @@ -110,28 +105,18 @@ public PrivateEndpointConnectionInner withLocation(String location) { } /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. - * @return the PrivateEndpointConnectionInner object itself. + * Get the innerProperties property: Private endpoint connection properties. + * + * @return the innerProperties value. */ - public PrivateEndpointConnectionInner withTags(Map tags) { - this.tags = tags; - return this; + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; } /** - * Get the sku property: The sku of the workspace. - * + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * * @return the sku value. */ public Sku sku() { @@ -139,8 +124,9 @@ public Sku sku() { } /** - * Set the sku property: The sku of the workspace. - * + * Set the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * * @param sku the sku value to set. * @return the PrivateEndpointConnectionInner object itself. */ @@ -149,9 +135,29 @@ public PrivateEndpointConnectionInner withSku(Sku sku) { return this; } + /** + * Get the tags property: Dictionary of <string>. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Dictionary of <string>. + * + * @param tags the tags value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -159,21 +165,21 @@ public SystemData systemData() { } /** - * Get the privateEndpoint property: The resource of private end point. - * + * Get the privateEndpoint property: The Private Endpoint resource. + * * @return the privateEndpoint value. */ - public PrivateEndpoint privateEndpoint() { + public WorkspacePrivateEndpointResource privateEndpoint() { return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); } /** - * Set the privateEndpoint property: The resource of private end point. - * + * Set the privateEndpoint property: The Private Endpoint resource. + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + public PrivateEndpointConnectionInner withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint) { if (this.innerProperties() == null) { this.innerProperties = new PrivateEndpointConnectionProperties(); } @@ -182,9 +188,8 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat } /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Get the privateLinkServiceConnectionState property: The connection state. + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -192,14 +197,13 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Set the privateLinkServiceConnectionState property: The connection state. + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionInner + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { if (this.innerProperties() == null) { this.innerProperties = new PrivateEndpointConnectionProperties(); } @@ -208,26 +212,41 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( } /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * + * Get the provisioningState property: The current provisioning state. + * * @return the provisioningState value. */ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Set the provisioningState property: The current provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner + withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + 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(); - } if (identity() != null) { identity().validate(); } + if (innerProperties() != null) { + innerProperties().validate(); + } if (sku() != null) { sku().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java index c09c5305622f9..4a74afa4966ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java @@ -5,61 +5,63 @@ package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of the PrivateEndpointConnectProperties. */ +/** + * Private endpoint connection properties. + */ @Fluent public final class PrivateEndpointConnectionProperties { /* - * The resource of private end point. + * The Private Endpoint resource. */ @JsonProperty(value = "privateEndpoint") - private PrivateEndpoint privateEndpoint; + private WorkspacePrivateEndpointResource privateEndpoint; /* - * A collection of information about the state of the connection between service consumer and provider. + * The connection state. */ - @JsonProperty(value = "privateLinkServiceConnectionState", required = true) + @JsonProperty(value = "privateLinkServiceConnectionState") private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; /* - * The provisioning state of the private endpoint connection resource. + * The current provisioning state. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "provisioningState") private PrivateEndpointConnectionProvisioningState provisioningState; - /** Creates an instance of PrivateEndpointConnectionProperties class. */ + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ public PrivateEndpointConnectionProperties() { } /** - * Get the privateEndpoint property: The resource of private end point. - * + * Get the privateEndpoint property: The Private Endpoint resource. + * * @return the privateEndpoint value. */ - public PrivateEndpoint privateEndpoint() { + public WorkspacePrivateEndpointResource privateEndpoint() { return this.privateEndpoint; } /** - * Set the privateEndpoint property: The resource of private end point. - * + * Set the privateEndpoint property: The Private Endpoint resource. + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionProperties object itself. */ - public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + public PrivateEndpointConnectionProperties withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint) { this.privateEndpoint = privateEndpoint; return this; } /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Get the privateLinkServiceConnectionState property: The connection state. + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -67,46 +69,49 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * + * Set the privateLinkServiceConnectionState property: The connection state. + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionProperties object itself. */ - public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionProperties + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * + * Get the provisioningState property: The current provisioning state. + * * @return the provisioningState value. */ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.provisioningState; } + /** + * Set the provisioningState property: The current provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties + withProvisioningState(PrivateEndpointConnectionProvisioningState 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 (privateLinkServiceConnectionState() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model" - + " PrivateEndpointConnectionProperties")); - } else { + if (privateLinkServiceConnectionState() != null) { privateLinkServiceConnectionState().validate(); } } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 0000000000000..e21d4396cfef7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,250 @@ +// Copyright (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.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * A private link resource. + */ +@Fluent +public final class PrivateLinkResourceInner extends ProxyResource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Same as workspace location. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Properties of a private link resource. + */ + @JsonProperty(value = "properties") + private PrivateLinkResourceProperties innerProperties; + + /* + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * Dictionary of + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PrivateLinkResourceInner class. + */ + public PrivateLinkResourceInner() { + } + + /** + * 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 PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + 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 PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the innerProperties property: Properties of a private link resource. + * + * @return the innerProperties value. + */ + private PrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * + * @param sku the sku value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the tags property: Dictionary of <string>. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Dictionary of <string>. + * + * @param tags the tags value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.innerProperties() == null ? null : this.innerProperties().groupId(); + } + + /** + * Set the groupId property: The private link resource group id. + * + * @param groupId the groupId value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withGroupId(String groupId) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withGroupId(groupId); + return this; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); + } + + /** + * Set the requiredMembers property: The private link resource required member names. + * + * @param requiredMembers the requiredMembers value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredMembers(List requiredMembers) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredMembers(requiredMembers); + return this; + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); + } + + /** + * Set the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredZoneNames(requiredZoneNames); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java deleted file mode 100644 index 6047466b92300..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of private link resources. */ -@Fluent -public final class PrivateLinkResourceListResultInner { - /* - * Array of private link resources - */ - @JsonProperty(value = "value") - private List value; - - /** Creates an instance of PrivateLinkResourceListResultInner class. */ - public PrivateLinkResourceListResultInner() { - } - - /** - * Get the value property: Array of private link resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourceListResultInner object itself. - */ - public PrivateLinkResourceListResultInner 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/fluent/models/PrivateLinkResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java index 7547a19c2fa61..d68fa9ca68b7e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java @@ -8,19 +8,21 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of a private link resource. */ +/** + * Properties of a private link resource. + */ @Fluent public final class PrivateLinkResourceProperties { /* * The private link resource group id. */ - @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "groupId") private String groupId; /* * The private link resource required member names. */ - @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "requiredMembers") private List requiredMembers; /* @@ -29,31 +31,55 @@ public final class PrivateLinkResourceProperties { @JsonProperty(value = "requiredZoneNames") private List requiredZoneNames; - /** Creates an instance of PrivateLinkResourceProperties class. */ + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ public PrivateLinkResourceProperties() { } /** * Get the groupId property: The private link resource group id. - * + * * @return the groupId value. */ public String groupId() { return this.groupId; } + /** + * Set the groupId property: The private link resource group id. + * + * @param groupId the groupId value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + /** * Get the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ public List requiredMembers() { return this.requiredMembers; } + /** + * Set the requiredMembers property: The private link resource required member names. + * + * @param requiredMembers the requiredMembers value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withRequiredMembers(List requiredMembers) { + this.requiredMembers = requiredMembers; + return this; + } + /** * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -62,7 +88,7 @@ public List requiredZoneNames() { /** * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * + * * @param requiredZoneNames the requiredZoneNames value to set. * @return the PrivateLinkResourceProperties object itself. */ @@ -73,7 +99,7 @@ public PrivateLinkResourceProperties withRequiredZoneNames(List required /** * 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/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..c51c09da79e3c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java @@ -0,0 +1,372 @@ +// Copyright (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.ManagedResourceGroupSettings; +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 managedResourceGroupSettings property: Managed resource group specific settings. + * + * @return the managedResourceGroupSettings value. + */ + public ManagedResourceGroupSettings managedResourceGroupSettings() { + return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupSettings(); + } + + /** + * Set the managedResourceGroupSettings property: Managed resource group specific settings. + * + * @param managedResourceGroupSettings the managedResourceGroupSettings value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withManagedResourceGroupSettings(ManagedResourceGroupSettings managedResourceGroupSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withManagedResourceGroupSettings(managedResourceGroupSettings); + 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..9b48938a9b1b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.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.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..eb5b01616231d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java @@ -0,0 +1,262 @@ +// Copyright (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.ManagedResourceGroupSettings; +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; + + /* + * Managed resource group specific settings + */ + @JsonProperty(value = "managedResourceGroupSettings") + private ManagedResourceGroupSettings managedResourceGroupSettings; + + /* + * 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 managedResourceGroupSettings property: Managed resource group specific settings. + * + * @return the managedResourceGroupSettings value. + */ + public ManagedResourceGroupSettings managedResourceGroupSettings() { + return this.managedResourceGroupSettings; + } + + /** + * Set the managedResourceGroupSettings property: Managed resource group specific settings. + * + * @param managedResourceGroupSettings the managedResourceGroupSettings value to set. + * @return the RegistryProperties object itself. + */ + public RegistryProperties + withManagedResourceGroupSettings(ManagedResourceGroupSettings managedResourceGroupSettings) { + this.managedResourceGroupSettings = managedResourceGroupSettings; + 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 (managedResourceGroupSettings() != null) { + managedResourceGroupSettings().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/ResourceQuotaInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java index 66cc692078955..6a8e34e6edda2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.machinelearning.models.ResourceName; import com.fasterxml.jackson.annotation.JsonProperty; -/** The quota assigned to a resource. */ +/** + * The quota assigned to a resource. + */ @Immutable public final class ResourceQuotaInner { /* @@ -38,7 +40,7 @@ public final class ResourceQuotaInner { /* * Limit. - * + * * The maximum permitted quota of the resource. */ @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) @@ -50,13 +52,15 @@ public final class ResourceQuotaInner { @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) private QuotaUnit unit; - /** Creates an instance of ResourceQuotaInner class. */ + /** + * Creates an instance of ResourceQuotaInner class. + */ public ResourceQuotaInner() { } /** * Get the id property: Specifies the resource ID. - * + * * @return the id value. */ public String id() { @@ -65,7 +69,7 @@ public String id() { /** * Get the amlWorkspaceLocation property: Region of the AML workspace in the id. - * + * * @return the amlWorkspaceLocation value. */ public String amlWorkspaceLocation() { @@ -74,7 +78,7 @@ public String amlWorkspaceLocation() { /** * Get the type property: Specifies the resource type. - * + * * @return the type value. */ public String type() { @@ -83,7 +87,7 @@ public String type() { /** * Get the name property: Name of the resource. - * + * * @return the name value. */ public ResourceName name() { @@ -92,9 +96,9 @@ public ResourceName name() { /** * Get the limit property: Limit. - * - *

The maximum permitted quota of the resource. - * + * + * The maximum permitted quota of the resource. + * * @return the limit value. */ public Long limit() { @@ -103,7 +107,7 @@ public Long limit() { /** * Get the unit property: An enum describing the unit of quota measurement. - * + * * @return the unit value. */ public QuotaUnit unit() { @@ -112,7 +116,7 @@ public QuotaUnit unit() { /** * 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/ScheduleInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java index 4efea46f4816c..7ceff49bfdc06 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Resource Manager resource envelope. */ +/** + * Azure Resource Manager resource envelope. + */ @Fluent public final class ScheduleInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class ScheduleInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ScheduleInner class. */ + /** + * Creates an instance of ScheduleInner class. + */ public ScheduleInner() { } /** * Get the properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ public ScheduleProperties properties() { @@ -41,7 +45,7 @@ public ScheduleProperties properties() { /** * Set the properties property: [Required] Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the ScheduleInner object itself. */ @@ -52,7 +56,7 @@ public ScheduleInner withProperties(ScheduleProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -61,14 +65,13 @@ public SystemData 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 ScheduleInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model ScheduleInner")); } else { properties().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.java new file mode 100644 index 0000000000000..bbb2af9502269 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.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.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.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The ServerlessEndpoint model. + */ +@Fluent +public final class ServerlessEndpointInner 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 ServerlessEndpointProperties properties; + + /* + * 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 ServerlessEndpointInner class. + */ + public ServerlessEndpointInner() { + } + + /** + * 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 ServerlessEndpointInner object itself. + */ + public ServerlessEndpointInner 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 ServerlessEndpointInner object itself. + */ + public ServerlessEndpointInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public ServerlessEndpointProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the ServerlessEndpointInner object itself. + */ + public ServerlessEndpointInner withProperties(ServerlessEndpointProperties properties) { + this.properties = properties; + return this; + } + + /** + * 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 ServerlessEndpointInner object itself. + */ + public ServerlessEndpointInner 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 ServerlessEndpointInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (properties() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model ServerlessEndpointInner")); + } else { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointInner.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointStatusInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointStatusInner.java new file mode 100644 index 0000000000000..7052763cd0a5e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointStatusInner.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.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The ServerlessEndpointStatus model. + */ +@Immutable +public final class ServerlessEndpointStatusInner { + /* + * The model-specific metrics from the backing inference endpoint. + */ + @JsonProperty(value = "metrics", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map metrics; + + /** + * Creates an instance of ServerlessEndpointStatusInner class. + */ + public ServerlessEndpointStatusInner() { + } + + /** + * Get the metrics property: The model-specific metrics from the backing inference endpoint. + * + * @return the metrics value. + */ + public Map metrics() { + return this.metrics; + } + + /** + * 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/SharedPrivateLinkResourceProperty.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java index 958d5005f9a12..3b869b6370f67 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java @@ -5,83 +5,87 @@ package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of a shared private link resource. */ +/** + * Properties of a shared private link resource. + */ @Fluent public final class SharedPrivateLinkResourceProperty { /* - * The resource id that private link links to. + * group id of the private link */ - @JsonProperty(value = "privateLinkResourceId") - private String privateLinkResourceId; + @JsonProperty(value = "groupId") + private String groupId; /* - * The private link resource group id. + * the resource id that private link links to */ - @JsonProperty(value = "groupId") - private String groupId; + @JsonProperty(value = "privateLinkResourceId") + private String privateLinkResourceId; /* - * Request message. + * Request message */ @JsonProperty(value = "requestMessage") private String requestMessage; /* - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + * Connection status of the service consumer with the service provider */ @JsonProperty(value = "status") - private PrivateEndpointServiceConnectionStatus status; + private EndpointServiceConnectionStatus status; - /** Creates an instance of SharedPrivateLinkResourceProperty class. */ + /** + * Creates an instance of SharedPrivateLinkResourceProperty class. + */ public SharedPrivateLinkResourceProperty() { } /** - * Get the privateLinkResourceId property: The resource id that private link links to. - * - * @return the privateLinkResourceId value. + * Get the groupId property: group id of the private link. + * + * @return the groupId value. */ - public String privateLinkResourceId() { - return this.privateLinkResourceId; + public String groupId() { + return this.groupId; } /** - * Set the privateLinkResourceId property: The resource id that private link links to. - * - * @param privateLinkResourceId the privateLinkResourceId value to set. + * Set the groupId property: group id of the private link. + * + * @param groupId the groupId value to set. * @return the SharedPrivateLinkResourceProperty object itself. */ - public SharedPrivateLinkResourceProperty withPrivateLinkResourceId(String privateLinkResourceId) { - this.privateLinkResourceId = privateLinkResourceId; + public SharedPrivateLinkResourceProperty withGroupId(String groupId) { + this.groupId = groupId; return this; } /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. + * Get the privateLinkResourceId property: the resource id that private link links to. + * + * @return the privateLinkResourceId value. */ - public String groupId() { - return this.groupId; + public String privateLinkResourceId() { + return this.privateLinkResourceId; } /** - * Set the groupId property: The private link resource group id. - * - * @param groupId the groupId value to set. + * Set the privateLinkResourceId property: the resource id that private link links to. + * + * @param privateLinkResourceId the privateLinkResourceId value to set. * @return the SharedPrivateLinkResourceProperty object itself. */ - public SharedPrivateLinkResourceProperty withGroupId(String groupId) { - this.groupId = groupId; + public SharedPrivateLinkResourceProperty withPrivateLinkResourceId(String privateLinkResourceId) { + this.privateLinkResourceId = privateLinkResourceId; return this; } /** * Get the requestMessage property: Request message. - * + * * @return the requestMessage value. */ public String requestMessage() { @@ -90,7 +94,7 @@ public String requestMessage() { /** * Set the requestMessage property: Request message. - * + * * @param requestMessage the requestMessage value to set. * @return the SharedPrivateLinkResourceProperty object itself. */ @@ -100,30 +104,28 @@ public SharedPrivateLinkResourceProperty withRequestMessage(String requestMessag } /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * + * Get the status property: Connection status of the service consumer with the service provider. + * * @return the status value. */ - public PrivateEndpointServiceConnectionStatus status() { + public EndpointServiceConnectionStatus status() { return this.status; } /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * + * Set the status property: Connection status of the service consumer with the service provider. + * * @param status the status value to set. * @return the SharedPrivateLinkResourceProperty object itself. */ - public SharedPrivateLinkResourceProperty withStatus(PrivateEndpointServiceConnectionStatus status) { + public SharedPrivateLinkResourceProperty 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/fluent/models/SkuResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java index 7eeb0fa29679c..adfcb2ac80ba6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.machinelearning.models.SkuSetting; import com.fasterxml.jackson.annotation.JsonProperty; -/** Fulfills ARM Contract requirement to list all available SKUS for a resource. */ +/** + * Fulfills ARM Contract requirement to list all available SKUS for a resource. + */ @Fluent public final class SkuResourceInner { /* @@ -30,13 +32,15 @@ public final class SkuResourceInner { @JsonProperty(value = "sku") private SkuSetting sku; - /** Creates an instance of SkuResourceInner class. */ + /** + * Creates an instance of SkuResourceInner class. + */ public SkuResourceInner() { } /** * Get the capacity property: Gets or sets the Sku Capacity. - * + * * @return the capacity value. */ public SkuCapacity capacity() { @@ -45,7 +49,7 @@ public SkuCapacity capacity() { /** * Set the capacity property: Gets or sets the Sku Capacity. - * + * * @param capacity the capacity value to set. * @return the SkuResourceInner object itself. */ @@ -56,7 +60,7 @@ public SkuResourceInner withCapacity(SkuCapacity capacity) { /** * Get the resourceType property: The resource type name. - * + * * @return the resourceType value. */ public String resourceType() { @@ -65,7 +69,7 @@ public String resourceType() { /** * Get the sku property: Gets or sets the Sku. - * + * * @return the sku value. */ public SkuSetting sku() { @@ -74,7 +78,7 @@ public SkuSetting sku() { /** * Set the sku property: Gets or sets the Sku. - * + * * @param sku the sku value to set. * @return the SkuResourceInner object itself. */ @@ -85,7 +89,7 @@ public SkuResourceInner withSku(SkuSetting sku) { /** * 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/TriggerRunSubmissionDtoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/TriggerRunSubmissionDtoInner.java new file mode 100644 index 0000000000000..37f1493708b77 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/TriggerRunSubmissionDtoInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.models.ScheduleType; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The TriggerRunSubmissionDto model. + */ +@Fluent +public final class TriggerRunSubmissionDtoInner { + /* + * The scheduleActionType property. + */ + @JsonProperty(value = "scheduleActionType") + private ScheduleType scheduleActionType; + + /* + * The submissionId property. + */ + @JsonProperty(value = "submissionId") + private String submissionId; + + /** + * Creates an instance of TriggerRunSubmissionDtoInner class. + */ + public TriggerRunSubmissionDtoInner() { + } + + /** + * Get the scheduleActionType property: The scheduleActionType property. + * + * @return the scheduleActionType value. + */ + public ScheduleType scheduleActionType() { + return this.scheduleActionType; + } + + /** + * Set the scheduleActionType property: The scheduleActionType property. + * + * @param scheduleActionType the scheduleActionType value to set. + * @return the TriggerRunSubmissionDtoInner object itself. + */ + public TriggerRunSubmissionDtoInner withScheduleActionType(ScheduleType scheduleActionType) { + this.scheduleActionType = scheduleActionType; + return this; + } + + /** + * Get the submissionId property: The submissionId property. + * + * @return the submissionId value. + */ + public String submissionId() { + return this.submissionId; + } + + /** + * Set the submissionId property: The submissionId property. + * + * @param submissionId the submissionId value to set. + * @return the TriggerRunSubmissionDtoInner object itself. + */ + public TriggerRunSubmissionDtoInner withSubmissionId(String submissionId) { + this.submissionId = submissionId; + 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/UpdateWorkspaceQuotasResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.java index dbbad12998c90..72eed86c60e4b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The result of update workspace quota. */ +/** + * The result of update workspace quota. + */ @Immutable public final class UpdateWorkspaceQuotasResultInner { /* @@ -25,13 +27,15 @@ public final class UpdateWorkspaceQuotasResultInner { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of UpdateWorkspaceQuotasResultInner class. */ + /** + * Creates an instance of UpdateWorkspaceQuotasResultInner class. + */ public UpdateWorkspaceQuotasResultInner() { } /** * Get the value property: The list of workspace quota update result. - * + * * @return the value value. */ public List value() { @@ -41,7 +45,7 @@ public List value() { /** * Get the nextLink property: The URI to fetch the next page of workspace quota update result. Call ListNext() with * this to fetch the next page of Workspace Quota update result. - * + * * @return the nextLink value. */ public String nextLink() { @@ -50,7 +54,7 @@ public String nextLink() { /** * 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/UsageInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java index e4fe732059630..f432705999c3d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.machinelearning.models.UsageUnit; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes AML Resource Usage. */ +/** + * Describes AML Resource Usage. + */ @Immutable public final class UsageInner { /* @@ -54,13 +56,15 @@ public final class UsageInner { @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private UsageName name; - /** Creates an instance of UsageInner class. */ + /** + * Creates an instance of UsageInner class. + */ public UsageInner() { } /** * Get the id property: Specifies the resource ID. - * + * * @return the id value. */ public String id() { @@ -69,7 +73,7 @@ public String id() { /** * Get the amlWorkspaceLocation property: Region of the AML workspace in the id. - * + * * @return the amlWorkspaceLocation value. */ public String amlWorkspaceLocation() { @@ -78,7 +82,7 @@ public String amlWorkspaceLocation() { /** * Get the type property: Specifies the resource type. - * + * * @return the type value. */ public String type() { @@ -87,7 +91,7 @@ public String type() { /** * Get the unit property: An enum describing the unit of usage measurement. - * + * * @return the unit value. */ public UsageUnit unit() { @@ -96,7 +100,7 @@ public UsageUnit unit() { /** * Get the currentValue property: The current usage of the resource. - * + * * @return the currentValue value. */ public Long currentValue() { @@ -105,7 +109,7 @@ public Long currentValue() { /** * Get the limit property: The maximum permitted usage of the resource. - * + * * @return the limit value. */ public Long limit() { @@ -114,7 +118,7 @@ public Long limit() { /** * Get the name property: The name of the type of usage. - * + * * @return the name value. */ public UsageName name() { @@ -123,7 +127,7 @@ public UsageName name() { /** * 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/VirtualMachineSizeListResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java index 1b6d96583c16f..f32427c8d6bcd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The List Virtual Machine size operation response. */ +/** + * The List Virtual Machine size operation response. + */ @Fluent public final class VirtualMachineSizeListResultInner { /* @@ -18,13 +20,15 @@ public final class VirtualMachineSizeListResultInner { @JsonProperty(value = "value") private List value; - /** Creates an instance of VirtualMachineSizeListResultInner class. */ + /** + * Creates an instance of VirtualMachineSizeListResultInner class. + */ public VirtualMachineSizeListResultInner() { } /** * Get the value property: The list of virtual machine sizes supported by AmlCompute. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: The list of virtual machine sizes supported by AmlCompute. - * + * * @param value the value value to set. * @return the VirtualMachineSizeListResultInner object itself. */ @@ -44,7 +48,7 @@ public VirtualMachineSizeListResultInner withValue(List valu /** * 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/WorkspaceConnectionPropertiesV2BasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java index 640d838868b7c..e1d93ec26872d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; import com.fasterxml.jackson.annotation.JsonProperty; -/** The WorkspaceConnectionPropertiesV2BasicResource model. */ +/** + * The WorkspaceConnectionPropertiesV2BasicResource model. + */ @Fluent public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends ProxyResource { /* @@ -26,13 +28,15 @@ public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends Pro @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceInner class. */ + /** + * Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceInner class. + */ public WorkspaceConnectionPropertiesV2BasicResourceInner() { } /** * Get the properties property: The properties property. - * + * * @return the properties value. */ public WorkspaceConnectionPropertiesV2 properties() { @@ -41,19 +45,19 @@ public WorkspaceConnectionPropertiesV2 properties() { /** * Set the properties property: The properties property. - * + * * @param properties the properties value to set. * @return the WorkspaceConnectionPropertiesV2BasicResourceInner object itself. */ - public WorkspaceConnectionPropertiesV2BasicResourceInner withProperties( - WorkspaceConnectionPropertiesV2 properties) { + public WorkspaceConnectionPropertiesV2BasicResourceInner + withProperties(WorkspaceConnectionPropertiesV2 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() { @@ -62,21 +66,18 @@ public SystemData 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" - + " WorkspaceConnectionPropertiesV2BasicResourceInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property properties in model WorkspaceConnectionPropertiesV2BasicResourceInner")); } else { properties().validate(); } } - private static final ClientLogger LOGGER = - new ClientLogger(WorkspaceConnectionPropertiesV2BasicResourceInner.class); + private static final ClientLogger LOGGER + = new ClientLogger(WorkspaceConnectionPropertiesV2BasicResourceInner.class); } 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..e0ff2897e1842 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 @@ -7,74 +7,79 @@ 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.EncryptionProperty; +import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; 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.PublicNetworkAccessType; +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; +import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** An object that represents a machine learning workspace. */ +/** + * An object that represents a machine learning workspace. + */ @Fluent public final class WorkspaceInner extends ProxyResource { /* - * The properties of the machine learning workspace. + * Managed service identity (system assigned and/or user assigned identities) */ - @JsonProperty(value = "properties") - private WorkspacePropertiesInner innerProperties; + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; /* - * The identity of the resource. + * The kind property. */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; + @JsonProperty(value = "kind") + private String kind; /* - * Specifies the location of the resource. + * The location property. */ @JsonProperty(value = "location") private String location; /* - * Contains resource tags defined as key/value pairs. + * Additional attributes of the entity. */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; + @JsonProperty(value = "properties", required = true) + private WorkspacePropertiesInner innerProperties = new WorkspacePropertiesInner(); /* - * The sku of the workspace. + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier */ @JsonProperty(value = "sku") private Sku sku; + /* + * Dictionary of + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of WorkspaceInner class. */ - public WorkspaceInner() { - } - /** - * Get the innerProperties property: The properties of the machine learning workspace. - * - * @return the innerProperties value. + * Creates an instance of WorkspaceInner class. */ - private WorkspacePropertiesInner innerProperties() { - return this.innerProperties; + public WorkspaceInner() { } /** - * Get the identity property: The identity of the resource. - * + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -82,8 +87,8 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: The identity of the resource. - * + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * * @param identity the identity value to set. * @return the WorkspaceInner object itself. */ @@ -93,48 +98,58 @@ public WorkspaceInner withIdentity(ManagedServiceIdentity identity) { } /** - * Get the location property: Specifies the location of the resource. - * - * @return the location value. + * Get the kind property: The kind property. + * + * @return the kind value. */ - public String location() { - return this.location; + public String kind() { + return this.kind; } /** - * Set the location property: Specifies the location of the resource. - * - * @param location the location value to set. + * Set the kind property: The kind property. + * + * @param kind the kind value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withLocation(String location) { - this.location = location; + public WorkspaceInner withKind(String kind) { + this.kind = kind; return this; } /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. + * Get the location property: The location property. + * + * @return the location value. */ - public Map tags() { - return this.tags; + public String location() { + return this.location; } /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. + * Set the location property: The location property. + * + * @param location the location value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withTags(Map tags) { - this.tags = tags; + public WorkspaceInner withLocation(String location) { + this.location = location; return this; } /** - * Get the sku property: The sku of the workspace. - * + * Get the innerProperties property: Additional attributes of the entity. + * + * @return the innerProperties value. + */ + private WorkspacePropertiesInner innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * * @return the sku value. */ public Sku sku() { @@ -142,8 +157,9 @@ public Sku sku() { } /** - * Set the sku property: The sku of the workspace. - * + * Set the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * * @param sku the sku value to set. * @return the WorkspaceInner object itself. */ @@ -153,120 +169,131 @@ public WorkspaceInner withSku(Sku sku) { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. + * Get the tags property: Dictionary of <string>. + * + * @return the tags value. */ - public SystemData systemData() { - return this.systemData; + public Map tags() { + return this.tags; } /** - * Get the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. + * Set the tags property: Dictionary of <string>. + * + * @param tags the tags value to set. + * @return the WorkspaceInner object itself. */ - public String workspaceId() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceId(); + public WorkspaceInner withTags(Map tags) { + this.tags = tags; + return this; } /** - * Get the description property: The description of this workspace. - * - * @return the description value. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public SystemData systemData() { + return this.systemData; } /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. + * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. + * + * @return the allowPublicAccessWhenBehindVnet value. + */ + public Boolean allowPublicAccessWhenBehindVnet() { + return this.innerProperties() == null ? null : this.innerProperties().allowPublicAccessWhenBehindVnet(); + } + + /** + * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. + * + * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withDescription(String description) { + public WorkspaceInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withDescription(description); + this.innerProperties().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); return this; } /** - * Get the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + public String applicationInsights() { + return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); } /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @param friendlyName the friendlyName value to set. + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @param applicationInsights the applicationInsights value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withFriendlyName(String friendlyName) { + public WorkspaceInner withApplicationInsights(String applicationInsights) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withFriendlyName(friendlyName); + this.innerProperties().withApplicationInsights(applicationInsights); return this; } /** - * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. + * Get the associatedWorkspaces property: The associatedWorkspaces property. + * + * @return the associatedWorkspaces value. */ - public String keyVault() { - return this.innerProperties() == null ? null : this.innerProperties().keyVault(); + public List associatedWorkspaces() { + return this.innerProperties() == null ? null : this.innerProperties().associatedWorkspaces(); } /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @param keyVault the keyVault value to set. + * Set the associatedWorkspaces property: The associatedWorkspaces property. + * + * @param associatedWorkspaces the associatedWorkspaces value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withKeyVault(String keyVault) { + public WorkspaceInner withAssociatedWorkspaces(List associatedWorkspaces) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withKeyVault(keyVault); + this.innerProperties().withAssociatedWorkspaces(associatedWorkspaces); return this; } /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. + * Get the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. */ - public String applicationInsights() { - return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); + public List containerRegistries() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistries(); } /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @param applicationInsights the applicationInsights value to set. + * Set the containerRegistries property: The containerRegistries property. + * + * @param containerRegistries the containerRegistries value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withApplicationInsights(String applicationInsights) { + public WorkspaceInner withContainerRegistries(List containerRegistries) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withApplicationInsights(applicationInsights); + this.innerProperties().withContainerRegistries(containerRegistries); return this; } /** * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * + * * @return the containerRegistry value. */ public String containerRegistry() { @@ -275,7 +302,7 @@ public String containerRegistry() { /** * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * + * * @param containerRegistry the containerRegistry value to set. * @return the WorkspaceInner object itself. */ @@ -288,34 +315,32 @@ public WorkspaceInner withContainerRegistry(String containerRegistry) { } /** - * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. + * Get the description property: The description of this workspace. + * + * @return the description value. */ - public String storageAccount() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccount(); + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** - * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @param storageAccount the storageAccount value to set. + * Set the description property: The description of this workspace. + * + * @param description the description value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withStorageAccount(String storageAccount) { + public WorkspaceInner withDescription(String description) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withStorageAccount(storageAccount); + this.innerProperties().withDescription(description); return this; } /** * Get the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning * experimentation services. - * + * * @return the discoveryUrl value. */ public String discoveryUrl() { @@ -325,7 +350,7 @@ public String discoveryUrl() { /** * Set the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning * experimentation services. - * + * * @param discoveryUrl the discoveryUrl value to set. * @return the WorkspaceInner object itself. */ @@ -338,18 +363,56 @@ public WorkspaceInner withDiscoveryUrl(String discoveryUrl) { } /** - * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. + * Get the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + public Boolean enableDataIsolation() { + return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); + } + + /** + * Set the enableDataIsolation property: The enableDataIsolation property. + * + * @param enableDataIsolation the enableDataIsolation value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withEnableDataIsolation(Boolean enableDataIsolation) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withEnableDataIsolation(enableDataIsolation); + return this; + } + + /** + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + public Boolean enableSoftwareBillOfMaterials() { + return this.innerProperties() == null ? null : this.innerProperties().enableSoftwareBillOfMaterials(); } /** - * Get the encryption property: The encryption settings of Azure ML workspace. - * + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); + return this; + } + + /** + * Get the encryption property: The encryption property. + * * @return the encryption value. */ public EncryptionProperty encryption() { @@ -357,8 +420,8 @@ public EncryptionProperty encryption() { } /** - * Set the encryption property: The encryption settings of Azure ML workspace. - * + * Set the encryption property: The encryption property. + * * @param encryption the encryption value to set. * @return the WorkspaceInner object itself. */ @@ -370,10 +433,79 @@ public WorkspaceInner withEncryption(EncryptionProperty encryption) { return this; } + /** + * Get the existingWorkspaces property: The existingWorkspaces property. + * + * @return the existingWorkspaces value. + */ + public List existingWorkspaces() { + return this.innerProperties() == null ? null : this.innerProperties().existingWorkspaces(); + } + + /** + * Set the existingWorkspaces property: The existingWorkspaces property. + * + * @param existingWorkspaces the existingWorkspaces value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withExistingWorkspaces(List existingWorkspaces) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withExistingWorkspaces(existingWorkspaces); + return this; + } + + /** + * Get the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + public FeatureStoreSettings featureStoreSettings() { + return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); + } + + /** + * Set the featureStoreSettings property: Settings for feature store type workspace. + * + * @param featureStoreSettings the featureStoreSettings value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withFeatureStoreSettings(featureStoreSettings); + return this; + } + + /** + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + } + + /** + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @param friendlyName the friendlyName value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withFriendlyName(String friendlyName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withFriendlyName(friendlyName); + return this; + } + /** * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected * by the service. - * + * * @return the hbiWorkspace value. */ public Boolean hbiWorkspace() { @@ -383,7 +515,7 @@ public Boolean hbiWorkspace() { /** * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected * by the service. - * + * * @param hbiWorkspace the hbiWorkspace value to set. * @return the WorkspaceInner object itself. */ @@ -396,27 +528,31 @@ public WorkspaceInner withHbiWorkspace(Boolean hbiWorkspace) { } /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. + * Get the hubResourceId property: The hubResourceId property. + * + * @return the hubResourceId value. */ - public String serviceProvisionedResourceGroup() { - return this.innerProperties() == null ? null : this.innerProperties().serviceProvisionedResourceGroup(); + public String hubResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().hubResourceId(); } /** - * Get the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. + * Set the hubResourceId property: The hubResourceId property. + * + * @param hubResourceId the hubResourceId value to set. + * @return the WorkspaceInner object itself. */ - public Integer privateLinkCount() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkCount(); + public WorkspaceInner withHubResourceId(String hubResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withHubResourceId(hubResourceId); + return this; } /** * Get the imageBuildCompute property: The compute name for image build. - * + * * @return the imageBuildCompute value. */ public String imageBuildCompute() { @@ -425,7 +561,7 @@ public String imageBuildCompute() { /** * Set the imageBuildCompute property: The compute name for image build. - * + * * @param imageBuildCompute the imageBuildCompute value to set. * @return the WorkspaceInner object itself. */ @@ -438,97 +574,220 @@ public WorkspaceInner withImageBuildCompute(String imageBuildCompute) { } /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerProperties() == null ? null : this.innerProperties().allowPublicAccessWhenBehindVnet(); + public List ipAllowlist() { + return this.innerProperties() == null ? null : this.innerProperties().ipAllowlist(); } /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @param ipAllowlist the ipAllowlist value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { + public WorkspaceInner withIpAllowlist(List ipAllowlist) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); + this.innerProperties().withIpAllowlist(ipAllowlist); return this; } /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. + * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. + * + * @return the keyVault value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + public String keyVault() { + return this.innerProperties() == null ? null : this.innerProperties().keyVault(); } /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. + * + * @param keyVault the keyVault value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public WorkspaceInner withKeyVault(String keyVault) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.innerProperties().withKeyVault(keyVault); return this; } /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. + * Get the keyVaults property: The keyVaults property. + * + * @return the keyVaults value. */ - public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + public List keyVaults() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaults(); } /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. + * Set the keyVaults property: The keyVaults property. + * + * @param keyVaults the keyVaults value to set. + * @return the WorkspaceInner object itself. */ - public List sharedPrivateLinkResources() { - return this.innerProperties() == null ? null : this.innerProperties().sharedPrivateLinkResources(); + public WorkspaceInner withKeyVaults(List keyVaults) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withKeyVaults(keyVaults); + return this; } /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. + * 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 withSharedPrivateLinkResources(List sharedPrivateLinkResources) { + public WorkspaceInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withSharedPrivateLinkResources(sharedPrivateLinkResources); + this.innerProperties().withManagedNetwork(managedNetwork); return this; } + /** + * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. + * + * @return the mlFlowTrackingUri value. + */ + public String mlFlowTrackingUri() { + return this.innerProperties() == null ? null : this.innerProperties().mlFlowTrackingUri(); + } + /** * Get the notebookInfo property: The notebook info of Azure ML workspace. - * + * * @return the notebookInfo value. */ public NotebookResourceInfoInner notebookInfo() { return this.innerProperties() == null ? null : this.innerProperties().notebookInfo(); } + /** + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @return the primaryUserAssignedIdentity value. + */ + public String primaryUserAssignedIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); + } + + /** + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + return this; + } + + /** + * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + + /** + * Get the privateLinkCount property: Count of private connections in the workspace. + * + * @return the privateLinkCount value. + */ + public Integer privateLinkCount() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkCount(); + } + + /** + * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccessType publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute in a 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 serviceManagedResourcesSettings property: The service managed resource settings. - * + * * @return the serviceManagedResourcesSettings value. */ public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { @@ -537,12 +796,12 @@ public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { /** * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * + * * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withServiceManagedResourcesSettings( - ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + public WorkspaceInner + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } @@ -551,43 +810,113 @@ public WorkspaceInner withServiceManagedResourcesSettings( } /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. + * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP + * in customer subscription if the workspace is CMK workspace. + * + * @return the serviceProvisionedResourceGroup value. */ - public String primaryUserAssignedIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); + public String serviceProvisionedResourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().serviceProvisionedResourceGroup(); } /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * + * @return the sharedPrivateLinkResources value. + */ + public List sharedPrivateLinkResources() { + return this.innerProperties() == null ? null : this.innerProperties().sharedPrivateLinkResources(); + } + + /** + * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * + * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + public WorkspaceInner withSharedPrivateLinkResources(List sharedPrivateLinkResources) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + this.innerProperties().withSharedPrivateLinkResources(sharedPrivateLinkResources); return this; } /** - * Get the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + public Integer softDeleteRetentionInDays() { + return this.innerProperties() == null ? null : this.innerProperties().softDeleteRetentionInDays(); + } + + /** + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); + return this; + } + + /** + * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @return the storageAccount value. + */ + public String storageAccount() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccount(); + } + + /** + * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @param storageAccount the storageAccount value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withStorageAccount(String storageAccount) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withStorageAccount(storageAccount); + return this; + } + + /** + * Get the storageAccounts property: The storageAccounts property. + * + * @return the storageAccounts value. + */ + public List storageAccounts() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccounts(); + } + + /** + * Set the storageAccounts property: The storageAccounts property. + * + * @param storageAccounts the storageAccounts value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withStorageAccounts(List storageAccounts) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withStorageAccounts(storageAccounts); + return this; } /** * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) * enabled. - * + * * @return the storageHnsEnabled value. */ public Boolean storageHnsEnabled() { @@ -595,19 +924,43 @@ public Boolean storageHnsEnabled() { } /** - * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. - * - * @return the mlFlowTrackingUri value. + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. */ - public String mlFlowTrackingUri() { - return this.innerProperties() == null ? null : this.innerProperties().mlFlowTrackingUri(); + public String systemDatastoresAuthMode() { + return this.innerProperties() == null ? null : this.innerProperties().systemDatastoresAuthMode(); + } + + /** + * Set the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @param systemDatastoresAuthMode the systemDatastoresAuthMode value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withSystemDatastoresAuthMode(String systemDatastoresAuthMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withSystemDatastoresAuthMode(systemDatastoresAuthMode); + return this; + } + + /** + * Get the tenantId property: The tenant id associated with this workspace. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); } /** * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 * API. - * + * * @return the v1LegacyMode value. */ public Boolean v1LegacyMode() { @@ -617,7 +970,7 @@ public Boolean v1LegacyMode() { /** * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 * API. - * + * * @param v1LegacyMode the v1LegacyMode value to set. * @return the WorkspaceInner object itself. */ @@ -629,20 +982,57 @@ public WorkspaceInner withV1LegacyMode(Boolean v1LegacyMode) { return this; } + /** + * Get the workspaceHubConfig property: WorkspaceHub's configuration object. + * + * @return the workspaceHubConfig value. + */ + public WorkspaceHubConfig workspaceHubConfig() { + return this.innerProperties() == null ? null : this.innerProperties().workspaceHubConfig(); + } + + /** + * Set the workspaceHubConfig property: WorkspaceHub's configuration object. + * + * @param workspaceHubConfig the workspaceHubConfig value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withWorkspaceHubConfig(workspaceHubConfig); + return this; + } + + /** + * Get the workspaceId property: The immutable id associated with this workspace. + * + * @return the workspaceId value. + */ + public String workspaceId() { + return this.innerProperties() == null ? null : this.innerProperties().workspaceId(); + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } + if (innerProperties() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model WorkspaceInner")); + } else { + innerProperties().validate(); + } if (sku() != null) { sku().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(WorkspaceInner.class); } 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..204a3fc8a3b57 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 @@ -6,46 +6,44 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; +import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; import com.azure.resourcemanager.machinelearning.models.ProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType; +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.WorkspaceHubConfig; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The properties of a machine learning workspace. */ +/** + * The properties of a machine learning workspace. + */ @Fluent public final class WorkspacePropertiesInner { /* - * The immutable id associated with this workspace. - */ - @JsonProperty(value = "workspaceId", access = JsonProperty.Access.WRITE_ONLY) - private String workspaceId; - - /* - * The description of this workspace. + * The flag to indicate whether to allow public access when behind VNet. */ - @JsonProperty(value = "description") - private String description; + @JsonProperty(value = "allowPublicAccessWhenBehindVnet") + private Boolean allowPublicAccessWhenBehindVnet; /* - * The friendly name for this workspace. This name in mutable + * ARM id of the application insights associated with this workspace. */ - @JsonProperty(value = "friendlyName") - private String friendlyName; + @JsonProperty(value = "applicationInsights") + private String applicationInsights; /* - * ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been - * created + * The associatedWorkspaces property. */ - @JsonProperty(value = "keyVault") - private String keyVault; + @JsonProperty(value = "associatedWorkspaces") + private List associatedWorkspaces; /* - * ARM id of the application insights associated with this workspace. + * The containerRegistries property. */ - @JsonProperty(value = "applicationInsights") - private String applicationInsights; + @JsonProperty(value = "containerRegistries") + private List containerRegistries; /* * ARM id of the container registry associated with this workspace. @@ -54,11 +52,10 @@ public final class WorkspacePropertiesInner { private String containerRegistry; /* - * ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been - * created + * The description of this workspace. */ - @JsonProperty(value = "storageAccount") - private String storageAccount; + @JsonProperty(value = "description") + private String description; /* * Url for the discovery service to identify regional endpoints for machine learning experimentation services @@ -67,36 +64,52 @@ public final class WorkspacePropertiesInner { private String discoveryUrl; /* - * The current deployment state of workspace resource. The provisioningState is to indicate states for resource - * provisioning. + * The enableDataIsolation property. */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; + @JsonProperty(value = "enableDataIsolation") + private Boolean enableDataIsolation; /* - * The encryption settings of Azure ML workspace. + * Flag to tell if SoftwareBillOfMaterial should be enabled for this workspace + */ + @JsonProperty(value = "enableSoftwareBillOfMaterials") + private Boolean enableSoftwareBillOfMaterials; + + /* + * The encryption property. */ @JsonProperty(value = "encryption") private EncryptionProperty encryption; /* - * The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service + * The existingWorkspaces property. */ - @JsonProperty(value = "hbiWorkspace") - private Boolean hbiWorkspace; + @JsonProperty(value = "existingWorkspaces") + private List existingWorkspaces; /* - * The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK - * workspace + * Settings for feature store type workspace. */ - @JsonProperty(value = "serviceProvisionedResourceGroup", access = JsonProperty.Access.WRITE_ONLY) - private String serviceProvisionedResourceGroup; + @JsonProperty(value = "featureStoreSettings") + private FeatureStoreSettings featureStoreSettings; /* - * Count of private connections in the workspace + * The friendly name for this workspace. This name in mutable */ - @JsonProperty(value = "privateLinkCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer privateLinkCount; + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /* + * The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service + */ + @JsonProperty(value = "hbiWorkspace") + private Boolean hbiWorkspace; + + /* + * The hubResourceId property. + */ + @JsonProperty(value = "hubResourceId") + private String hubResourceId; /* * The compute name for image build @@ -105,28 +118,35 @@ public final class WorkspacePropertiesInner { private String imageBuildCompute; /* - * The flag to indicate whether to allow public access when behind VNet. + * The list of IPv4 addresses that are allowed to access the workspace. */ - @JsonProperty(value = "allowPublicAccessWhenBehindVnet") - private Boolean allowPublicAccessWhenBehindVnet; + @JsonProperty(value = "ipAllowlist") + private List ipAllowlist; /* - * Whether requests from Public Network are allowed. + * ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been + * created */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; + @JsonProperty(value = "keyVault") + private String keyVault; /* - * The list of private endpoint connections in the workspace. + * The keyVaults property. */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; + @JsonProperty(value = "keyVaults") + private List keyVaults; /* - * The list of shared private link resources in this workspace. + * Managed Network settings for a machine learning workspace. */ - @JsonProperty(value = "sharedPrivateLinkResources") - private List sharedPrivateLinkResources; + @JsonProperty(value = "managedNetwork") + private ManagedNetworkSettingsInner managedNetwork; + + /* + * The URI associated with this workspace that machine learning flow must point at to set up tracking. + */ + @JsonProperty(value = "mlFlowTrackingUri", access = JsonProperty.Access.WRITE_ONLY) + private String mlFlowTrackingUri; /* * The notebook info of Azure ML workspace. @@ -134,6 +154,43 @@ public final class WorkspacePropertiesInner { @JsonProperty(value = "notebookInfo", access = JsonProperty.Access.WRITE_ONLY) private NotebookResourceInfoInner notebookInfo; + /* + * The user assigned identity resource id that represents the workspace identity. + */ + @JsonProperty(value = "primaryUserAssignedIdentity") + private String primaryUserAssignedIdentity; + + /* + * The list of private endpoint connections in the workspace. + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /* + * Count of private connections in the workspace + */ + @JsonProperty(value = "privateLinkCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer privateLinkCount; + + /* + * The current deployment state of workspace resource. The provisioningState is to indicate states for resource + * provisioning. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Whether requests from Public Network are allowed. + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccessType publicNetworkAccess; + + /* + * Settings for serverless compute in a workspace + */ + @JsonProperty(value = "serverlessComputeSettings") + private ServerlessComputeSettings serverlessComputeSettings; + /* * The service managed resource settings. */ @@ -141,16 +198,36 @@ public final class WorkspacePropertiesInner { private ServiceManagedResourcesSettings serviceManagedResourcesSettings; /* - * The user assigned identity resource id that represents the workspace identity. + * The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK + * workspace */ - @JsonProperty(value = "primaryUserAssignedIdentity") - private String primaryUserAssignedIdentity; + @JsonProperty(value = "serviceProvisionedResourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String serviceProvisionedResourceGroup; /* - * The tenant id associated with this workspace. + * The list of shared private link resources in this workspace. */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; + @JsonProperty(value = "sharedPrivateLinkResources") + private List sharedPrivateLinkResources; + + /* + * Retention time in days after workspace get soft deleted. + */ + @JsonProperty(value = "softDeleteRetentionInDays") + private Integer softDeleteRetentionInDays; + + /* + * ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been + * created + */ + @JsonProperty(value = "storageAccount") + private String storageAccount; + + /* + * The storageAccounts property. + */ + @JsonProperty(value = "storageAccounts") + private List storageAccounts; /* * If the storage associated with the workspace has hierarchical namespace(HNS) enabled. @@ -159,10 +236,16 @@ public final class WorkspacePropertiesInner { private Boolean storageHnsEnabled; /* - * The URI associated with this workspace that machine learning flow must point at to set up tracking. + * The auth mode used for accessing the system datastores of the workspace. */ - @JsonProperty(value = "mlFlowTrackingUri", access = JsonProperty.Access.WRITE_ONLY) - private String mlFlowTrackingUri; + @JsonProperty(value = "systemDatastoresAuthMode") + private String systemDatastoresAuthMode; + + /* + * The tenant id associated with this workspace. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; /* * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. @@ -170,104 +253,109 @@ public final class WorkspacePropertiesInner { @JsonProperty(value = "v1LegacyMode") private Boolean v1LegacyMode; - /** Creates an instance of WorkspacePropertiesInner class. */ - public WorkspacePropertiesInner() { - } + /* + * WorkspaceHub's configuration object. + */ + @JsonProperty(value = "workspaceHubConfig") + private WorkspaceHubConfig workspaceHubConfig; + + /* + * The immutable id associated with this workspace. + */ + @JsonProperty(value = "workspaceId", access = JsonProperty.Access.WRITE_ONLY) + private String workspaceId; /** - * Get the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. + * Creates an instance of WorkspacePropertiesInner class. */ - public String workspaceId() { - return this.workspaceId; + public WorkspacePropertiesInner() { } /** - * Get the description property: The description of this workspace. - * - * @return the description value. + * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. + * + * @return the allowPublicAccessWhenBehindVnet value. */ - public String description() { - return this.description; + public Boolean allowPublicAccessWhenBehindVnet() { + return this.allowPublicAccessWhenBehindVnet; } /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. + * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. + * + * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withDescription(String description) { - this.description = description; + public WorkspacePropertiesInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { + this.allowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; return this; } /** - * Get the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. */ - public String friendlyName() { - return this.friendlyName; + public String applicationInsights() { + return this.applicationInsights; } /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @param friendlyName the friendlyName value to set. + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @param applicationInsights the applicationInsights value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; + public WorkspacePropertiesInner withApplicationInsights(String applicationInsights) { + this.applicationInsights = applicationInsights; return this; } /** - * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. + * Get the associatedWorkspaces property: The associatedWorkspaces property. + * + * @return the associatedWorkspaces value. */ - public String keyVault() { - return this.keyVault; + public List associatedWorkspaces() { + return this.associatedWorkspaces; } /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @param keyVault the keyVault value to set. + * Set the associatedWorkspaces property: The associatedWorkspaces property. + * + * @param associatedWorkspaces the associatedWorkspaces value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withKeyVault(String keyVault) { - this.keyVault = keyVault; + public WorkspacePropertiesInner withAssociatedWorkspaces(List associatedWorkspaces) { + this.associatedWorkspaces = associatedWorkspaces; return this; } /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. + * Get the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. */ - public String applicationInsights() { - return this.applicationInsights; + public List containerRegistries() { + return this.containerRegistries; } /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @param applicationInsights the applicationInsights value to set. + * Set the containerRegistries property: The containerRegistries property. + * + * @param containerRegistries the containerRegistries value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; + public WorkspacePropertiesInner withContainerRegistries(List containerRegistries) { + this.containerRegistries = containerRegistries; return this; } /** * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * + * * @return the containerRegistry value. */ public String containerRegistry() { @@ -276,7 +364,7 @@ public String containerRegistry() { /** * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * + * * @param containerRegistry the containerRegistry value to set. * @return the WorkspacePropertiesInner object itself. */ @@ -286,31 +374,29 @@ public WorkspacePropertiesInner withContainerRegistry(String containerRegistry) } /** - * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. + * Get the description property: The description of this workspace. + * + * @return the description value. */ - public String storageAccount() { - return this.storageAccount; + public String description() { + return this.description; } /** - * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @param storageAccount the storageAccount value to set. + * Set the description property: The description of this workspace. + * + * @param description the description value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withStorageAccount(String storageAccount) { - this.storageAccount = storageAccount; + public WorkspacePropertiesInner withDescription(String description) { + this.description = description; return this; } /** * Get the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning * experimentation services. - * + * * @return the discoveryUrl value. */ public String discoveryUrl() { @@ -320,7 +406,7 @@ public String discoveryUrl() { /** * Set the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning * experimentation services. - * + * * @param discoveryUrl the discoveryUrl value to set. * @return the WorkspacePropertiesInner object itself. */ @@ -330,18 +416,50 @@ public WorkspacePropertiesInner withDiscoveryUrl(String discoveryUrl) { } /** - * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. + * Get the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public Boolean enableDataIsolation() { + return this.enableDataIsolation; + } + + /** + * Set the enableDataIsolation property: The enableDataIsolation property. + * + * @param enableDataIsolation the enableDataIsolation value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withEnableDataIsolation(Boolean enableDataIsolation) { + this.enableDataIsolation = enableDataIsolation; + return this; + } + + /** + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + public Boolean enableSoftwareBillOfMaterials() { + return this.enableSoftwareBillOfMaterials; + } + + /** + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + this.enableSoftwareBillOfMaterials = enableSoftwareBillOfMaterials; + return this; } /** - * Get the encryption property: The encryption settings of Azure ML workspace. - * + * Get the encryption property: The encryption property. + * * @return the encryption value. */ public EncryptionProperty encryption() { @@ -349,8 +467,8 @@ public EncryptionProperty encryption() { } /** - * Set the encryption property: The encryption settings of Azure ML workspace. - * + * Set the encryption property: The encryption property. + * * @param encryption the encryption value to set. * @return the WorkspacePropertiesInner object itself. */ @@ -360,19 +478,79 @@ public WorkspacePropertiesInner withEncryption(EncryptionProperty encryption) { } /** - * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @return the hbiWorkspace value. + * Get the existingWorkspaces property: The existingWorkspaces property. + * + * @return the existingWorkspaces value. */ - public Boolean hbiWorkspace() { + public List existingWorkspaces() { + return this.existingWorkspaces; + } + + /** + * Set the existingWorkspaces property: The existingWorkspaces property. + * + * @param existingWorkspaces the existingWorkspaces value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withExistingWorkspaces(List existingWorkspaces) { + this.existingWorkspaces = existingWorkspaces; + return this; + } + + /** + * Get the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + public FeatureStoreSettings featureStoreSettings() { + return this.featureStoreSettings; + } + + /** + * Set the featureStoreSettings property: Settings for feature store type workspace. + * + * @param featureStoreSettings the featureStoreSettings value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + this.featureStoreSettings = featureStoreSettings; + return this; + } + + /** + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @param friendlyName the friendlyName value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. + * + * @return the hbiWorkspace value. + */ + public Boolean hbiWorkspace() { return this.hbiWorkspace; } /** * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected * by the service. - * + * * @param hbiWorkspace the hbiWorkspace value to set. * @return the WorkspacePropertiesInner object itself. */ @@ -382,27 +560,28 @@ public WorkspacePropertiesInner withHbiWorkspace(Boolean hbiWorkspace) { } /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. + * Get the hubResourceId property: The hubResourceId property. + * + * @return the hubResourceId value. */ - public String serviceProvisionedResourceGroup() { - return this.serviceProvisionedResourceGroup; + public String hubResourceId() { + return this.hubResourceId; } /** - * Get the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. + * Set the hubResourceId property: The hubResourceId property. + * + * @param hubResourceId the hubResourceId value to set. + * @return the WorkspacePropertiesInner object itself. */ - public Integer privateLinkCount() { - return this.privateLinkCount; + public WorkspacePropertiesInner withHubResourceId(String hubResourceId) { + this.hubResourceId = hubResourceId; + return this; } /** * Get the imageBuildCompute property: The compute name for image build. - * + * * @return the imageBuildCompute value. */ public String imageBuildCompute() { @@ -411,7 +590,7 @@ public String imageBuildCompute() { /** * Set the imageBuildCompute property: The compute name for image build. - * + * * @param imageBuildCompute the imageBuildCompute value to set. * @return the WorkspacePropertiesInner object itself. */ @@ -421,89 +600,199 @@ public WorkspacePropertiesInner withImageBuildCompute(String imageBuildCompute) } /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.allowPublicAccessWhenBehindVnet; + public List ipAllowlist() { + return this.ipAllowlist; } /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @param ipAllowlist the ipAllowlist value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.allowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; + public WorkspacePropertiesInner withIpAllowlist(List ipAllowlist) { + this.ipAllowlist = ipAllowlist; return this; } /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. + * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. + * + * @return the keyVault value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + public String keyVault() { + return this.keyVault; } /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. + * + * @param keyVault the keyVault value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + public WorkspacePropertiesInner withKeyVault(String keyVault) { + this.keyVault = keyVault; return this; } /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. + * Get the keyVaults property: The keyVaults property. + * + * @return the keyVaults value. */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; + public List keyVaults() { + return this.keyVaults; } /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. + * Set the keyVaults property: The keyVaults property. + * + * @param keyVaults the keyVaults value to set. + * @return the WorkspacePropertiesInner object itself. */ - public List sharedPrivateLinkResources() { - return this.sharedPrivateLinkResources; + public WorkspacePropertiesInner withKeyVaults(List keyVaults) { + this.keyVaults = keyVaults; + return this; } /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. + * 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 withSharedPrivateLinkResources( - List sharedPrivateLinkResources) { - this.sharedPrivateLinkResources = sharedPrivateLinkResources; + public WorkspacePropertiesInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + this.managedNetwork = managedNetwork; return this; } + /** + * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. + * + * @return the mlFlowTrackingUri value. + */ + public String mlFlowTrackingUri() { + return this.mlFlowTrackingUri; + } + /** * Get the notebookInfo property: The notebook info of Azure ML workspace. - * + * * @return the notebookInfo value. */ public NotebookResourceInfoInner notebookInfo() { return this.notebookInfo; } + /** + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @return the primaryUserAssignedIdentity value. + */ + public String primaryUserAssignedIdentity() { + return this.primaryUserAssignedIdentity; + } + + /** + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; + return this; + } + + /** + * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get the privateLinkCount property: Count of private connections in the workspace. + * + * @return the privateLinkCount value. + */ + public Integer privateLinkCount() { + return this.privateLinkCount; + } + + /** + * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccessType publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.serverlessComputeSettings; + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute in a 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 serviceManagedResourcesSettings property: The service managed resource settings. - * + * * @return the serviceManagedResourcesSettings value. */ public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { @@ -512,51 +801,113 @@ public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { /** * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * + * * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withServiceManagedResourcesSettings( - ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + public WorkspacePropertiesInner + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; return this; } /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. + * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP + * in customer subscription if the workspace is CMK workspace. + * + * @return the serviceProvisionedResourceGroup value. */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; + public String serviceProvisionedResourceGroup() { + return this.serviceProvisionedResourceGroup; } /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * + * @return the sharedPrivateLinkResources value. + */ + public List sharedPrivateLinkResources() { + return this.sharedPrivateLinkResources; + } + + /** + * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * + * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; + public WorkspacePropertiesInner + withSharedPrivateLinkResources(List sharedPrivateLinkResources) { + this.sharedPrivateLinkResources = sharedPrivateLinkResources; return this; } /** - * Get the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. */ - public String tenantId() { - return this.tenantId; + public Integer softDeleteRetentionInDays() { + return this.softDeleteRetentionInDays; + } + + /** + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + this.softDeleteRetentionInDays = softDeleteRetentionInDays; + return this; + } + + /** + * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @return the storageAccount value. + */ + public String storageAccount() { + return this.storageAccount; + } + + /** + * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @param storageAccount the storageAccount value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withStorageAccount(String storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * Get the storageAccounts property: The storageAccounts property. + * + * @return the storageAccounts value. + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Set the storageAccounts property: The storageAccounts property. + * + * @param storageAccounts the storageAccounts value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withStorageAccounts(List storageAccounts) { + this.storageAccounts = storageAccounts; + return this; } /** * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) * enabled. - * + * * @return the storageHnsEnabled value. */ public Boolean storageHnsEnabled() { @@ -564,19 +915,40 @@ public Boolean storageHnsEnabled() { } /** - * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. - * - * @return the mlFlowTrackingUri value. + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. */ - public String mlFlowTrackingUri() { - return this.mlFlowTrackingUri; + public String systemDatastoresAuthMode() { + return this.systemDatastoresAuthMode; + } + + /** + * Set the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @param systemDatastoresAuthMode the systemDatastoresAuthMode value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withSystemDatastoresAuthMode(String systemDatastoresAuthMode) { + this.systemDatastoresAuthMode = systemDatastoresAuthMode; + return this; + } + + /** + * Get the tenantId property: The tenant id associated with this workspace. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; } /** * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 * API. - * + * * @return the v1LegacyMode value. */ public Boolean v1LegacyMode() { @@ -586,7 +958,7 @@ public Boolean v1LegacyMode() { /** * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 * API. - * + * * @param v1LegacyMode the v1LegacyMode value to set. * @return the WorkspacePropertiesInner object itself. */ @@ -595,26 +967,67 @@ public WorkspacePropertiesInner withV1LegacyMode(Boolean v1LegacyMode) { return this; } + /** + * Get the workspaceHubConfig property: WorkspaceHub's configuration object. + * + * @return the workspaceHubConfig value. + */ + public WorkspaceHubConfig workspaceHubConfig() { + return this.workspaceHubConfig; + } + + /** + * Set the workspaceHubConfig property: WorkspaceHub's configuration object. + * + * @param workspaceHubConfig the workspaceHubConfig value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig) { + this.workspaceHubConfig = workspaceHubConfig; + return this; + } + + /** + * Get the workspaceId property: The immutable id associated with this workspace. + * + * @return the workspaceId value. + */ + public String workspaceId() { + return this.workspaceId; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (encryption() != null) { encryption().validate(); } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); + if (featureStoreSettings() != null) { + featureStoreSettings().validate(); } - if (sharedPrivateLinkResources() != null) { - sharedPrivateLinkResources().forEach(e -> e.validate()); + if (managedNetwork() != null) { + managedNetwork().validate(); } if (notebookInfo() != null) { notebookInfo().validate(); } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + if (serverlessComputeSettings() != null) { + serverlessComputeSettings().validate(); + } if (serviceManagedResourcesSettings() != null) { serviceManagedResourcesSettings().validate(); } + if (sharedPrivateLinkResources() != null) { + sharedPrivateLinkResources().forEach(e -> e.validate()); + } + if (workspaceHubConfig() != null) { + workspaceHubConfig().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 deleted file mode 100644 index ecf35a74ba330..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (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.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The parameters for updating the properties of a machine learning workspace. */ -@Fluent -public final class WorkspacePropertiesUpdateParameters { - /* - * The description of this workspace. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The friendly name for this workspace. - */ - @JsonProperty(value = "friendlyName") - private String friendlyName; - - /* - * The compute name for image build - */ - @JsonProperty(value = "imageBuildCompute") - private String imageBuildCompute; - - /* - * The service managed resource settings. - */ - @JsonProperty(value = "serviceManagedResourcesSettings") - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; - - /* - * The user assigned identity resource id that represents the workspace identity. - */ - @JsonProperty(value = "primaryUserAssignedIdentity") - private String primaryUserAssignedIdentity; - - /* - * Whether requests from Public Network are allowed. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; - - /* - * ARM id of the application insights associated with this workspace. - */ - @JsonProperty(value = "applicationInsights") - private String applicationInsights; - - /* - * ARM id of the container registry associated with this workspace. - */ - @JsonProperty(value = "containerRegistry") - private String containerRegistry; - - /** Creates an instance of WorkspacePropertiesUpdateParameters class. */ - public WorkspacePropertiesUpdateParameters() { - } - - /** - * Get the description property: The description of this workspace. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the friendlyName property: The friendly name for this workspace. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: The friendly name for this workspace. - * - * @param friendlyName the friendlyName value to set. - * @return the WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - public String imageBuildCompute() { - return this.imageBuildCompute; - } - - /** - * Set the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withImageBuildCompute(String imageBuildCompute) { - this.imageBuildCompute = imageBuildCompute; - return this; - } - - /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; - } - - /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withServiceManagedResourcesSettings( - ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; - return this; - } - - /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; - } - - /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; - return this; - } - - /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - public String applicationInsights() { - return this.applicationInsights; - } - - /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @param applicationInsights the applicationInsights value to set. - * @return the WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; - return this; - } - - /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - public String containerRegistry() { - return this.containerRegistry; - } - - /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @param containerRegistry the containerRegistry value to set. - * @return the WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withContainerRegistry(String containerRegistry) { - this.containerRegistry = containerRegistry; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java new file mode 100644 index 0000000000000..a44e8963aca29 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java @@ -0,0 +1,503 @@ +// Copyright (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.EncryptionUpdateProperties; +import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; +import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; +import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The parameters for updating a machine learning workspace. + */ +@Fluent +public final class WorkspacePropertiesUpdateParametersInner { + /* + * ARM id of the application insights associated with this workspace. + */ + @JsonProperty(value = "applicationInsights") + private String applicationInsights; + + /* + * ARM id of the container registry associated with this workspace. + */ + @JsonProperty(value = "containerRegistry") + private String containerRegistry; + + /* + * The description of this workspace. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The enableDataIsolation property. + */ + @JsonProperty(value = "enableDataIsolation") + private Boolean enableDataIsolation; + + /* + * Flag to tell if SoftwareBillOfMaterial should be enabled for this workspace + */ + @JsonProperty(value = "enableSoftwareBillOfMaterials") + private Boolean enableSoftwareBillOfMaterials; + + /* + * The encryption property. + */ + @JsonProperty(value = "encryption") + private EncryptionUpdateProperties encryption; + + /* + * Settings for feature store type workspace. + */ + @JsonProperty(value = "featureStoreSettings") + private FeatureStoreSettings featureStoreSettings; + + /* + * The friendly name for this workspace. This name in mutable + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /* + * The compute name for image build + */ + @JsonProperty(value = "imageBuildCompute") + private String imageBuildCompute; + + /* + * The list of IPv4 addresses that are allowed to access the workspace. + */ + @JsonProperty(value = "ipAllowlist") + private List ipAllowlist; + + /* + * Managed Network settings for a machine learning workspace. + */ + @JsonProperty(value = "managedNetwork") + private ManagedNetworkSettingsInner managedNetwork; + + /* + * The user assigned identity resource id that represents the workspace identity. + */ + @JsonProperty(value = "primaryUserAssignedIdentity") + private String primaryUserAssignedIdentity; + + /* + * Whether requests from Public Network are allowed. + */ + @JsonProperty(value = "publicNetworkAccess") + private PublicNetworkAccessType publicNetworkAccess; + + /* + * Settings for serverless compute in a workspace + */ + @JsonProperty(value = "serverlessComputeSettings") + private ServerlessComputeSettings serverlessComputeSettings; + + /* + * The service managed resource settings. + */ + @JsonProperty(value = "serviceManagedResourcesSettings") + private ServiceManagedResourcesSettings serviceManagedResourcesSettings; + + /* + * Retention time in days after workspace get soft deleted. + */ + @JsonProperty(value = "softDeleteRetentionInDays") + private Integer softDeleteRetentionInDays; + + /* + * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + */ + @JsonProperty(value = "v1LegacyMode") + private Boolean v1LegacyMode; + + /** + * Creates an instance of WorkspacePropertiesUpdateParametersInner class. + */ + public WorkspacePropertiesUpdateParametersInner() { + } + + /** + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. + */ + public String applicationInsights() { + return this.applicationInsights; + } + + /** + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @param applicationInsights the applicationInsights value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withApplicationInsights(String applicationInsights) { + this.applicationInsights = applicationInsights; + return this; + } + + /** + * Get the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @return the containerRegistry value. + */ + public String containerRegistry() { + return this.containerRegistry; + } + + /** + * Set the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @param containerRegistry the containerRegistry value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withContainerRegistry(String containerRegistry) { + this.containerRegistry = containerRegistry; + return this; + } + + /** + * Get the description property: The description of this workspace. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description of this workspace. + * + * @param description the description value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. + */ + public Boolean enableDataIsolation() { + return this.enableDataIsolation; + } + + /** + * Set the enableDataIsolation property: The enableDataIsolation property. + * + * @param enableDataIsolation the enableDataIsolation value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withEnableDataIsolation(Boolean enableDataIsolation) { + this.enableDataIsolation = enableDataIsolation; + return this; + } + + /** + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + public Boolean enableSoftwareBillOfMaterials() { + return this.enableSoftwareBillOfMaterials; + } + + /** + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner + withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + this.enableSoftwareBillOfMaterials = enableSoftwareBillOfMaterials; + return this; + } + + /** + * Get the encryption property: The encryption property. + * + * @return the encryption value. + */ + public EncryptionUpdateProperties encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The encryption property. + * + * @param encryption the encryption value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withEncryption(EncryptionUpdateProperties encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + public FeatureStoreSettings featureStoreSettings() { + return this.featureStoreSettings; + } + + /** + * Set the featureStoreSettings property: Settings for feature store type workspace. + * + * @param featureStoreSettings the featureStoreSettings value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner + withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + this.featureStoreSettings = featureStoreSettings; + return this; + } + + /** + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @param friendlyName the friendlyName value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the imageBuildCompute property: The compute name for image build. + * + * @return the imageBuildCompute value. + */ + public String imageBuildCompute() { + return this.imageBuildCompute; + } + + /** + * Set the imageBuildCompute property: The compute name for image build. + * + * @param imageBuildCompute the imageBuildCompute value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withImageBuildCompute(String imageBuildCompute) { + this.imageBuildCompute = imageBuildCompute; + return this; + } + + /** + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. + */ + public List ipAllowlist() { + return this.ipAllowlist; + } + + /** + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @param ipAllowlist the ipAllowlist value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withIpAllowlist(List ipAllowlist) { + this.ipAllowlist = ipAllowlist; + 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 WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + this.managedNetwork = managedNetwork; + return this; + } + + /** + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @return the primaryUserAssignedIdentity value. + */ + public String primaryUserAssignedIdentity() { + return this.primaryUserAssignedIdentity; + } + + /** + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner + withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; + return this; + } + + /** + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccessType publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner + withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.serverlessComputeSettings; + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner + withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + this.serverlessComputeSettings = serverlessComputeSettings; + return this; + } + + /** + * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @return the serviceManagedResourcesSettings value. + */ + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.serviceManagedResourcesSettings; + } + + /** + * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; + return this; + } + + /** + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + public Integer softDeleteRetentionInDays() { + return this.softDeleteRetentionInDays; + } + + /** + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + this.softDeleteRetentionInDays = softDeleteRetentionInDays; + return this; + } + + /** + * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + public Boolean v1LegacyMode() { + return this.v1LegacyMode; + } + + /** + * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @param v1LegacyMode the v1LegacyMode value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withV1LegacyMode(Boolean v1LegacyMode) { + this.v1LegacyMode = v1LegacyMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + if (featureStoreSettings() != null) { + featureStoreSettings().validate(); + } + if (managedNetwork() != null) { + managedNetwork().validate(); + } + if (serverlessComputeSettings() != null) { + serverlessComputeSettings().validate(); + } + if (serviceManagedResourcesSettings() != null) { + serviceManagedResourcesSettings().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java new file mode 100644 index 0000000000000..fd9bf1d0dcf2a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java @@ -0,0 +1,542 @@ +// Copyright (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.EncryptionUpdateProperties; +import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; +import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * The parameters for updating a machine learning workspace. + */ +@Fluent +public final class WorkspaceUpdateParametersInner { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * The properties that the machine learning workspace will be updated with. + */ + @JsonProperty(value = "properties") + private WorkspacePropertiesUpdateParametersInner innerProperties; + + /* + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier + */ + @JsonProperty(value = "sku") + private Sku sku; + + /* + * The resource tags for the machine learning workspace. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Creates an instance of WorkspaceUpdateParametersInner class. + */ + public WorkspaceUpdateParametersInner() { + } + + /** + * 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 WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the innerProperties property: The properties that the machine learning workspace will be updated with. + * + * @return the innerProperties value. + */ + private WorkspacePropertiesUpdateParametersInner innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * + * @param sku the sku value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the tags property: The resource tags for the machine learning workspace. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The resource tags for the machine learning workspace. + * + * @param tags the tags value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. + */ + public String applicationInsights() { + return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); + } + + /** + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @param applicationInsights the applicationInsights value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withApplicationInsights(String applicationInsights) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withApplicationInsights(applicationInsights); + return this; + } + + /** + * Get the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @return the containerRegistry value. + */ + public String containerRegistry() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistry(); + } + + /** + * Set the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @param containerRegistry the containerRegistry value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withContainerRegistry(String containerRegistry) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withContainerRegistry(containerRegistry); + return this; + } + + /** + * Get the description property: The description of this workspace. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of this workspace. + * + * @param description the description value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. + */ + public Boolean enableDataIsolation() { + return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); + } + + /** + * Set the enableDataIsolation property: The enableDataIsolation property. + * + * @param enableDataIsolation the enableDataIsolation value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withEnableDataIsolation(Boolean enableDataIsolation) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withEnableDataIsolation(enableDataIsolation); + return this; + } + + /** + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + public Boolean enableSoftwareBillOfMaterials() { + return this.innerProperties() == null ? null : this.innerProperties().enableSoftwareBillOfMaterials(); + } + + /** + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); + return this; + } + + /** + * Get the encryption property: The encryption property. + * + * @return the encryption value. + */ + public EncryptionUpdateProperties encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); + } + + /** + * Set the encryption property: The encryption property. + * + * @param encryption the encryption value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withEncryption(EncryptionUpdateProperties encryption) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withEncryption(encryption); + return this; + } + + /** + * Get the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + public FeatureStoreSettings featureStoreSettings() { + return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); + } + + /** + * Set the featureStoreSettings property: Settings for feature store type workspace. + * + * @param featureStoreSettings the featureStoreSettings value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withFeatureStoreSettings(featureStoreSettings); + return this; + } + + /** + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + } + + /** + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @param friendlyName the friendlyName value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withFriendlyName(String friendlyName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withFriendlyName(friendlyName); + return this; + } + + /** + * Get the imageBuildCompute property: The compute name for image build. + * + * @return the imageBuildCompute value. + */ + public String imageBuildCompute() { + return this.innerProperties() == null ? null : this.innerProperties().imageBuildCompute(); + } + + /** + * Set the imageBuildCompute property: The compute name for image build. + * + * @param imageBuildCompute the imageBuildCompute value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withImageBuildCompute(String imageBuildCompute) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withImageBuildCompute(imageBuildCompute); + return this; + } + + /** + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. + */ + public List ipAllowlist() { + return this.innerProperties() == null ? null : this.innerProperties().ipAllowlist(); + } + + /** + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @param ipAllowlist the ipAllowlist value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withIpAllowlist(List ipAllowlist) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withIpAllowlist(ipAllowlist); + 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 WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withManagedNetwork(managedNetwork); + return this; + } + + /** + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @return the primaryUserAssignedIdentity value. + */ + public String primaryUserAssignedIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); + } + + /** + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + return this; + } + + /** + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccessType publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner + withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); + return this; + } + + /** + * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @return the serviceManagedResourcesSettings value. + */ + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); + } + + /** + * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + return this; + } + + /** + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + public Integer softDeleteRetentionInDays() { + return this.innerProperties() == null ? null : this.innerProperties().softDeleteRetentionInDays(); + } + + /** + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); + return this; + } + + /** + * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + public Boolean v1LegacyMode() { + return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); + } + + /** + * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @param v1LegacyMode the v1LegacyMode value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withV1LegacyMode(Boolean v1LegacyMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withV1LegacyMode(v1LegacyMode); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() != null) { + sku().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..9540e342a5907 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 - * Azure Machine Learning Workspace resources. + * 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..3a42b7602c976 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 - * Azure Machine Learning Workspace resources. + * 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/AccountApiKeysImpl.java similarity index 55% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlOperationImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java index 803be140a597c..4c120c42f153a 100644 --- 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/AccountApiKeysImpl.java @@ -4,35 +4,29 @@ 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; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.models.AccountApiKeys; -public final class AmlOperationImpl implements AmlOperation { - private AmlOperationInner innerObject; +public final class AccountApiKeysImpl implements AccountApiKeys { + private AccountApiKeysInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - AmlOperationImpl( - AmlOperationInner innerObject, + AccountApiKeysImpl(AccountApiKeysInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public String name() { - return this.innerModel().name(); + public String key1() { + return this.innerModel().key1(); } - public AmlOperationDisplay display() { - return this.innerModel().display(); + public String key2() { + return this.innerModel().key2(); } - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public AmlOperationInner innerModel() { + public AccountApiKeysInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountModelImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountModelImpl.java new file mode 100644 index 0000000000000..5a7e89724a207 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountModelImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountModelInner; +import com.azure.resourcemanager.machinelearning.models.AccountModel; +import com.azure.resourcemanager.machinelearning.models.CallRateLimit; +import com.azure.resourcemanager.machinelearning.models.DeploymentModel; +import com.azure.resourcemanager.machinelearning.models.ModelDeprecationInfo; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +import com.azure.resourcemanager.machinelearning.models.ModelSku; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class AccountModelImpl implements AccountModel { + private AccountModelInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + AccountModelImpl(AccountModelInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String format() { + return this.innerModel().format(); + } + + public String name() { + return this.innerModel().name(); + } + + public String version() { + return this.innerModel().version(); + } + + public String source() { + return this.innerModel().source(); + } + + public CallRateLimit callRateLimit() { + return this.innerModel().callRateLimit(); + } + + public DeploymentModel baseModel() { + return this.innerModel().baseModel(); + } + + public Boolean isDefaultVersion() { + return this.innerModel().isDefaultVersion(); + } + + public List skus() { + List inner = this.innerModel().skus(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Integer maxCapacity() { + return this.innerModel().maxCapacity(); + } + + public Map capabilities() { + Map inner = this.innerModel().capabilities(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map finetuneCapabilities() { + Map inner = this.innerModel().finetuneCapabilities(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ModelDeprecationInfo deprecation() { + return this.innerModel().deprecation(); + } + + public ModelLifecycleStatus lifecycleStatus() { + return this.innerModel().lifecycleStatus(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AccountModelInner 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/AmlUserFeatureImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java index 3430c2ef2701b..ac8f925a38ad4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java @@ -12,8 +12,7 @@ public final class AmlUserFeatureImpl implements AmlUserFeature { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - AmlUserFeatureImpl( - AmlUserFeatureInner innerObject, + AmlUserFeatureImpl(AmlUserFeatureInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = 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 54% 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..17daa0f0b55f3 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,11 @@ 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. */ @@ -24,11 +26,11 @@ 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; } @@ -40,11 +42,11 @@ 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; } @@ -56,11 +58,11 @@ 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; } @@ -72,11 +74,11 @@ 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; } @@ -88,11 +90,11 @@ 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; } @@ -104,41 +106,31 @@ 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. - * - * @return an instance of AzureMachineLearningWorkspacesImpl. + * Builds an instance of AzureMachineLearningServicesImpl with the provided parameters. + * + * @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 = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureMachineLearningWorkspacesImpl client = - new AzureMachineLearningWorkspacesImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + AzureMachineLearningServicesImpl client = new AzureMachineLearningServicesImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesImpl.java new file mode 100644 index 0000000000000..70f22381fb8bc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningServicesImpl.java @@ -0,0 +1,1151 @@ +// Copyright (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.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +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.AzureMachineLearningServices; +import com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient; +import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.CapacityReservationGroupsClient; +import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.ComputesClient; +import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; +import com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient; +import com.azure.resourcemanager.machinelearning.fluent.EndpointsClient; +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.InferenceEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient; +import com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient; +import com.azure.resourcemanager.machinelearning.fluent.JobsClient; +import com.azure.resourcemanager.machinelearning.fluent.LabelingJobsClient; +import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient; +import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient; +import com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient; +import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; +import com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; +import com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.OperationsClient; +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.ServerlessEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.UsagesClient; +import com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient; +import com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient; +import com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient; +import com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * 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; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** + * server parameter. + */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Api Version. + */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * The default poll interval for long-running operation. + */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** + * The UsagesClient object to access its operations. + */ + private final UsagesClient usages; + + /** + * Gets the UsagesClient object to access its operations. + * + * @return the UsagesClient object. + */ + public UsagesClient getUsages() { + return this.usages; + } + + /** + * The VirtualMachineSizesClient object to access its operations. + */ + private final VirtualMachineSizesClient virtualMachineSizes; + + /** + * Gets the VirtualMachineSizesClient object to access its operations. + * + * @return the VirtualMachineSizesClient object. + */ + public VirtualMachineSizesClient getVirtualMachineSizes() { + return this.virtualMachineSizes; + } + + /** + * The QuotasClient object to access its operations. + */ + private final QuotasClient quotas; + + /** + * Gets the QuotasClient object to access its operations. + * + * @return the QuotasClient object. + */ + public QuotasClient getQuotas() { + return this.quotas; + } + + /** + * The ComputesClient object to access its operations. + */ + private final ComputesClient computes; + + /** + * Gets the ComputesClient object to access its operations. + * + * @return the ComputesClient object. + */ + public ComputesClient getComputes() { + return this.computes; + } + + /** + * The CapacityReservationGroupsClient object to access its operations. + */ + private final CapacityReservationGroupsClient capacityReservationGroups; + + /** + * Gets the CapacityReservationGroupsClient object to access its operations. + * + * @return the CapacityReservationGroupsClient object. + */ + public CapacityReservationGroupsClient getCapacityReservationGroups() { + return this.capacityReservationGroups; + } + + /** + * 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 MarketplaceSubscriptionsClient object to access its operations. + */ + private final MarketplaceSubscriptionsClient marketplaceSubscriptions; + + /** + * Gets the MarketplaceSubscriptionsClient object to access its operations. + * + * @return the MarketplaceSubscriptionsClient object. + */ + public MarketplaceSubscriptionsClient getMarketplaceSubscriptions() { + return this.marketplaceSubscriptions; + } + + /** + * 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; + + /** + * Gets the BatchEndpointsClient object to access its operations. + * + * @return the BatchEndpointsClient object. + */ + public BatchEndpointsClient getBatchEndpoints() { + return this.batchEndpoints; + } + + /** + * The BatchDeploymentsClient object to access its operations. + */ + private final BatchDeploymentsClient batchDeployments; + + /** + * Gets the BatchDeploymentsClient object to access its operations. + * + * @return the BatchDeploymentsClient object. + */ + public BatchDeploymentsClient getBatchDeployments() { + return this.batchDeployments; + } + + /** + * The CodeContainersClient object to access its operations. + */ + private final CodeContainersClient codeContainers; + + /** + * Gets the CodeContainersClient object to access its operations. + * + * @return the CodeContainersClient object. + */ + public CodeContainersClient getCodeContainers() { + return this.codeContainers; + } + + /** + * The CodeVersionsClient object to access its operations. + */ + private final CodeVersionsClient codeVersions; + + /** + * Gets the CodeVersionsClient object to access its operations. + * + * @return the CodeVersionsClient object. + */ + public CodeVersionsClient getCodeVersions() { + return this.codeVersions; + } + + /** + * The ComponentContainersClient object to access its operations. + */ + private final ComponentContainersClient componentContainers; + + /** + * Gets the ComponentContainersClient object to access its operations. + * + * @return the ComponentContainersClient object. + */ + public ComponentContainersClient getComponentContainers() { + return this.componentContainers; + } + + /** + * The ComponentVersionsClient object to access its operations. + */ + private final ComponentVersionsClient componentVersions; + + /** + * Gets the ComponentVersionsClient object to access its operations. + * + * @return the ComponentVersionsClient object. + */ + public ComponentVersionsClient getComponentVersions() { + return this.componentVersions; + } + + /** + * The DataContainersClient object to access its operations. + */ + private final DataContainersClient dataContainers; + + /** + * Gets the DataContainersClient object to access its operations. + * + * @return the DataContainersClient object. + */ + public DataContainersClient getDataContainers() { + return this.dataContainers; + } + + /** + * The DataVersionsClient object to access its operations. + */ + private final DataVersionsClient dataVersions; + + /** + * Gets the DataVersionsClient object to access its operations. + * + * @return the DataVersionsClient object. + */ + public DataVersionsClient getDataVersions() { + return this.dataVersions; + } + + /** + * The DatastoresClient object to access its operations. + */ + private final DatastoresClient datastores; + + /** + * Gets the DatastoresClient object to access its operations. + * + * @return the DatastoresClient object. + */ + public DatastoresClient getDatastores() { + return this.datastores; + } + + /** + * The EnvironmentContainersClient object to access its operations. + */ + private final EnvironmentContainersClient environmentContainers; + + /** + * Gets the EnvironmentContainersClient object to access its operations. + * + * @return the EnvironmentContainersClient object. + */ + public EnvironmentContainersClient getEnvironmentContainers() { + return this.environmentContainers; + } + + /** + * The EnvironmentVersionsClient object to access its operations. + */ + private final EnvironmentVersionsClient environmentVersions; + + /** + * Gets the EnvironmentVersionsClient object to access its operations. + * + * @return the EnvironmentVersionsClient object. + */ + 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 InferencePoolsClient object to access its operations. + */ + private final InferencePoolsClient inferencePools; + + /** + * Gets the InferencePoolsClient object to access its operations. + * + * @return the InferencePoolsClient object. + */ + public InferencePoolsClient getInferencePools() { + return this.inferencePools; + } + + /** + * The InferenceEndpointsClient object to access its operations. + */ + private final InferenceEndpointsClient inferenceEndpoints; + + /** + * Gets the InferenceEndpointsClient object to access its operations. + * + * @return the InferenceEndpointsClient object. + */ + public InferenceEndpointsClient getInferenceEndpoints() { + return this.inferenceEndpoints; + } + + /** + * The InferenceGroupsClient object to access its operations. + */ + private final InferenceGroupsClient inferenceGroups; + + /** + * Gets the InferenceGroupsClient object to access its operations. + * + * @return the InferenceGroupsClient object. + */ + public InferenceGroupsClient getInferenceGroups() { + return this.inferenceGroups; + } + + /** + * The JobsClient object to access its operations. + */ + private final JobsClient jobs; + + /** + * Gets the JobsClient object to access its operations. + * + * @return the JobsClient object. + */ + public JobsClient getJobs() { + return this.jobs; + } + + /** + * The LabelingJobsClient object to access its operations. + */ + private final LabelingJobsClient labelingJobs; + + /** + * Gets the LabelingJobsClient object to access its operations. + * + * @return the LabelingJobsClient object. + */ + public LabelingJobsClient getLabelingJobs() { + return this.labelingJobs; + } + + /** + * The ModelContainersClient object to access its operations. + */ + private final ModelContainersClient modelContainers; + + /** + * Gets the ModelContainersClient object to access its operations. + * + * @return the ModelContainersClient object. + */ + public ModelContainersClient getModelContainers() { + return this.modelContainers; + } + + /** + * The ModelVersionsClient object to access its operations. + */ + private final ModelVersionsClient modelVersions; + + /** + * Gets the ModelVersionsClient object to access its operations. + * + * @return the ModelVersionsClient object. + */ + public ModelVersionsClient getModelVersions() { + return this.modelVersions; + } + + /** + * The OnlineEndpointsClient object to access its operations. + */ + private final OnlineEndpointsClient onlineEndpoints; + + /** + * Gets the OnlineEndpointsClient object to access its operations. + * + * @return the OnlineEndpointsClient object. + */ + public OnlineEndpointsClient getOnlineEndpoints() { + return this.onlineEndpoints; + } + + /** + * The OnlineDeploymentsClient object to access its operations. + */ + private final OnlineDeploymentsClient onlineDeployments; + + /** + * Gets the OnlineDeploymentsClient object to access its operations. + * + * @return the OnlineDeploymentsClient object. + */ + public OnlineDeploymentsClient getOnlineDeployments() { + return this.onlineDeployments; + } + + /** + * The SchedulesClient object to access its operations. + */ + private final SchedulesClient schedules; + + /** + * Gets the SchedulesClient object to access its operations. + * + * @return the SchedulesClient object. + */ + public SchedulesClient getSchedules() { + return this.schedules; + } + + /** + * The ServerlessEndpointsClient object to access its operations. + */ + private final ServerlessEndpointsClient serverlessEndpoints; + + /** + * Gets the ServerlessEndpointsClient object to access its operations. + * + * @return the ServerlessEndpointsClient object. + */ + public ServerlessEndpointsClient getServerlessEndpoints() { + return this.serverlessEndpoints; + } + + /** + * 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; + + /** + * Gets the WorkspaceFeaturesClient object to access its operations. + * + * @return the WorkspaceFeaturesClient object. + */ + public WorkspaceFeaturesClient getWorkspaceFeatures() { + return this.workspaceFeatures; + } + + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + + /** + * The WorkspacesClient object to access its operations. + */ + private final WorkspacesClient workspaces; + + /** + * Gets the WorkspacesClient object to access its operations. + * + * @return the WorkspacesClient object. + */ + public WorkspacesClient getWorkspaces() { + return this.workspaces; + } + + /** + * The WorkspaceConnectionsClient object to access its operations. + */ + private final WorkspaceConnectionsClient workspaceConnections; + + /** + * Gets the WorkspaceConnectionsClient object to access its operations. + * + * @return the WorkspaceConnectionsClient object. + */ + public WorkspaceConnectionsClient getWorkspaceConnections() { + return this.workspaceConnections; + } + + /** + * The EndpointDeploymentsClient object to access its operations. + */ + private final EndpointDeploymentsClient endpointDeployments; + + /** + * Gets the EndpointDeploymentsClient object to access its operations. + * + * @return the EndpointDeploymentsClient object. + */ + public EndpointDeploymentsClient getEndpointDeployments() { + return this.endpointDeployments; + } + + /** + * The EndpointsClient object to access its operations. + */ + private final EndpointsClient endpoints; + + /** + * Gets the EndpointsClient object to access its operations. + * + * @return the EndpointsClient object. + */ + public EndpointsClient getEndpoints() { + return this.endpoints; + } + + /** + * 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 PrivateEndpointConnectionsClient object to access its operations. + */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * The PrivateLinkResourcesClient object to access its operations. + */ + private final PrivateLinkResourcesClient privateLinkResources; + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; + } + + /** + * The 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; + } + + /** + * 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. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId The ID of the target subscription. + * @param endpoint server parameter. + */ + AzureMachineLearningServicesImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2024-01-01-preview"; + this.usages = new UsagesClientImpl(this); + this.virtualMachineSizes = new VirtualMachineSizesClientImpl(this); + this.quotas = new QuotasClientImpl(this); + this.computes = new ComputesClientImpl(this); + this.capacityReservationGroups = new CapacityReservationGroupsClientImpl(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.marketplaceSubscriptions = new MarketplaceSubscriptionsClientImpl(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); + this.codeVersions = new CodeVersionsClientImpl(this); + this.componentContainers = new ComponentContainersClientImpl(this); + this.componentVersions = new ComponentVersionsClientImpl(this); + this.dataContainers = new DataContainersClientImpl(this); + this.dataVersions = new DataVersionsClientImpl(this); + 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.inferencePools = new InferencePoolsClientImpl(this); + this.inferenceEndpoints = new InferenceEndpointsClientImpl(this); + this.inferenceGroups = new InferenceGroupsClientImpl(this); + this.jobs = new JobsClientImpl(this); + this.labelingJobs = new LabelingJobsClientImpl(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.serverlessEndpoints = new ServerlessEndpointsClientImpl(this); + this.registries = new RegistriesClientImpl(this); + this.workspaceFeatures = new WorkspaceFeaturesClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.workspaces = new WorkspacesClientImpl(this); + this.workspaceConnections = new WorkspaceConnectionsClientImpl(this); + this.endpointDeployments = new EndpointDeploymentsClientImpl(this); + this.endpoints = new EndpointsClientImpl(this); + this.managedNetworkSettingsRules = new ManagedNetworkSettingsRulesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.managedNetworkProvisions = new ManagedNetworkProvisionsClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + return CoreUtils.mergeContexts(this.getContext(), context); + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + LOGGER.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } + + 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/AzureMachineLearningWorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java deleted file mode 100644 index 242efe7553fdd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java +++ /dev/null @@ -1,654 +0,0 @@ -// Copyright (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.ServiceClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -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.BatchDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.ComputesClient; -import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient; -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.JobsClient; -import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.OperationsClient; -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.SchedulesClient; -import com.azure.resourcemanager.machinelearning.fluent.UsagesClient; -import com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient; -import com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient; -import com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -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 { - /** The ID of the target subscription. */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** The HTTP pipeline to send requests through. */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** The serializer to serialize an object into a string. */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** The default poll interval for long-running operation. */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** The OperationsClient object to access its operations. */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** The WorkspacesClient object to access its operations. */ - private final WorkspacesClient workspaces; - - /** - * Gets the WorkspacesClient object to access its operations. - * - * @return the WorkspacesClient object. - */ - public WorkspacesClient getWorkspaces() { - return this.workspaces; - } - - /** The UsagesClient object to access its operations. */ - private final UsagesClient usages; - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - public UsagesClient getUsages() { - return this.usages; - } - - /** The VirtualMachineSizesClient object to access its operations. */ - private final VirtualMachineSizesClient virtualMachineSizes; - - /** - * Gets the VirtualMachineSizesClient object to access its operations. - * - * @return the VirtualMachineSizesClient object. - */ - public VirtualMachineSizesClient getVirtualMachineSizes() { - return this.virtualMachineSizes; - } - - /** The QuotasClient object to access its operations. */ - private final QuotasClient quotas; - - /** - * Gets the QuotasClient object to access its operations. - * - * @return the QuotasClient object. - */ - public QuotasClient getQuotas() { - return this.quotas; - } - - /** The ComputesClient object to access its operations. */ - private final ComputesClient computes; - - /** - * Gets the ComputesClient object to access its operations. - * - * @return the ComputesClient object. - */ - public ComputesClient getComputes() { - return this.computes; - } - - /** The PrivateEndpointConnectionsClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** The PrivateLinkResourcesClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; - } - - /** The WorkspaceConnectionsClient object to access its operations. */ - private final WorkspaceConnectionsClient workspaceConnections; - - /** - * Gets the WorkspaceConnectionsClient object to access its operations. - * - * @return the WorkspaceConnectionsClient object. - */ - public WorkspaceConnectionsClient getWorkspaceConnections() { - return this.workspaceConnections; - } - - /** The BatchEndpointsClient object to access its operations. */ - private final BatchEndpointsClient batchEndpoints; - - /** - * Gets the BatchEndpointsClient object to access its operations. - * - * @return the BatchEndpointsClient object. - */ - public BatchEndpointsClient getBatchEndpoints() { - return this.batchEndpoints; - } - - /** The BatchDeploymentsClient object to access its operations. */ - private final BatchDeploymentsClient batchDeployments; - - /** - * Gets the BatchDeploymentsClient object to access its operations. - * - * @return the BatchDeploymentsClient object. - */ - public BatchDeploymentsClient getBatchDeployments() { - return this.batchDeployments; - } - - /** The CodeContainersClient object to access its operations. */ - private final CodeContainersClient codeContainers; - - /** - * Gets the CodeContainersClient object to access its operations. - * - * @return the CodeContainersClient object. - */ - public CodeContainersClient getCodeContainers() { - return this.codeContainers; - } - - /** The CodeVersionsClient object to access its operations. */ - private final CodeVersionsClient codeVersions; - - /** - * Gets the CodeVersionsClient object to access its operations. - * - * @return the CodeVersionsClient object. - */ - public CodeVersionsClient getCodeVersions() { - return this.codeVersions; - } - - /** The ComponentContainersClient object to access its operations. */ - private final ComponentContainersClient componentContainers; - - /** - * Gets the ComponentContainersClient object to access its operations. - * - * @return the ComponentContainersClient object. - */ - public ComponentContainersClient getComponentContainers() { - return this.componentContainers; - } - - /** The ComponentVersionsClient object to access its operations. */ - private final ComponentVersionsClient componentVersions; - - /** - * Gets the ComponentVersionsClient object to access its operations. - * - * @return the ComponentVersionsClient object. - */ - public ComponentVersionsClient getComponentVersions() { - return this.componentVersions; - } - - /** The DataContainersClient object to access its operations. */ - private final DataContainersClient dataContainers; - - /** - * Gets the DataContainersClient object to access its operations. - * - * @return the DataContainersClient object. - */ - public DataContainersClient getDataContainers() { - return this.dataContainers; - } - - /** The DataVersionsClient object to access its operations. */ - private final DataVersionsClient dataVersions; - - /** - * Gets the DataVersionsClient object to access its operations. - * - * @return the DataVersionsClient object. - */ - public DataVersionsClient getDataVersions() { - return this.dataVersions; - } - - /** The DatastoresClient object to access its operations. */ - private final DatastoresClient datastores; - - /** - * Gets the DatastoresClient object to access its operations. - * - * @return the DatastoresClient object. - */ - public DatastoresClient getDatastores() { - return this.datastores; - } - - /** The EnvironmentContainersClient object to access its operations. */ - private final EnvironmentContainersClient environmentContainers; - - /** - * Gets the EnvironmentContainersClient object to access its operations. - * - * @return the EnvironmentContainersClient object. - */ - public EnvironmentContainersClient getEnvironmentContainers() { - return this.environmentContainers; - } - - /** The EnvironmentVersionsClient object to access its operations. */ - private final EnvironmentVersionsClient environmentVersions; - - /** - * Gets the EnvironmentVersionsClient object to access its operations. - * - * @return the EnvironmentVersionsClient object. - */ - public EnvironmentVersionsClient getEnvironmentVersions() { - return this.environmentVersions; - } - - /** The JobsClient object to access its operations. */ - private final JobsClient jobs; - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - public JobsClient getJobs() { - return this.jobs; - } - - /** The ModelContainersClient object to access its operations. */ - private final ModelContainersClient modelContainers; - - /** - * Gets the ModelContainersClient object to access its operations. - * - * @return the ModelContainersClient object. - */ - public ModelContainersClient getModelContainers() { - return this.modelContainers; - } - - /** The ModelVersionsClient object to access its operations. */ - private final ModelVersionsClient modelVersions; - - /** - * Gets the ModelVersionsClient object to access its operations. - * - * @return the ModelVersionsClient object. - */ - public ModelVersionsClient getModelVersions() { - return this.modelVersions; - } - - /** The OnlineEndpointsClient object to access its operations. */ - private final OnlineEndpointsClient onlineEndpoints; - - /** - * Gets the OnlineEndpointsClient object to access its operations. - * - * @return the OnlineEndpointsClient object. - */ - public OnlineEndpointsClient getOnlineEndpoints() { - return this.onlineEndpoints; - } - - /** The OnlineDeploymentsClient object to access its operations. */ - private final OnlineDeploymentsClient onlineDeployments; - - /** - * Gets the OnlineDeploymentsClient object to access its operations. - * - * @return the OnlineDeploymentsClient object. - */ - public OnlineDeploymentsClient getOnlineDeployments() { - return this.onlineDeployments; - } - - /** The SchedulesClient object to access its operations. */ - private final SchedulesClient schedules; - - /** - * Gets the SchedulesClient object to access its operations. - * - * @return the SchedulesClient object. - */ - public SchedulesClient getSchedules() { - return this.schedules; - } - - /** The WorkspaceFeaturesClient object to access its operations. */ - private final WorkspaceFeaturesClient workspaceFeatures; - - /** - * Gets the WorkspaceFeaturesClient object to access its operations. - * - * @return the WorkspaceFeaturesClient object. - */ - public WorkspaceFeaturesClient getWorkspaceFeatures() { - return this.workspaceFeatures; - } - - /** - * Initializes an instance of AzureMachineLearningWorkspaces client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. - */ - AzureMachineLearningWorkspacesImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2022-10-01"; - this.operations = new OperationsClientImpl(this); - this.workspaces = new WorkspacesClientImpl(this); - this.usages = new UsagesClientImpl(this); - this.virtualMachineSizes = new VirtualMachineSizesClientImpl(this); - this.quotas = new QuotasClientImpl(this); - this.computes = new ComputesClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); - this.workspaceConnections = new WorkspaceConnectionsClientImpl(this); - this.batchEndpoints = new BatchEndpointsClientImpl(this); - this.batchDeployments = new BatchDeploymentsClientImpl(this); - this.codeContainers = new CodeContainersClientImpl(this); - this.codeVersions = new CodeVersionsClientImpl(this); - this.componentContainers = new ComponentContainersClientImpl(this); - this.componentVersions = new ComponentVersionsClientImpl(this); - this.dataContainers = new DataContainersClientImpl(this); - this.dataVersions = new DataVersionsClientImpl(this); - this.datastores = new DatastoresClientImpl(this); - this.environmentContainers = new EnvironmentContainersClientImpl(this); - this.environmentVersions = new EnvironmentVersionsClientImpl(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.workspaceFeatures = new WorkspaceFeaturesClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(s); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureMachineLearningWorkspacesImpl.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java index 379a98ca04ceb..1a5a2fc694052 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java @@ -97,8 +97,8 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties updateBody; - public BatchDeploymentImpl withExistingBatchEndpoint( - String resourceGroupName, String workspaceName, String endpointName) { + public BatchDeploymentImpl withExistingBatchEndpoint(String resourceGroupName, String workspaceName, + String endpointName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; this.endpointName = endpointName; @@ -106,22 +106,14 @@ public BatchDeploymentImpl withExistingBatchEndpoint( } public BatchDeployment create() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getBatchDeployments().createOrUpdate(resourceGroupName, + workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); return this; } public BatchDeployment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getBatchDeployments().createOrUpdate(resourceGroupName, + workspaceName, endpointName, deploymentName, this.innerModel(), context); return this; } @@ -137,51 +129,36 @@ public BatchDeploymentImpl update() { } public BatchDeployment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient().getBatchDeployments().update(resourceGroupName, workspaceName, + endpointName, deploymentName, updateBody, Context.NONE); return this; } public BatchDeployment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, context); + this.innerObject = serviceManager.serviceClient().getBatchDeployments().update(resourceGroupName, workspaceName, + endpointName, deploymentName, updateBody, context); return this; } - BatchDeploymentImpl( - BatchDeploymentInner innerObject, + BatchDeploymentImpl(BatchDeploymentInner 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.endpointName = Utils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); - this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "deployments"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); + this.deploymentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deployments"); } public BatchDeployment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBatchDeployments() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); return this; } public BatchDeployment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBatchDeployments() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context).getValue(); return this; } 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..61a8295a4fa00 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 @@ -40,140 +40,104 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in BatchDeploymentsClient. */ +/** + * An instance of this class provides access to all the operations defined in BatchDeploymentsClient. + */ public final class BatchDeploymentsClientImpl implements BatchDeploymentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BatchDeploymentsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of BatchDeploymentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - BatchDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(BatchDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @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/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @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}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BatchDeploymentInner body, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BatchDeploymentInner body, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists Batch inference deployments in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -184,22 +148,18 @@ Mono> listNext( * @throws ManagementException 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 BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -214,35 +174,16 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - 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)) + context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, 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())); } /** * Lists Batch inference deployments in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -254,28 +195,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -290,32 +221,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - 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(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, 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)); } /** * Lists Batch inference deployments in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -328,8 +242,8 @@ private Mono> listSinglePageAsync( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -337,7 +251,7 @@ private PagedFlux listAsync( /** * Lists Batch inference deployments in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -347,8 +261,8 @@ private PagedFlux listAsync( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -359,7 +273,7 @@ private PagedFlux listAsync( /** * Lists Batch inference deployments in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -373,14 +287,8 @@ private PagedFlux listAsync( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -388,7 +296,7 @@ private PagedFlux listAsync( /** * Lists Batch inference deployments in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -398,8 +306,8 @@ private PagedFlux listAsync( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String endpointName) { + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -408,7 +316,7 @@ public PagedIterable list( /** * Lists Batch inference deployments in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -422,21 +330,15 @@ public PagedIterable list( * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context) { return new PagedIterable<>( listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context)); } /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -447,19 +349,15 @@ public PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -477,24 +375,14 @@ private Mono>> deleteWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context)) + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -506,19 +394,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -535,22 +419,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context); } /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -561,19 +436,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -585,19 +458,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -608,14 +480,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).getSyncPoller(); } /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -627,16 +499,15 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) .getSyncPoller(); } /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -647,16 +518,15 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -668,16 +538,15 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -693,7 +562,7 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -704,14 +573,14 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi * @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 endpointName, String deploymentName, Context context) { + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); } /** * Gets a batch inference deployment by id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -722,19 +591,15 @@ public void delete( * @return a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -752,24 +617,14 @@ private Mono> getWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a batch inference deployment by id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -781,19 +636,15 @@ private Mono> getWithResponseAsync( * @return a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -810,22 +661,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, deploymentName, this.client.getApiVersion(), accept, context); } /** * Gets a batch inference deployment by id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -836,15 +678,15 @@ private Mono> getWithResponseAsync( * @return a batch inference deployment by id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a batch inference deployment by id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -856,14 +698,14 @@ private Mono getAsync( * @return a batch inference deployment by id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); } /** * Gets a batch inference deployment by id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -874,14 +716,14 @@ public Response getWithResponse( * @return a batch inference deployment by id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + public BatchDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -893,23 +735,16 @@ public BatchDeploymentInner get( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -932,25 +767,14 @@ private Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -963,24 +787,16 @@ private Mono>> updateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1002,23 +818,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1031,26 +837,17 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BatchDeploymentInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchDeploymentInner.class, - BatchDeploymentInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchDeploymentInner.class, BatchDeploymentInner.class, this.client.getContext()); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1064,24 +861,18 @@ private PollerFlux, BatchDeploymentInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BatchDeploymentInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BatchDeploymentInner.class, BatchDeploymentInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchDeploymentInner.class, BatchDeploymentInner.class, context); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1093,20 +884,16 @@ private PollerFlux, BatchDeploymentInner> begin * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + public SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) + return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .getSyncPoller(); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1119,21 +906,16 @@ public SyncPoller, BatchDeploymentInner> beginU * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + public SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .getSyncPoller(); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1145,20 +927,15 @@ public SyncPoller, BatchDeploymentInner> beginU * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .last() + private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { + return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1171,21 +948,16 @@ private Mono updateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, + private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() + return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1197,18 +969,14 @@ private Mono updateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { + public BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); } /** * Update a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1221,19 +989,15 @@ public BatchDeploymentInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, + public BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); } /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1245,23 +1009,15 @@ public BatchDeploymentInner update( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1283,26 +1039,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1315,24 +1060,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1354,23 +1090,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); } /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1383,26 +1109,17 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchDeploymentInner.class, - BatchDeploymentInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchDeploymentInner.class, BatchDeploymentInner.class, this.client.getContext()); } /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1416,25 +1133,18 @@ private PollerFlux, BatchDeploymentInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + BatchDeploymentInner body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BatchDeploymentInner.class, BatchDeploymentInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, + endpointName, deploymentName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchDeploymentInner.class, BatchDeploymentInner.class, context); } /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1447,19 +1157,15 @@ private PollerFlux, BatchDeploymentInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .getSyncPoller(); } /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1473,12 +1179,8 @@ public SyncPoller, BatchDeploymentInner> beginC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + BatchDeploymentInner body, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .getSyncPoller(); @@ -1486,7 +1188,7 @@ public SyncPoller, BatchDeploymentInner> beginC /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1498,20 +1200,15 @@ public SyncPoller, BatchDeploymentInner> beginC * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, BatchDeploymentInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1524,21 +1221,15 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, BatchDeploymentInner body, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1550,18 +1241,14 @@ private Mono createOrUpdateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body) { + public BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, BatchDeploymentInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); } /** * Creates/updates a batch inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1574,27 +1261,23 @@ public BatchDeploymentInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { + public BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, BatchDeploymentInner body, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1602,37 +1285,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1640,23 +1314,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java index c1294dbb5c116..8560621bef0ad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java @@ -21,62 +21,50 @@ public final class BatchDeploymentsImpl implements BatchDeployments { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public BatchDeploymentsImpl( - BatchDeploymentsClient innerClient, + public BatchDeploymentsImpl(BatchDeploymentsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return Utils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return Utils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); } - public void delete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, + endpointName, deploymentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BatchDeploymentImpl(inner.getValue(), this.manager())); } else { return null; } } - public BatchDeployment get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - BatchDeploymentInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); + public BatchDeployment get(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + BatchDeploymentInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); if (inner != null) { return new BatchDeploymentImpl(inner, this.manager()); } else { @@ -85,139 +73,98 @@ public BatchDeployment get( } public BatchDeployment getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); } - String deploymentName = Utils.getValueFromIdByName(id, "deployments"); + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } - return this - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); } - String deploymentName = Utils.getValueFromIdByName(id, "deployments"); + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); } - String deploymentName = Utils.getValueFromIdByName(id, "deployments"); + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); } - String deploymentName = Utils.getValueFromIdByName(id, "deployments"); + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java index 43e01217aecab..fa55a1fe8e086 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java @@ -104,20 +104,14 @@ public BatchEndpointImpl withExistingWorkspace(String resourceGroupName, String } public BatchEndpoint create() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getBatchEndpoints().createOrUpdate(resourceGroupName, + workspaceName, endpointName, this.innerModel(), Context.NONE); return this; } public BatchEndpoint create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getBatchEndpoints().createOrUpdate(resourceGroupName, + workspaceName, endpointName, this.innerModel(), context); return this; } @@ -133,57 +127,41 @@ public BatchEndpointImpl update() { } public BatchEndpoint apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient().getBatchEndpoints().update(resourceGroupName, workspaceName, + endpointName, updateBody, Context.NONE); return this; } public BatchEndpoint apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, context); + this.innerObject = serviceManager.serviceClient().getBatchEndpoints().update(resourceGroupName, workspaceName, + endpointName, updateBody, context); return this; } - BatchEndpointImpl( - BatchEndpointInner innerObject, + BatchEndpointImpl(BatchEndpointInner 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.endpointName = Utils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); } public BatchEndpoint refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBatchEndpoints() + .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); return this; } public BatchEndpoint refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getBatchEndpoints() + .getWithResponse(resourceGroupName, workspaceName, endpointName, context).getValue(); return this; } public Response listKeysWithResponse(Context context) { - return serviceManager - .batchEndpoints() - .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); + return serviceManager.batchEndpoints().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, + context); } public EndpointAuthKeys listKeys() { 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..dd9df1aa59726 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 @@ -42,146 +42,112 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in BatchEndpointsClient. */ +/** + * An instance of this class provides access to all the operations defined in BatchEndpointsClient. + */ public final class BatchEndpointsClientImpl implements BatchEndpointsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BatchEndpointsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of BatchEndpointsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - BatchEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(BatchEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface BatchEndpointsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("count") Integer count, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @QueryParam("count") Integer count, + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @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}/batchEndpoints/{endpointName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BatchEndpointInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BatchEndpointInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/listkeys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") String endpoint, + Mono> listKeys(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists Batch inference endpoint in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param count Number of endpoints to be retrieved in a page of results. @@ -190,22 +156,18 @@ Mono> listNext( * @throws ManagementException 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 BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Integer count, String skip) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + Integer count, String skip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -216,34 +178,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - count, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), count, 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())); } /** * Lists Batch inference endpoint in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param count Number of endpoints to be retrieved in a page of results. @@ -253,22 +197,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + Integer count, String skip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -280,30 +220,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - count, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + this.client.getApiVersion(), count, skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists Batch inference endpoint in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param count Number of endpoints to be retrieved in a page of results. @@ -314,16 +239,15 @@ private Mono> listSinglePageAsync( * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Integer count, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, + String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists Batch inference endpoint in the 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. @@ -335,14 +259,13 @@ private PagedFlux listAsync( private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final Integer count = null; final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists Batch inference endpoint in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param count Number of endpoints to be retrieved in a page of results. @@ -354,16 +277,15 @@ private PagedFlux listAsync(String resourceGroupName, String * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, context), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, + String skip, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists Batch inference endpoint in the 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. @@ -380,7 +302,7 @@ public PagedIterable list(String resourceGroupName, String w /** * Lists Batch inference endpoint in the workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param count Number of endpoints to be retrieved in a page of results. @@ -392,14 +314,14 @@ public PagedIterable list(String resourceGroupName, String w * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, + String skip, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip, context)); } /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -409,19 +331,15 @@ public PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -435,24 +353,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -463,19 +371,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -489,21 +393,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), accept, context); } /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -513,18 +409,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -535,19 +429,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -557,14 +450,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName) { return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName).getSyncPoller(); } /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -575,14 +468,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, Context context) { return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).getSyncPoller(); } /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -593,14 +486,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName) - .last() + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -611,16 +503,15 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -635,7 +526,7 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -651,7 +542,7 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi /** * Gets a batch inference endpoint by name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. @@ -661,19 +552,15 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi * @return a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -687,24 +574,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a batch inference endpoint by name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. @@ -715,19 +592,15 @@ private Mono> getWithResponseAsync( * @return a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -741,21 +614,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, this.client.getApiVersion(), accept, context); } /** * Gets a batch inference endpoint by name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. @@ -772,7 +637,7 @@ private Mono getAsync(String resourceGroupName, String works /** * Gets a batch inference endpoint by name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. @@ -783,14 +648,14 @@ private Mono getAsync(String resourceGroupName, String works * @return a batch inference endpoint by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** * Gets a batch inference endpoint by name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. @@ -806,7 +671,7 @@ public BatchEndpointInner get(String resourceGroupName, String workspaceName, St /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -817,22 +682,15 @@ public BatchEndpointInner get(String resourceGroupName, String workspaceName, St * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, PartialMinimalTrackedResourceWithIdentity body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -851,25 +709,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -881,23 +728,15 @@ private Mono>> updateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -916,22 +755,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); } /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -942,26 +772,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchEndpointInner.class, - BatchEndpointInner.class, - this.client.getContext()); + private PollerFlux, BatchEndpointInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchEndpointInner.class, BatchEndpointInner.class, this.client.getContext()); } /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -973,24 +794,18 @@ private PollerFlux, BatchEndpointInner> beginUpda * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { + private PollerFlux, BatchEndpointInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BatchEndpointInner.class, BatchEndpointInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchEndpointInner.class, BatchEndpointInner.class, context); } /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1001,17 +816,14 @@ private PollerFlux, BatchEndpointInner> beginUpda * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { + public SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); } /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1023,18 +835,14 @@ public SyncPoller, BatchEndpointInner> beginUpdat * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { + public SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); } /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1045,19 +853,15 @@ public SyncPoller, BatchEndpointInner> beginUpdat * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, + private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body) - .last() + return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1069,20 +873,15 @@ private Mono updateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() + private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1093,17 +892,14 @@ private Mono updateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, + public BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); } /** * Update a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1115,18 +911,14 @@ public BatchEndpointInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { + public BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body, Context context) { return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1137,19 +929,15 @@ public BatchEndpointInner update( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1168,25 +956,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1198,19 +975,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1229,22 +1002,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1257,21 +1021,15 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchEndpointInner.class, - BatchEndpointInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchEndpointInner.class, BatchEndpointInner.class, this.client.getContext()); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1286,17 +1044,15 @@ private PollerFlux, BatchEndpointInner> beginCrea private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BatchEndpointInner.class, BatchEndpointInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchEndpointInner.class, BatchEndpointInner.class, context); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1307,14 +1063,14 @@ private PollerFlux, BatchEndpointInner> beginCrea * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { + public SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body) { return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1326,16 +1082,15 @@ public SyncPoller, BatchEndpointInner> beginCreat * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) + public SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) .getSyncPoller(); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1346,16 +1101,15 @@ public SyncPoller, BatchEndpointInner> beginCreat * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, BatchEndpointInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1367,16 +1121,15 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, BatchEndpointInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1387,14 +1140,14 @@ private Mono createOrUpdateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { + public BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + BatchEndpointInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); } /** * Creates a batch inference endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch inference endpoint. @@ -1406,14 +1159,14 @@ public BatchEndpointInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { + public BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + BatchEndpointInner body, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); } /** * Lists batch Inference Endpoint keys. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -1423,19 +1176,15 @@ public BatchEndpointInner createOrUpdate( * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1449,24 +1198,14 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists batch Inference Endpoint keys. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -1477,19 +1216,15 @@ private Mono> listKeysWithResponseAsync( * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1503,21 +1238,13 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); + return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), accept, context); } /** * Lists batch Inference Endpoint keys. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -1527,15 +1254,15 @@ private Mono> listKeysWithResponseAsync( * @return keys for endpoint authentication on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono listKeysAsync(String resourceGroupName, String workspaceName, + String endpointName) { return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Lists batch Inference Endpoint keys. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -1546,14 +1273,14 @@ private Mono listKeysAsync( * @return keys for endpoint authentication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** * Lists batch Inference Endpoint keys. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -1569,14 +1296,15 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1584,37 +1312,28 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1622,23 +1341,13 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java index 111c2006d1972..f784fb27bdfd5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java @@ -23,8 +23,7 @@ public final class BatchEndpointsImpl implements BatchEndpoints { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public BatchEndpointsImpl( - BatchEndpointsClient innerClient, + public BatchEndpointsImpl(BatchEndpointsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -32,14 +31,14 @@ public BatchEndpointsImpl( public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, count, skip, context); - return Utils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, count, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String endpointName) { @@ -50,15 +49,12 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BatchEndpointImpl(inner.getValue(), this.manager())); } else { return null; @@ -74,15 +70,12 @@ public BatchEndpoint get(String resourceGroupName, String workspaceName, String } } - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + Response inner + = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new EndpointAuthKeysImpl(inner.getValue(), this.manager())); } else { return null; @@ -99,109 +92,77 @@ public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, } public BatchEndpoint getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, endpointName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); } this.delete(resourceGroupName, workspaceName, endpointName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "batchEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "batchEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'batchEndpoints'.", id))); } this.delete(resourceGroupName, workspaceName, endpointName, context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupImpl.java new file mode 100644 index 0000000000000..bf95a346c4abe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupImpl.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.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CapacityReservationGroupInner; +import com.azure.resourcemanager.machinelearning.models.CapacityReservationGroup; +import com.azure.resourcemanager.machinelearning.models.CapacityReservationGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class CapacityReservationGroupImpl + implements CapacityReservationGroup, CapacityReservationGroup.Definition, CapacityReservationGroup.Update { + private CapacityReservationGroupInner 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 CapacityReservationGroupProperties properties() { + return this.innerModel().properties(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CapacityReservationGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String groupId; + + private PartialMinimalTrackedResourceWithSkuAndIdentity updateBody; + + public CapacityReservationGroupImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public CapacityReservationGroup create() { + this.innerObject = serviceManager.serviceClient().getCapacityReservationGroups() + .createOrUpdateWithResponse(resourceGroupName, groupId, this.innerModel(), Context.NONE).getValue(); + return this; + } + + public CapacityReservationGroup create(Context context) { + this.innerObject = serviceManager.serviceClient().getCapacityReservationGroups() + .createOrUpdateWithResponse(resourceGroupName, groupId, this.innerModel(), context).getValue(); + return this; + } + + CapacityReservationGroupImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new CapacityReservationGroupInner(); + this.serviceManager = serviceManager; + this.groupId = name; + } + + public CapacityReservationGroupImpl update() { + this.updateBody = new PartialMinimalTrackedResourceWithSkuAndIdentity(); + return this; + } + + public CapacityReservationGroup apply() { + this.innerObject = serviceManager.serviceClient().getCapacityReservationGroups() + .updateWithResponse(resourceGroupName, groupId, updateBody, Context.NONE).getValue(); + return this; + } + + public CapacityReservationGroup apply(Context context) { + this.innerObject = serviceManager.serviceClient().getCapacityReservationGroups() + .updateWithResponse(resourceGroupName, groupId, updateBody, context).getValue(); + return this; + } + + CapacityReservationGroupImpl(CapacityReservationGroupInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.groupId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capacityReserverationGroups"); + } + + public CapacityReservationGroup refresh() { + this.innerObject = serviceManager.serviceClient().getCapacityReservationGroups() + .getByResourceGroupWithResponse(resourceGroupName, groupId, Context.NONE).getValue(); + return this; + } + + public CapacityReservationGroup refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getCapacityReservationGroups() + .getByResourceGroupWithResponse(resourceGroupName, groupId, context).getValue(); + return this; + } + + public CapacityReservationGroupImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public CapacityReservationGroupImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public CapacityReservationGroupImpl withProperties(CapacityReservationGroupProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public CapacityReservationGroupImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public CapacityReservationGroupImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public CapacityReservationGroupImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public CapacityReservationGroupImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public CapacityReservationGroupImpl withIdentity(PartialManagedServiceIdentity identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public CapacityReservationGroupImpl 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/CapacityReservationGroupsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupsClientImpl.java new file mode 100644 index 0000000000000..5b70cf67c0649 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupsClientImpl.java @@ -0,0 +1,1049 @@ +// Copyright (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.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.machinelearning.fluent.CapacityReservationGroupsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CapacityReservationGroupInner; +import com.azure.resourcemanager.machinelearning.models.CapacityReservationGroupTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in CapacityReservationGroupsClient. + */ +public final class CapacityReservationGroupsClientImpl implements CapacityReservationGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final CapacityReservationGroupsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of CapacityReservationGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CapacityReservationGroupsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(CapacityReservationGroupsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesCapacityReservationGroups to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface CapacityReservationGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/capacityReserverationGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/capacityReserverationGroups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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/capacityReserverationGroups/{groupId}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/capacityReserverationGroups/{groupId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/capacityReserverationGroups/{groupId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSkuAndIdentity body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/capacityReserverationGroups/{groupId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("groupId") String groupId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CapacityReservationGroupInner 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 CapacityReservationGroups by subscription. + * + * @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 CapacityReservationGroup entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + 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 CapacityReservationGroups by subscription. + * + * @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 CapacityReservationGroup entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), skip, accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List CapacityReservationGroups by subscription. + * + * @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 CapacityReservationGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(skip), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List CapacityReservationGroups 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 CapacityReservationGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(skip), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List CapacityReservationGroups by subscription. + * + * @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 CapacityReservationGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String skip, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(skip, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List CapacityReservationGroups 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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String skip = null; + return new PagedIterable<>(listAsync(skip)); + } + + /** + * List CapacityReservationGroups by subscription. + * + * @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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String skip, Context context) { + return new PagedIterable<>(listAsync(skip, context)); + } + + /** + * Lists CapacityReservationGroups. + * + * @param resourceGroupName The name of the resource group. The name 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 CapacityReservationGroup entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, 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())); + } + + /** + * Lists CapacityReservationGroups. + * + * @param resourceGroupName The name of the resource group. The name 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 CapacityReservationGroup entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists CapacityReservationGroups. + * + * @param resourceGroupName The name of the resource group. The name 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 CapacityReservationGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists CapacityReservationGroups. + * + * @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 CapacityReservationGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String skip = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists CapacityReservationGroups. + * + * @param resourceGroupName The name of the resource group. The name 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 CapacityReservationGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists CapacityReservationGroups. + * + * @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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String skip = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip)); + } + + /** + * Lists CapacityReservationGroups. + * + * @param resourceGroupName The name of the resource group. The name 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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String skip, + Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip, context)); + } + + /** + * Delete CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 groupId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (groupId == null) { + return Mono.error(new IllegalArgumentException("Parameter groupId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, groupId, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 groupId, 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 (groupId == null) { + return Mono.error(new IllegalArgumentException("Parameter groupId 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, groupId, + this.client.getApiVersion(), accept, context); + } + + /** + * Delete CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 groupId) { + return deleteWithResponseAsync(resourceGroupName, groupId).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String groupId, Context context) { + return deleteWithResponseAsync(resourceGroupName, groupId, context).block(); + } + + /** + * Delete CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 groupId) { + deleteWithResponse(resourceGroupName, groupId, Context.NONE); + } + + /** + * Get CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capacityReservationGroup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String groupId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (groupId == null) { + return Mono.error(new IllegalArgumentException("Parameter groupId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, groupId, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capacityReservationGroup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String groupId, 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 (groupId == null) { + return Mono.error(new IllegalArgumentException("Parameter groupId 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, + groupId, this.client.getApiVersion(), accept, context); + } + + /** + * Get CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capacityReservationGroup on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String groupId) { + return getByResourceGroupWithResponseAsync(resourceGroupName, groupId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capacityReservationGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String groupId, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, groupId, context).block(); + } + + /** + * Get CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capacityReservationGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CapacityReservationGroupInner getByResourceGroup(String resourceGroupName, String groupId) { + return getByResourceGroupWithResponse(resourceGroupName, groupId, Context.NONE).getValue(); + } + + /** + * Update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String groupId, PartialMinimalTrackedResourceWithSkuAndIdentity 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 (groupId == null) { + return Mono.error(new IllegalArgumentException("Parameter groupId 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, groupId, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String groupId, PartialMinimalTrackedResourceWithSkuAndIdentity 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 (groupId == null) { + return Mono.error(new IllegalArgumentException("Parameter groupId 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, groupId, + this.client.getApiVersion(), body, accept, context); + } + + /** + * Update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String groupId, + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return updateWithResponseAsync(resourceGroupName, groupId, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String groupId, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + return updateWithResponseAsync(resourceGroupName, groupId, body, context).block(); + } + + /** + * Update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CapacityReservationGroupInner update(String resourceGroupName, String groupId, + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return updateWithResponse(resourceGroupName, groupId, body, Context.NONE).getValue(); + } + + /** + * Create or update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 groupId, CapacityReservationGroupInner 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 (groupId == null) { + return Mono.error(new IllegalArgumentException("Parameter groupId 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, groupId, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to create. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 groupId, CapacityReservationGroupInner 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 (groupId == null) { + return Mono.error(new IllegalArgumentException("Parameter groupId 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, + groupId, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create or update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 groupId, + CapacityReservationGroupInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, groupId, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to create. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 createOrUpdateWithResponse(String resourceGroupName, String groupId, + CapacityReservationGroupInner body, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, groupId, body, context).block(); + } + + /** + * Create or update CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param body Capacity Reservation Group payload to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 CapacityReservationGroupInner createOrUpdate(String resourceGroupName, String groupId, + CapacityReservationGroupInner body) { + return createOrUpdateWithResponse(resourceGroupName, groupId, 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 CapacityReservationGroup 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 CapacityReservationGroup 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 CapacityReservationGroup 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 CapacityReservationGroup 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/CapacityReservationGroupsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupsImpl.java new file mode 100644 index 0000000000000..d030e64eac580 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapacityReservationGroupsImpl.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.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.CapacityReservationGroupsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CapacityReservationGroupInner; +import com.azure.resourcemanager.machinelearning.models.CapacityReservationGroup; +import com.azure.resourcemanager.machinelearning.models.CapacityReservationGroups; + +public final class CapacityReservationGroupsImpl implements CapacityReservationGroups { + private static final ClientLogger LOGGER = new ClientLogger(CapacityReservationGroupsImpl.class); + + private final CapacityReservationGroupsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public CapacityReservationGroupsImpl(CapacityReservationGroupsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapacityReservationGroupImpl(inner1, this.manager())); + } + + public PagedIterable list(String skip, Context context) { + PagedIterable inner = this.serviceClient().list(skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapacityReservationGroupImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapacityReservationGroupImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CapacityReservationGroupImpl(inner1, this.manager())); + } + + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String groupId, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, groupId, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String groupId) { + this.serviceClient().delete(resourceGroupName, groupId); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String groupId, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, groupId, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CapacityReservationGroupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CapacityReservationGroup getByResourceGroup(String resourceGroupName, String groupId) { + CapacityReservationGroupInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, groupId); + if (inner != null) { + return new CapacityReservationGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public CapacityReservationGroup getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String groupId = ResourceManagerUtils.getValueFromIdByName(id, "capacityReserverationGroups"); + if (groupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'capacityReserverationGroups'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, groupId, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String groupId = ResourceManagerUtils.getValueFromIdByName(id, "capacityReserverationGroups"); + if (groupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'capacityReserverationGroups'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, groupId, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String groupId = ResourceManagerUtils.getValueFromIdByName(id, "capacityReserverationGroups"); + if (groupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'capacityReserverationGroups'.", id))); + } + this.deleteByResourceGroupWithResponse(resourceGroupName, groupId, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String groupId = ResourceManagerUtils.getValueFromIdByName(id, "capacityReserverationGroups"); + if (groupId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'capacityReserverationGroups'.", id))); + } + return this.deleteByResourceGroupWithResponse(resourceGroupName, groupId, context); + } + + private CapacityReservationGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public CapacityReservationGroupImpl define(String name) { + return new CapacityReservationGroupImpl(name, this.manager()); + } +} 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..376cd92fc76af 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,40 +49,32 @@ 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; } public CodeContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryCodeContainers().createOrUpdate(resourceGroupName, + registryName, codeName, this.innerModel(), Context.NONE); return this; } public CodeContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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() { @@ -90,52 +82,35 @@ public CodeContainerImpl update() { } public CodeContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryCodeContainers().createOrUpdate(resourceGroupName, + registryName, codeName, this.innerModel(), Context.NONE); return this; } public CodeContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryCodeContainers().createOrUpdate(resourceGroupName, + registryName, codeName, this.innerModel(), context); return this; } - CodeContainerImpl( - CodeContainerInner innerObject, + CodeContainerImpl(CodeContainerInner 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(), "codes"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.codeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "codes"); } public CodeContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryCodeContainers() + .getWithResponse(resourceGroupName, registryName, codeName, Context.NONE).getValue(); return this; } public CodeContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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..8302778592447 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 @@ -33,111 +33,91 @@ import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CodeContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in CodeContainersClient. + */ public final class CodeContainersClientImpl implements CodeContainersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CodeContainersService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of CodeContainersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - CodeContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(CodeContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface CodeContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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/workspaces/{workspaceName}/codes/{name}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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); + @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}/codes/{name}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/codes/{name}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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") CodeContainerInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CodeContainerInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List 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. @@ -145,22 +125,18 @@ Mono> listNext( * @throws ManagementException 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -171,33 +147,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, 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 workspaceName Name of Azure Machine Learning workspace. * @param skip Continuation token for pagination. @@ -206,22 +165,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -233,29 +188,15 @@ private Mono> listSinglePageAsync( 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, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + 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 workspaceName Name of Azure Machine Learning workspace. * @param skip Continuation token for pagination. @@ -266,14 +207,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List 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. @@ -284,14 +224,13 @@ private PagedFlux listAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List 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. @@ -302,16 +241,15 @@ private PagedFlux listAsync(String resourceGroupName, String * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List 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. @@ -327,7 +265,7 @@ public PagedIterable list(String resourceGroupName, String w /** * List 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. @@ -338,14 +276,14 @@ public PagedIterable list(String resourceGroupName, String w * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, 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. @@ -357,16 +295,12 @@ public PagedIterable list( @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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -380,24 +314,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } 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)) + .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. @@ -408,19 +332,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -434,21 +354,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -464,7 +376,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -475,14 +387,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).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. @@ -497,7 +409,7 @@ public void delete(String resourceGroupName, String workspaceName, String name) /** * 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. @@ -507,19 +419,15 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -533,24 +441,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(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. @@ -561,19 +459,15 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -587,21 +481,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.get(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. @@ -618,7 +504,7 @@ private Mono getAsync(String resourceGroupName, String works /** * 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. @@ -629,14 +515,14 @@ private Mono getAsync(String resourceGroupName, String works * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return getWithResponseAsync(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. @@ -652,7 +538,7 @@ public CodeContainerInner get(String resourceGroupName, String workspaceName, St /** * 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. @@ -660,23 +546,19 @@ public CodeContainerInner get(String resourceGroupName, String workspaceName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. + * @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, CodeContainerInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, CodeContainerInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -695,25 +577,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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)) + .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. @@ -722,23 +593,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, CodeContainerInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, CodeContainerInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -757,22 +624,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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); + 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. @@ -783,15 +641,15 @@ private Mono> createOrUpdateWithResponseAsync( * @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, CodeContainerInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + CodeContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.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. @@ -803,14 +661,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, CodeContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).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. @@ -821,21 +679,22 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { + public CodeContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CodeContainerInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -843,37 +702,28 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -881,23 +731,13 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..0f6a8f0490cf3 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 @@ -21,8 +21,7 @@ public final class CodeContainersImpl implements CodeContainers { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public CodeContainersImpl( - CodeContainersClient innerClient, + public CodeContainersImpl(CodeContainersClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,18 +29,18 @@ public CodeContainersImpl( public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } @@ -49,15 +48,12 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CodeContainerImpl(inner.getValue(), this.manager())); } else { return null; @@ -73,108 +69,26 @@ 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 +98,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..06bf24b8657db 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,37 +52,28 @@ 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; } public CodeVersion create() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryCodeVersions().createOrUpdate(resourceGroupName, + registryName, codeName, version, this.innerModel(), Context.NONE); return this; } public CodeVersion create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryCodeVersions().createOrUpdate(resourceGroupName, + registryName, codeName, version, this.innerModel(), context); return this; } @@ -94,56 +88,50 @@ public CodeVersionImpl update() { } public CodeVersion apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryCodeVersions().createOrUpdate(resourceGroupName, + registryName, codeName, version, this.innerModel(), Context.NONE); return this; } public CodeVersion apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryCodeVersions().createOrUpdate(resourceGroupName, + registryName, codeName, version, this.innerModel(), context); return this; } - CodeVersionImpl( - CodeVersionInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + CodeVersionImpl(CodeVersionInner 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(), "codes"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.codeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "codes"); + this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); } public CodeVersion refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryCodeVersions() + .getWithResponse(resourceGroupName, registryName, codeName, version, Context.NONE).getValue(); return this; } public CodeVersion refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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..c70e68e065181 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,150 +27,154 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in CodeVersionsClient. + */ public final class CodeVersionsClientImpl implements CodeVersionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CodeVersionsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of CodeVersionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - CodeVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(CodeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface CodeVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{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("$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}") + @ExpectedResponses({ 200, 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}/codes/{name}/versions/{version}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> get(@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("$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/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({200, 204}) + @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}/codes/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @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/workspaces/{workspaceName}/codes/{name}/versions/{version}/publish") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + 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, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({200, 201}) + @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> createOrUpdate( - @HostParam("$host") String endpoint, + 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") CodeVersionInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) + @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}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * 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 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 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. * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String name, String orderBy, Integer top, String skip) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String name, String orderBy, Integer top, String skip, String hash, String hashVersion) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -183,69 +188,42 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, hash, + hashVersion, 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 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 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. * @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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String name, String orderBy, Integer top, String skip, String hash, String hashVersion, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -260,54 +238,39 @@ private Mono> listSinglePageAsync( 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(), - orderBy, - top, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, + this.client.getApiVersion(), orderBy, top, skip, hash, hashVersion, 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 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 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. * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String name, String orderBy, Integer top, String skip) { + private PagedFlux listAsync(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)); } /** * 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 Container name. This is case-sensitive. @@ -321,20 +284,24 @@ 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)); } /** * 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 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 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. @@ -342,22 +309,15 @@ private PagedFlux listAsync(String resourceGroupName, String w * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String hash, String hashVersion, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, + hash, hashVersion, 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 Container name. This is case-sensitive. @@ -371,18 +331,23 @@ 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)); } /** * 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 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 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. @@ -390,20 +355,15 @@ public PagedIterable list(String resourceGroupName, String wor * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, context)); + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String hash, String hashVersion, Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, 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. @@ -414,19 +374,15 @@ public PagedIterable list( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -443,25 +399,14 @@ private Mono> deleteWithResponseAsync( } 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)) + .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. @@ -473,19 +418,15 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -502,22 +443,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -535,7 +467,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -547,14 +479,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).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. @@ -570,7 +502,7 @@ public void delete(String resourceGroupName, String workspaceName, String name, /** * 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. @@ -581,19 +513,15 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -610,25 +538,14 @@ private Mono> getWithResponseAsync( } 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)) + .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. @@ -640,19 +557,15 @@ private Mono> getWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -669,22 +582,13 @@ private Mono> getWithResponseAsync( } 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); + 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. @@ -695,15 +599,15 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { + 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. @@ -715,14 +619,14 @@ private Mono getAsync( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + 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. @@ -739,7 +643,7 @@ public CodeVersionInner get(String resourceGroupName, String workspaceName, Stri /** * 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. @@ -748,23 +652,19 @@ public CodeVersionInner get(String resourceGroupName, String workspaceName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. + * @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, CodeVersionInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, CodeVersionInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -786,26 +686,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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)) + .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. @@ -815,28 +703,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, - CodeVersionInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -858,23 +737,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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); + 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. @@ -886,15 +755,15 @@ private Mono> createOrUpdateWithResponseAsync( * @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, CodeVersionInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + String version, CodeVersionInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) .flatMap(res -> Mono.justOrEmpty(res.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. @@ -907,19 +776,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - CodeVersionInner body, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, CodeVersionInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).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. @@ -931,22 +795,445 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body) { + public CodeVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + CodeVersionInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) .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. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -954,37 +1241,28 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -992,23 +1270,13 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..8c549fa00bbb1 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); @@ -21,8 +25,7 @@ public final class CodeVersionsImpl implements CodeVersions { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public CodeVersionsImpl( - CodeVersionsClient innerClient, + public CodeVersionsImpl(CodeVersionsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,24 +33,18 @@ public CodeVersionsImpl( public PagedIterable list(String resourceGroupName, String workspaceName, String name) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, name, orderBy, top, skip, context); - return Utils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, String hash, String hashVersion, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name, + orderBy, top, skip, hash, hashVersion, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } @@ -55,15 +52,12 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CodeVersionImpl(inner.getValue(), this.manager())); } else { return null; @@ -79,136 +73,60 @@ 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 +136,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..811be97742ced 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,41 +50,33 @@ 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; } public ComponentContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), Context.NONE); return this; } public ComponentContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), context); return this; } - ComponentContainerImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + ComponentContainerImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = new ComponentContainerInner(); this.serviceManager = serviceManager; - this.name = name; + this.componentName = name; } public ComponentContainerImpl update() { @@ -92,52 +84,35 @@ public ComponentContainerImpl update() { } public ComponentContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), Context.NONE); return this; } public ComponentContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentContainers() + .createOrUpdate(resourceGroupName, registryName, componentName, this.innerModel(), context); return this; } - ComponentContainerImpl( - ComponentContainerInner innerObject, + ComponentContainerImpl(ComponentContainerInner 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(), "components"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.componentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "components"); } public ComponentContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentContainers() + .getWithResponse(resourceGroupName, registryName, componentName, Context.NONE).getValue(); return this; } public ComponentContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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..80a0d6def9384 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 @@ -34,112 +34,92 @@ 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 ComponentContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in ComponentContainersClient. + */ public final class ComponentContainersClientImpl implements ComponentContainersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ComponentContainersService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ComponentContainersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - ComponentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(ComponentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface ComponentContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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/workspaces/{workspaceName}/components/{name}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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); + @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}/components/{name}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/components/{name}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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") ComponentContainerInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ComponentContainerInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List component 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. @@ -148,22 +128,18 @@ Mono> listNext( * @throws ManagementException 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip, ListViewType listViewType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -174,34 +150,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, 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 component 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. @@ -211,22 +169,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -238,30 +192,15 @@ private Mono> listSinglePageAsync( 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, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + 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 component 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. @@ -272,16 +211,15 @@ private Mono> listSinglePageAsync( * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List component 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. @@ -293,14 +231,13 @@ private PagedFlux listAsync( private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List component 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. @@ -312,16 +249,15 @@ private PagedFlux listAsync(String resourceGroupName, S * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List component 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. @@ -338,7 +274,7 @@ public PagedIterable list(String resourceGroupName, Str /** * List component 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. @@ -350,14 +286,14 @@ public PagedIterable list(String resourceGroupName, Str * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, 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. @@ -369,16 +305,12 @@ public PagedIterable list( @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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -392,24 +324,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } 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)) + .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. @@ -420,19 +342,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -446,21 +364,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -476,7 +386,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -487,14 +397,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).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. @@ -509,7 +419,7 @@ public void delete(String resourceGroupName, String workspaceName, String name) /** * 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. @@ -519,19 +429,15 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -545,24 +451,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(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. @@ -573,19 +469,15 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -599,21 +491,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.get(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. @@ -630,7 +514,7 @@ private Mono getAsync(String resourceGroupName, String /** * 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. @@ -641,14 +525,14 @@ private Mono getAsync(String resourceGroupName, String * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { return getWithResponseAsync(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. @@ -664,7 +548,7 @@ public ComponentContainerInner get(String resourceGroupName, String workspaceNam /** * 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. @@ -672,23 +556,19 @@ public ComponentContainerInner get(String resourceGroupName, String workspaceNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, ComponentContainerInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ComponentContainerInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -707,25 +587,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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)) + .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. @@ -734,23 +603,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, ComponentContainerInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ComponentContainerInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -769,22 +634,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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); + 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. @@ -795,15 +651,15 @@ private Mono> createOrUpdateWithResponseAsync( * @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, ComponentContainerInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, ComponentContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.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. @@ -815,14 +671,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, ComponentContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).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. @@ -833,21 +689,22 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { + public ComponentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ComponentContainerInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -855,37 +712,28 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -893,23 +741,13 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..7d56afd099c11 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 @@ -22,8 +22,7 @@ public final class ComponentContainersImpl implements ComponentContainers { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public ComponentContainersImpl( - ComponentContainersClient innerClient, + public ComponentContainersImpl(ComponentContainersClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,18 +30,18 @@ public ComponentContainersImpl( public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } @@ -50,15 +49,12 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ComponentContainerImpl(inner.getValue(), this.manager())); } else { return null; @@ -74,108 +70,27 @@ 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 +100,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..c3aa44c1a0246 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,37 +50,29 @@ 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; } public ComponentVersion create() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentVersions() + .createOrUpdate(resourceGroupName, registryName, componentName, version, this.innerModel(), Context.NONE); return this; } public ComponentVersion create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentVersions() + .createOrUpdate(resourceGroupName, registryName, componentName, version, this.innerModel(), context); return this; } @@ -95,54 +87,36 @@ public ComponentVersionImpl update() { } public ComponentVersion apply() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentVersions() + .createOrUpdate(resourceGroupName, registryName, componentName, version, this.innerModel(), Context.NONE); return this; } public ComponentVersion apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentVersions() + .createOrUpdate(resourceGroupName, registryName, componentName, version, this.innerModel(), context); return this; } - ComponentVersionImpl( - ComponentVersionInner innerObject, + ComponentVersionImpl(ComponentVersionInner 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(), "components"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.componentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "components"); + this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); } public ComponentVersion refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryComponentVersions() + .getWithResponse(resourceGroupName, registryName, componentName, version, Context.NONE).getValue(); return this; } public ComponentVersion refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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..6ef34ae56b682 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,126 +27,118 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in ComponentVersionsClient. + */ public final class ComponentVersionsClientImpl implements ComponentVersionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ComponentVersionsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ComponentVersionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - ComponentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(ComponentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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 + * 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") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{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("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, @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}/components/{name}/versions/{version}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); + @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"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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); + @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}/components/{name}/versions/{version}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + 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, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @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"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}/publish") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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") ComponentVersionInner body, - @HeaderParam("Accept") String accept, - Context context); + @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List component versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Component name. @@ -153,32 +146,24 @@ Mono> listNext( * @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 stage Component 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 ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType, + String stage) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -192,37 +177,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, listViewType, + 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 component versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Component name. @@ -230,34 +195,25 @@ private Mono> listSinglePageAsync( * @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 stage Component 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 ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType, + String stage, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -272,33 +228,15 @@ private Mono> listSinglePageAsync( 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(), - orderBy, - top, - skip, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, + this.client.getApiVersion(), orderBy, top, skip, listViewType, stage, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List component versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Component name. @@ -306,28 +244,23 @@ private Mono> listSinglePageAsync( * @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 stage Component 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 ComponentVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, String stage) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List component versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Component name. @@ -342,14 +275,15 @@ private PagedFlux listAsync(String resourceGroupName, Str final Integer top = null; final String skip = null; final ListViewType listViewType = null; + final String stage = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List component versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Component name. @@ -357,6 +291,7 @@ private PagedFlux listAsync(String resourceGroupName, Str * @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 stage Component 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. @@ -364,24 +299,15 @@ private PagedFlux listAsync(String resourceGroupName, Str * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, String stage, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, + listViewType, stage, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List component versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Component name. @@ -396,12 +322,14 @@ public PagedIterable list(String resourceGroupName, Strin final Integer top = null; final String skip = null; final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType)); + final String stage = null; + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, stage)); } /** * List component versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Component name. @@ -409,6 +337,7 @@ public PagedIterable list(String resourceGroupName, Strin * @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 stage Component 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. @@ -416,22 +345,15 @@ public PagedIterable list(String resourceGroupName, Strin * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, String stage, Context context) { return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context)); + listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, 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. @@ -442,19 +364,15 @@ public PagedIterable list( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -471,25 +389,14 @@ private Mono> deleteWithResponseAsync( } 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)) + .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. @@ -501,19 +408,15 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -530,22 +433,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -563,7 +457,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -575,14 +469,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).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. @@ -598,7 +492,7 @@ public void delete(String resourceGroupName, String workspaceName, String name, /** * 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. @@ -609,19 +503,15 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -638,25 +528,14 @@ private Mono> getWithResponseAsync( } 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)) + .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. @@ -668,19 +547,15 @@ private Mono> getWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -697,22 +572,13 @@ private Mono> getWithResponseAsync( } 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); + 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. @@ -723,15 +589,15 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { + 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. @@ -743,14 +609,14 @@ private Mono getAsync( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + 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. @@ -767,7 +633,7 @@ public ComponentVersionInner get(String resourceGroupName, String workspaceName, /** * 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. @@ -776,23 +642,19 @@ public ComponentVersionInner get(String resourceGroupName, String workspaceName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, ComponentVersionInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, ComponentVersionInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -814,26 +676,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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)) + .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. @@ -843,28 +693,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, - ComponentVersionInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -886,23 +727,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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); + 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. @@ -914,15 +745,15 @@ private Mono> createOrUpdateWithResponseAsync( * @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, ComponentVersionInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + String version, ComponentVersionInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) .flatMap(res -> Mono.justOrEmpty(res.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. @@ -935,19 +766,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ComponentVersionInner body, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, ComponentVersionInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).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. @@ -959,22 +785,284 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body) { + public ComponentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, ComponentVersionInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) .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. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -982,37 +1070,28 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1020,23 +1099,13 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..219e79eb230f1 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 { @@ -22,8 +23,7 @@ public final class ComponentVersionsImpl implements ComponentVersions { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public ComponentVersionsImpl( - ComponentVersionsClient innerClient, + public ComponentVersionsImpl(ComponentVersionsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,27 +31,18 @@ public ComponentVersionsImpl( public PagedIterable list(String resourceGroupName, String workspaceName, String name) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, String stage, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name, + orderBy, top, skip, listViewType, stage, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } @@ -59,15 +50,12 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ComponentVersionImpl(inner.getValue(), this.manager())); } else { return null; @@ -83,136 +71,37 @@ 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 +111,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/ComputeResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java index 26ad7807900da..5cf3b93323bbc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java @@ -13,12 +13,18 @@ import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; import com.azure.resourcemanager.machinelearning.models.Compute; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; import com.azure.resourcemanager.machinelearning.models.ComputeResource; import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; import java.util.Collections; +import java.util.List; import java.util.Map; public final class ComputeResourceImpl implements ComputeResource, ComputeResource.Definition, ComputeResource.Update { @@ -102,20 +108,14 @@ public ComputeResourceImpl withExistingWorkspace(String resourceGroupName, Strin } public ComputeResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getComputes() - .createOrUpdate(resourceGroupName, workspaceName, computeName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getComputes().createOrUpdate(resourceGroupName, workspaceName, + computeName, this.innerModel(), Context.NONE); return this; } public ComputeResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComputes() - .createOrUpdate(resourceGroupName, workspaceName, computeName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getComputes().createOrUpdate(resourceGroupName, workspaceName, + computeName, this.innerModel(), context); return this; } @@ -131,53 +131,47 @@ public ComputeResourceImpl update() { } public ComputeResource apply() { - this.innerObject = - serviceManager - .serviceClient() - .getComputes() - .update(resourceGroupName, workspaceName, computeName, updateParameters, Context.NONE); + this.innerObject = serviceManager.serviceClient().getComputes().update(resourceGroupName, workspaceName, + computeName, updateParameters, Context.NONE); return this; } public ComputeResource apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComputes() - .update(resourceGroupName, workspaceName, computeName, updateParameters, context); + this.innerObject = serviceManager.serviceClient().getComputes().update(resourceGroupName, workspaceName, + computeName, updateParameters, context); return this; } - ComputeResourceImpl( - ComputeResourceInner innerObject, + ComputeResourceImpl(ComputeResourceInner 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.computeName = Utils.getValueFromIdByName(innerObject.id(), "computes"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.computeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "computes"); } public ComputeResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getComputes() - .getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getComputes() + .getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); return this; } public ComputeResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComputes() - .getWithResponse(resourceGroupName, workspaceName, computeName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getComputes() + .getWithResponse(resourceGroupName, workspaceName, computeName, context).getValue(); return this; } + public Response updateCustomServicesWithResponse(List customServices, Context context) { + return serviceManager.computes().updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, + customServices, context); + } + + public void updateCustomServices(List customServices) { + serviceManager.computes().updateCustomServices(resourceGroupName, workspaceName, computeName, customServices); + } + public PagedIterable listNodes() { return serviceManager.computes().listNodes(resourceGroupName, workspaceName, computeName); } @@ -194,6 +188,15 @@ public ComputeSecrets listKeys() { return serviceManager.computes().listKeys(resourceGroupName, workspaceName, computeName); } + public Response updateDataMountsWithResponse(List dataMounts, Context context) { + return serviceManager.computes().updateDataMountsWithResponse(resourceGroupName, workspaceName, computeName, + dataMounts, context); + } + + public void updateDataMounts(List dataMounts) { + serviceManager.computes().updateDataMounts(resourceGroupName, workspaceName, computeName, dataMounts); + } + public void start() { serviceManager.computes().start(resourceGroupName, workspaceName, computeName); } @@ -218,6 +221,32 @@ public void restart(Context context) { serviceManager.computes().restart(resourceGroupName, workspaceName, computeName, context); } + public Response updateIdleShutdownSettingWithResponse(IdleShutdownSetting parameters, Context context) { + return serviceManager.computes().updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, + computeName, parameters, context); + } + + public void updateIdleShutdownSetting(IdleShutdownSetting parameters) { + serviceManager.computes().updateIdleShutdownSetting(resourceGroupName, workspaceName, computeName, parameters); + } + + public Response getAllowedResizeSizesWithResponse(Context context) { + return serviceManager.computes().getAllowedResizeSizesWithResponse(resourceGroupName, workspaceName, + computeName, context); + } + + public VirtualMachineSizeListResult getAllowedResizeSizes() { + return serviceManager.computes().getAllowedResizeSizes(resourceGroupName, workspaceName, computeName); + } + + public void resize(ResizeSchema parameters) { + serviceManager.computes().resize(resourceGroupName, workspaceName, computeName, parameters); + } + + public void resize(ResizeSchema parameters, Context context) { + serviceManager.computes().resize(resourceGroupName, workspaceName, computeName, parameters, context); + } + public ComputeResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java index 217d0a038ed72..8e3217072b0b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java @@ -12,8 +12,7 @@ public final class ComputeSecretsImpl implements ComputeSecrets { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - ComputeSecretsImpl( - ComputeSecretsInner innerObject, + ComputeSecretsImpl(ComputeSecretsInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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..bec9dfbcfc21d 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 @@ -36,250 +36,248 @@ import com.azure.resourcemanager.machinelearning.fluent.ComputesClient; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; import com.azure.resourcemanager.machinelearning.models.AmlComputeNodesInformation; import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; import com.azure.resourcemanager.machinelearning.models.PaginatedComputeResourcesList; +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; import java.nio.ByteBuffer; +import java.util.List; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ComputesClient. */ +/** + * An instance of this class provides access to all the operations defined in ComputesClient. + */ public final class ComputesClientImpl implements ComputesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ComputesService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + 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") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @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}/computes/{computeName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComputeResourceInner parameters, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ComputeResourceInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClusterUpdateParameters parameters, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ClusterUpdateParameters parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, @QueryParam("underlyingResourceAction") UnderlyingResourceAction underlyingResourceAction, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNodes( - @HostParam("$host") String endpoint, + Mono> updateCustomServices(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") List customServices, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") String endpoint, + Mono> listNodes(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start( - @HostParam("$host") String endpoint, + Mono> listKeys(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateDataMounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateDataMounts(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") List dataMounts, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> start(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> stop(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> restart(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop( - @HostParam("$host") String endpoint, + Mono> updateIdleShutdownSetting(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") IdleShutdownSetting parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart") - @ExpectedResponses({202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/getAllowedVmSizesForResize") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart( - @HostParam("$host") String endpoint, + Mono> getAllowedResizeSizes(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/resize") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resize(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ResizeSchema parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNodesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets computes in specified workspace. - * + * * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return computes in specified workspace along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -290,33 +288,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, 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())); } /** * Gets computes in specified workspace. - * + * * @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. @@ -324,23 +305,19 @@ 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 computes in specified workspace along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return computes in specified workspace along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -352,29 +329,15 @@ private Mono> listSinglePageAsync( 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, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + this.client.getApiVersion(), skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets computes in specified workspace. - * + * * @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. @@ -385,14 +348,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets computes in specified 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. @@ -403,14 +365,13 @@ private PagedFlux listAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets computes in specified workspace. - * + * * @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. @@ -421,16 +382,15 @@ private PagedFlux listAsync(String resourceGroupName, Stri * @return computes in specified workspace as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets computes in specified 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. @@ -446,7 +406,7 @@ public PagedIterable list(String resourceGroupName, String /** * Gets computes in specified workspace. - * + * * @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. @@ -457,15 +417,15 @@ public PagedIterable list(String resourceGroupName, String * @return computes in specified workspace as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); } /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -475,19 +435,15 @@ public PagedIterable list( * @return compute definition by its name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -501,25 +457,15 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -530,19 +476,15 @@ private Mono> getWithResponseAsync( * @return compute definition by its name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -556,22 +498,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + computeName, this.client.getApiVersion(), accept, context); } /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -589,7 +523,7 @@ private Mono getAsync(String resourceGroupName, String wor /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -600,15 +534,15 @@ private Mono getAsync(String resourceGroupName, String wor * @return compute definition by its name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, + String computeName, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); } /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -625,7 +559,7 @@ public ComputeResourceInner get(String resourceGroupName, String workspaceName, /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -634,22 +568,18 @@ public ComputeResourceInner get(String resourceGroupName, String workspaceName, * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String computeName, ComputeResourceInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -668,26 +598,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -697,26 +617,18 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String computeName, ComputeResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -735,23 +647,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); } /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -764,22 +667,16 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ComputeResourceInner.class, - ComputeResourceInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ComputeResourceInner.class, ComputeResourceInner.class, this.client.getContext()); } /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -792,24 +689,19 @@ private PollerFlux, ComputeResourceInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, + String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ComputeResourceInner.class, ComputeResourceInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ComputeResourceInner.class, ComputeResourceInner.class, context); } /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -828,7 +720,7 @@ public SyncPoller, ComputeResourceInner> beginC /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -841,20 +733,16 @@ public SyncPoller, ComputeResourceInner> beginC */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, + String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) .getSyncPoller(); } /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -862,21 +750,20 @@ public SyncPoller, ComputeResourceInner> beginC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of {@link - * Mono}. + * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String computeName, ComputeResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -885,25 +772,20 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of {@link - * Mono}. + * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String computeName, ComputeResourceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -914,15 +796,15 @@ private Mono createOrUpdateAsync( * @return machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { + public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, + ComputeResourceInner parameters) { return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); } /** * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -934,19 +816,15 @@ public ComputeResourceInner createOrUpdate( * @return machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context) { + public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, + ComputeResourceInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -955,22 +833,18 @@ public ComputeResourceInner createOrUpdate( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, ClusterUpdateParameters parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -990,25 +864,15 @@ private Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1018,26 +882,18 @@ private Mono>> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, ClusterUpdateParameters parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1056,23 +912,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1085,22 +932,16 @@ private Mono>> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ComputeResourceInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ComputeResourceInner.class, - ComputeResourceInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ComputeResourceInner.class, ComputeResourceInner.class, this.client.getContext()); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1113,24 +954,19 @@ private PollerFlux, ComputeResourceInner> begin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ComputeResourceInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, + String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ComputeResourceInner.class, ComputeResourceInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ComputeResourceInner.class, ComputeResourceInner.class, context); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1141,15 +977,15 @@ private PollerFlux, ComputeResourceInner> begin * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginUpdate( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { + public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, + String workspaceName, String computeName, ClusterUpdateParameters parameters) { return this.beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1161,21 +997,16 @@ public SyncPoller, ComputeResourceInner> beginU * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) + public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, + String workspaceName, String computeName, ClusterUpdateParameters parameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) .getSyncPoller(); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1183,21 +1014,20 @@ public SyncPoller, ComputeResourceInner> beginU * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of {@link - * Mono}. + * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters) - .last() + private Mono updateAsync(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters) { + return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1206,25 +1036,20 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of {@link - * Mono}. + * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1235,15 +1060,15 @@ private Mono updateAsync( * @return machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { + public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters) { return updateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); } /** * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable * operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1255,45 +1080,34 @@ public ComputeResourceInner update( * @return machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context) { + public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters, Context context) { return updateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 computeName, - UnderlyingResourceAction underlyingResourceAction) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1306,36 +1120,25 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); } if (underlyingResourceAction == null) { - return Mono - .error( - new IllegalArgumentException("Parameter underlyingResourceAction is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter underlyingResourceAction 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, - computeName, - this.client.getApiVersion(), - underlyingResourceAction, - accept, - context)) + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), underlyingResourceAction, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1343,23 +1146,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1372,60 +1167,45 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); } if (underlyingResourceAction == null) { - return Mono - .error( - new IllegalArgumentException("Parameter underlyingResourceAction is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter underlyingResourceAction 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, - computeName, - this.client.getApiVersion(), - underlyingResourceAction, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), underlyingResourceAction, accept, context); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 computeName, - UnderlyingResourceAction underlyingResourceAction) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1433,52 +1213,43 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is 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 computeName, - UnderlyingResourceAction underlyingResourceAction) { - return this - .beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction) .getSyncPoller(); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1486,49 +1257,40 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { - return this - .beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context) .getSyncPoller(); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 computeName, + private Mono deleteAsync(String resourceGroupName, String workspaceName, String computeName, UnderlyingResourceAction underlyingResourceAction) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction) - .last() + return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1536,87 +1298,219 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context) - .last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 computeName, + public void delete(String resourceGroupName, String workspaceName, String computeName, UnderlyingResourceAction underlyingResourceAction) { deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).block(); } /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { + public void delete(String resourceGroupName, String workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction, Context context) { deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).block(); } /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * Updates the custom services list. The list of custom services provided shall be overwritten. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync( - String resourceGroupName, String workspaceName, String computeName) { + private Mono> updateCustomServicesWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, List customServices) { if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + .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 (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + if (customServices == null) { + return Mono.error(new IllegalArgumentException("Parameter customServices is required and cannot be null.")); + } else { + customServices.forEach(e -> e.validate()); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateCustomServices(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, + this.client.getApiVersion(), customServices, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> updateCustomServicesWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, List customServices, 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 this.client.getSubscriptionId() is required and cannot be null.")); + .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 (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + if (customServices == null) { + return Mono.error(new IllegalArgumentException("Parameter customServices is required and cannot be null.")); + } else { + customServices.forEach(e -> e.validate()); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateCustomServices(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), customServices, accept, + context); + } + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 updateCustomServicesAsync(String resourceGroupName, String workspaceName, String computeName, + List customServices) { + return updateCustomServicesWithResponseAsync(resourceGroupName, workspaceName, computeName, customServices) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateCustomServicesWithResponse(String resourceGroupName, String workspaceName, + String computeName, List customServices, Context context) { + return updateCustomServicesWithResponseAsync(resourceGroupName, workspaceName, computeName, customServices, + context).block(); + } + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 updateCustomServices(String resourceGroupName, String workspaceName, String computeName, + List customServices) { + updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, customServices, Context.NONE); + } + + /** + * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNodesSinglePageAsync(String resourceGroupName, + String workspaceName, String computeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1630,33 +1524,16 @@ private Mono> listNodesSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listNodes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().nodes(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listNodes(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1664,23 +1541,19 @@ private Mono> listNodesSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { + private Mono> listNodesSinglePageAsync(String resourceGroupName, + String workspaceName, String computeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1695,29 +1568,15 @@ private Mono> listNodesSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listNodes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().nodes(), - res.getValue().nextLink(), - null)); + .listNodes(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + computeName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().nodes(), res.getValue().nextLink(), null)); } /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1725,19 +1584,18 @@ private Mono> listNodesSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync( - String resourceGroupName, String workspaceName, String computeName) { - return new PagedFlux<>( - () -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName), + private PagedFlux listNodesAsync(String resourceGroupName, String workspaceName, + String computeName) { + return new PagedFlux<>(() -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName), nextLink -> listNodesNextSinglePageAsync(nextLink)); } /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1746,19 +1604,18 @@ private PagedFlux listNodesAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return new PagedFlux<>( - () -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName, context), + private PagedFlux listNodesAsync(String resourceGroupName, String workspaceName, + String computeName, Context context) { + return new PagedFlux<>(() -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName, context), nextLink -> listNodesNextSinglePageAsync(nextLink, context)); } /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1766,17 +1623,17 @@ private PagedFlux listNodesAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName) { + public PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName) { return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName)); } /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1785,40 +1642,36 @@ public PagedIterable listNodes( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName, Context context) { + public PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName, Context context) { return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName, context)); } /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response} on successful completion of {@link Mono}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String computeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1832,24 +1685,14 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1857,23 +1700,19 @@ private Mono> listKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response} on successful completion of {@link Mono}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String computeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1887,21 +1726,13 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); + return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), accept, context); } /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1909,18 +1740,18 @@ private Mono> listKeysWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync( - String resourceGroupName, String workspaceName, String computeName) { + private Mono listKeysAsync(String resourceGroupName, String workspaceName, + String computeName) { return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1928,18 +1759,18 @@ private Mono listKeysAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String computeName, Context context) { return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); } /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -1954,30 +1785,27 @@ public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceNa } /** - * Posts a start action to a compute instance. - * + * Update Data Mounts of a Machine Learning compute. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating 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 Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { + private Mono> updateDataMountsWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, List dataMounts) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1989,29 +1817,26 @@ private Mono>> startWithResponseAsync( if (computeName == null) { return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); } + if (dataMounts == null) { + return Mono.error(new IllegalArgumentException("Parameter dataMounts is required and cannot be null.")); + } else { + dataMounts.forEach(e -> e.validate()); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.updateDataMounts(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), dataMounts, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Posts a start action to a compute instance. - * + * Update Data Mounts of a Machine Learning compute. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating 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. @@ -2019,19 +1844,15 @@ private Mono>> startWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { + private Mono> updateDataMountsWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, List dataMounts, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2043,122 +1864,249 @@ private Mono>> startWithResponseAsync( if (computeName == null) { return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); } + if (dataMounts == null) { + return Mono.error(new IllegalArgumentException("Parameter dataMounts is required and cannot be null.")); + } else { + dataMounts.forEach(e -> e.validate()); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); + return service.updateDataMounts(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), dataMounts, accept, context); } /** - * Posts a start action to a compute instance. - * + * Update Data Mounts of a Machine Learning compute. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating 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 long-running operation. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync( - String resourceGroupName, String workspaceName, String computeName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDataMountsAsync(String resourceGroupName, String workspaceName, String computeName, + List dataMounts) { + return updateDataMountsWithResponseAsync(resourceGroupName, workspaceName, computeName, dataMounts) + .flatMap(ignored -> Mono.empty()); } /** - * Posts a start action to a compute instance. - * + * Update Data Mounts of a Machine Learning compute. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating 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 long-running operation. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - startWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateDataMountsWithResponse(String resourceGroupName, String workspaceName, + String computeName, List dataMounts, Context context) { + return updateDataMountsWithResponseAsync(resourceGroupName, workspaceName, computeName, dataMounts, context) + .block(); } /** - * Posts a start action to a compute instance. - * + * Update Data Mounts of a Machine Learning compute. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating 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 long-running operation. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart( - String resourceGroupName, String workspaceName, String computeName) { - return this.beginStartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateDataMounts(String resourceGroupName, String workspaceName, String computeName, + List dataMounts) { + updateDataMountsWithResponse(resourceGroupName, workspaceName, computeName, dataMounts, Context.NONE); } /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return this.beginStartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStartAsync(resourceGroupName, workspaceName, computeName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + private Mono>> startWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, 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 (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), accept, context); + } + + /** + * Posts a start action to a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginStartAsync(String resourceGroupName, String workspaceName, + String computeName) { + Mono>> mono = startWithResponseAsync(resourceGroupName, workspaceName, computeName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Posts a start action to a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> beginStartAsync(String resourceGroupName, String workspaceName, + String computeName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = startWithResponseAsync(resourceGroupName, workspaceName, computeName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Posts a start action to a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginStart(String resourceGroupName, String workspaceName, + String computeName) { + return this.beginStartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); + } + + /** + * Posts a start action to a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginStart(String resourceGroupName, String workspaceName, + String computeName, Context context) { + return this.beginStartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); + } + + /** + * Posts a start action to a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 startAsync(String resourceGroupName, String workspaceName, String computeName) { + return beginStartAsync(resourceGroupName, workspaceName, computeName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Posts a start action to a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2168,14 +2116,13 @@ private Mono startAsync(String resourceGroupName, String workspaceName, St */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStartAsync(resourceGroupName, workspaceName, computeName, context) - .last() + return beginStartAsync(resourceGroupName, workspaceName, computeName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2190,7 +2137,7 @@ public void start(String resourceGroupName, String workspaceName, String compute /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2206,7 +2153,7 @@ public void start(String resourceGroupName, String workspaceName, String compute /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2216,19 +2163,15 @@ public void start(String resourceGroupName, String workspaceName, String compute * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { + private Mono>> stopWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2242,24 +2185,14 @@ private Mono>> stopWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .stop( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2270,19 +2203,15 @@ private Mono>> stopWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { + private Mono>> stopWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2296,21 +2225,13 @@ private Mono>> stopWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .stop( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); + return service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), accept, context); } /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2320,18 +2241,16 @@ private Mono>> stopWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync( - String resourceGroupName, String workspaceName, String computeName) { + private PollerFlux, Void> beginStopAsync(String resourceGroupName, String workspaceName, + String computeName) { Mono>> mono = stopWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2342,19 +2261,18 @@ private PollerFlux, Void> beginStopAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { + private PollerFlux, Void> beginStopAsync(String resourceGroupName, String workspaceName, + String computeName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - stopWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = stopWithResponseAsync(resourceGroupName, workspaceName, computeName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2364,14 +2282,14 @@ private PollerFlux, Void> beginStopAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop( - String resourceGroupName, String workspaceName, String computeName) { + public SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, + String computeName) { return this.beginStopAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); } /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2382,14 +2300,14 @@ public SyncPoller, Void> beginStop( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop( - String resourceGroupName, String workspaceName, String computeName, Context context) { + public SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, + String computeName, Context context) { return this.beginStopAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); } /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2400,14 +2318,13 @@ public SyncPoller, Void> beginStop( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStopAsync(resourceGroupName, workspaceName, computeName) - .last() + return beginStopAsync(resourceGroupName, workspaceName, computeName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2419,14 +2336,13 @@ private Mono stopAsync(String resourceGroupName, String workspaceName, Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStopAsync(resourceGroupName, workspaceName, computeName, context) - .last() + return beginStopAsync(resourceGroupName, workspaceName, computeName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2441,7 +2357,7 @@ public void stop(String resourceGroupName, String workspaceName, String computeN /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2457,7 +2373,7 @@ public void stop(String resourceGroupName, String workspaceName, String computeN /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2467,19 +2383,15 @@ public void stop(String resourceGroupName, String workspaceName, String computeN * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { + private Mono>> restartWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2493,24 +2405,14 @@ private Mono>> restartWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .restart( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2521,19 +2423,15 @@ private Mono>> restartWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { + private Mono>> restartWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2547,21 +2445,13 @@ private Mono>> restartWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .restart( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); + return service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), accept, context); } /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2571,18 +2461,16 @@ private Mono>> restartWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync( - String resourceGroupName, String workspaceName, String computeName) { + private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String workspaceName, + String computeName) { Mono>> mono = restartWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2593,19 +2481,18 @@ private PollerFlux, Void> beginRestartAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { + private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String workspaceName, + String computeName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - restartWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = restartWithResponseAsync(resourceGroupName, workspaceName, computeName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2615,14 +2502,14 @@ private PollerFlux, Void> beginRestartAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart( - String resourceGroupName, String workspaceName, String computeName) { + public SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, + String computeName) { return this.beginRestartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); } /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2633,14 +2520,14 @@ public SyncPoller, Void> beginRestart( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart( - String resourceGroupName, String workspaceName, String computeName, Context context) { + public SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, + String computeName, Context context) { return this.beginRestartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); } /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2651,14 +2538,13 @@ public SyncPoller, Void> beginRestart( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono restartAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginRestartAsync(resourceGroupName, workspaceName, computeName) - .last() + return beginRestartAsync(resourceGroupName, workspaceName, computeName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2669,16 +2555,15 @@ private Mono restartAsync(String resourceGroupName, String workspaceName, * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginRestartAsync(resourceGroupName, workspaceName, computeName, context) - .last() + private Mono restartAsync(String resourceGroupName, String workspaceName, String computeName, + Context context) { + return beginRestartAsync(resourceGroupName, workspaceName, computeName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2693,7 +2578,7 @@ public void restart(String resourceGroupName, String workspaceName, String compu /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -2707,16 +2592,545 @@ public void restart(String resourceGroupName, String workspaceName, String compu restartAsync(resourceGroupName, workspaceName, computeName, context).block(); } + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> updateIdleShutdownSettingWithResponseAsync(String resourceGroupName, + String workspaceName, String computeName, IdleShutdownSetting parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateIdleShutdownSetting(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, + this.client.getApiVersion(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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> updateIdleShutdownSettingWithResponseAsync(String resourceGroupName, + String workspaceName, String computeName, IdleShutdownSetting parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateIdleShutdownSetting(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); + } + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 updateIdleShutdownSettingAsync(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters) { + return updateIdleShutdownSettingWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateIdleShutdownSettingWithResponse(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters, Context context) { + return updateIdleShutdownSettingWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, + context).block(); + } + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 updateIdleShutdownSetting(String resourceGroupName, String workspaceName, String computeName, + IdleShutdownSetting parameters) { + updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, parameters, Context.NONE); + } + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getAllowedResizeSizesWithResponseAsync(String resourceGroupName, String workspaceName, String computeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getAllowedResizeSizes(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAllowedResizeSizesWithResponseAsync( + String resourceGroupName, String workspaceName, String computeName, 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 (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getAllowedResizeSizes(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context); + } + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAllowedResizeSizesAsync(String resourceGroupName, + String workspaceName, String computeName) { + return getAllowedResizeSizesWithResponseAsync(resourceGroupName, workspaceName, computeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAllowedResizeSizesWithResponse(String resourceGroupName, + String workspaceName, String computeName, Context context) { + return getAllowedResizeSizesWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); + } + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VirtualMachineSizeListResultInner getAllowedResizeSizes(String resourceGroupName, String workspaceName, + String computeName) { + return getAllowedResizeSizesWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE) + .getValue(); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resizeWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.resize(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resizeWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (computeName == null) { + return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.resize(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResizeAsync(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters) { + Mono>> mono + = resizeWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResizeAsync(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = resizeWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResize(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters) { + return this.beginResizeAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResize(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters, Context context) { + return this.beginResizeAsync(resourceGroupName, workspaceName, computeName, parameters, context) + .getSyncPoller(); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resizeAsync(String resourceGroupName, String workspaceName, String computeName, + ResizeSchema parameters) { + return beginResizeAsync(resourceGroupName, workspaceName, computeName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resizeAsync(String resourceGroupName, String workspaceName, String computeName, + ResizeSchema parameters, Context context) { + return beginResizeAsync(resourceGroupName, workspaceName, computeName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters) { + resizeAsync(resourceGroupName, workspaceName, computeName, parameters).block(); + } + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters, + Context context) { + resizeAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); + } + /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2724,37 +3138,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -2762,31 +3167,22 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2798,31 +3194,23 @@ private Mono> listNodesNextSinglePageAs return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listNodesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().nodes(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -2830,29 +3218,19 @@ private Mono> listNodesNextSinglePageAs * @return result of AmlCompute Nodes along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listNodesNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNodesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().nodes(), - res.getValue().nextLink(), - null)); + return service.listNodesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().nodes(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java index 9b3cc25f7885b..70e713b5117a9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java @@ -12,11 +12,18 @@ import com.azure.resourcemanager.machinelearning.fluent.ComputesClient; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; import com.azure.resourcemanager.machinelearning.models.ComputeResource; import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; import com.azure.resourcemanager.machinelearning.models.Computes; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; +import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; +import java.util.List; public final class ComputesImpl implements Computes { private static final ClientLogger LOGGER = new ClientLogger(ComputesImpl.class); @@ -25,33 +32,30 @@ public final class ComputesImpl implements Computes { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public ComputesImpl( - ComputesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + public ComputesImpl(ComputesClient 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 ComputeResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return Utils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, computeName, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, computeName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ComputeResourceImpl(inner.getValue(), this.manager())); } else { return null; @@ -67,42 +71,43 @@ public ComputeResource get(String resourceGroupName, String workspaceName, Strin } } - public void delete( - String resourceGroupName, - String workspaceName, - String computeName, + public void delete(String resourceGroupName, String workspaceName, String computeName, UnderlyingResourceAction underlyingResourceAction) { this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction); } - public void delete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { + public void delete(String resourceGroupName, String workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction, Context context) { this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); } - public PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName) { + public Response updateCustomServicesWithResponse(String resourceGroupName, String workspaceName, + String computeName, List customServices, Context context) { + return this.serviceClient().updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, + customServices, context); + } + + public void updateCustomServices(String resourceGroupName, String workspaceName, String computeName, + List customServices) { + this.serviceClient().updateCustomServices(resourceGroupName, workspaceName, computeName, customServices); + } + + public PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName) { return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName); } - public PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName, Context context) { + public PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName, Context context) { return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName, context); } - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String computeName, Context context) { + Response inner + = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ComputeSecretsImpl(inner.getValue(), this.manager())); } else { return null; @@ -118,6 +123,17 @@ public ComputeSecrets listKeys(String resourceGroupName, String workspaceName, S } } + public Response updateDataMountsWithResponse(String resourceGroupName, String workspaceName, + String computeName, List dataMounts, Context context) { + return this.serviceClient().updateDataMountsWithResponse(resourceGroupName, workspaceName, computeName, + dataMounts, context); + } + + public void updateDataMounts(String resourceGroupName, String workspaceName, String computeName, + List dataMounts) { + this.serviceClient().updateDataMounts(resourceGroupName, workspaceName, computeName, dataMounts); + } + public void start(String resourceGroupName, String workspaceName, String computeName) { this.serviceClient().start(resourceGroupName, workspaceName, computeName); } @@ -142,54 +158,83 @@ public void restart(String resourceGroupName, String workspaceName, String compu this.serviceClient().restart(resourceGroupName, workspaceName, computeName, context); } + public Response updateIdleShutdownSettingWithResponse(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters, Context context) { + return this.serviceClient().updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, + parameters, context); + } + + public void updateIdleShutdownSetting(String resourceGroupName, String workspaceName, String computeName, + IdleShutdownSetting parameters) { + this.serviceClient().updateIdleShutdownSetting(resourceGroupName, workspaceName, computeName, parameters); + } + + public Response getAllowedResizeSizesWithResponse(String resourceGroupName, + String workspaceName, String computeName, Context context) { + Response inner = this.serviceClient() + .getAllowedResizeSizesWithResponse(resourceGroupName, workspaceName, computeName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VirtualMachineSizeListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VirtualMachineSizeListResult getAllowedResizeSizes(String resourceGroupName, String workspaceName, + String computeName) { + VirtualMachineSizeListResultInner inner + = this.serviceClient().getAllowedResizeSizes(resourceGroupName, workspaceName, computeName); + if (inner != null) { + return new VirtualMachineSizeListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters) { + this.serviceClient().resize(resourceGroupName, workspaceName, computeName, parameters); + } + + public void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters, + Context context) { + this.serviceClient().resize(resourceGroupName, workspaceName, computeName, parameters, context); + } + public ComputeResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String computeName = Utils.getValueFromIdByName(id, "computes"); + String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes"); if (computeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String computeName = Utils.getValueFromIdByName(id, "computes"); + String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes"); if (computeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, computeName, context); } 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..0054a0389b408 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,33 +49,25 @@ 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; } public DataContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataContainers().createOrUpdate(resourceGroupName, + registryName, name, this.innerModel(), Context.NONE); return this; } public DataContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataContainers().createOrUpdate(resourceGroupName, + registryName, name, this.innerModel(), context); return this; } @@ -90,52 +82,35 @@ public DataContainerImpl update() { } public DataContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataContainers().createOrUpdate(resourceGroupName, + registryName, name, this.innerModel(), Context.NONE); return this; } public DataContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataContainers().createOrUpdate(resourceGroupName, + registryName, name, this.innerModel(), context); return this; } - DataContainerImpl( - DataContainerInner innerObject, + DataContainerImpl(DataContainerInner 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(), "data"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "data"); } public DataContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataContainers() + .getWithResponse(resourceGroupName, registryName, name, Context.NONE).getValue(); return this; } public DataContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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..da5698cee4f57 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 @@ -34,112 +34,92 @@ 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 DataContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in DataContainersClient. + */ public final class DataContainersClientImpl implements DataContainersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DataContainersService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of DataContainersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - DataContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(DataContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface DataContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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/workspaces/{workspaceName}/data/{name}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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); + @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}/data/{name}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/data/{name}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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") DataContainerInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List data 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. @@ -148,22 +128,18 @@ Mono> listNext( * @throws ManagementException 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, ListViewType listViewType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -174,34 +150,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, 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 workspaceName Name of Azure Machine Learning workspace. * @param skip Continuation token for pagination. @@ -211,22 +169,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -238,30 +192,15 @@ private Mono> listSinglePageAsync( 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, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + 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 workspaceName Name of Azure Machine Learning workspace. * @param skip Continuation token for pagination. @@ -272,16 +211,15 @@ private Mono> listSinglePageAsync( * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List data 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. @@ -293,14 +231,13 @@ private PagedFlux listAsync( private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List data 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. @@ -312,16 +249,15 @@ private PagedFlux listAsync(String resourceGroupName, String * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List data 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. @@ -338,7 +274,7 @@ public PagedIterable list(String resourceGroupName, String w /** * List data 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. @@ -350,14 +286,14 @@ public PagedIterable list(String resourceGroupName, String w * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, 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. @@ -369,16 +305,12 @@ public PagedIterable list( @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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -392,24 +324,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } 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)) + .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. @@ -420,19 +342,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -446,21 +364,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -476,7 +386,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -487,14 +397,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).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. @@ -509,7 +419,7 @@ public void delete(String resourceGroupName, String workspaceName, String name) /** * 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. @@ -519,19 +429,15 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -545,24 +451,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(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. @@ -573,19 +469,15 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -599,21 +491,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.get(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. @@ -630,7 +514,7 @@ private Mono getAsync(String resourceGroupName, String works /** * 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. @@ -641,14 +525,14 @@ private Mono getAsync(String resourceGroupName, String works * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return getWithResponseAsync(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. @@ -664,7 +548,7 @@ public DataContainerInner get(String resourceGroupName, String workspaceName, St /** * 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. @@ -672,23 +556,19 @@ public DataContainerInner get(String resourceGroupName, String workspaceName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. + * @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, DataContainerInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, DataContainerInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -707,25 +587,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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)) + .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. @@ -734,23 +603,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, DataContainerInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -769,22 +634,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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); + 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. @@ -795,15 +651,15 @@ private Mono> createOrUpdateWithResponseAsync( * @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, DataContainerInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + DataContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.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. @@ -815,14 +671,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, DataContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).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. @@ -833,21 +689,22 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerInner body) { + public DataContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + DataContainerInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -855,37 +712,28 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -893,23 +741,13 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..c24b2208cad14 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 @@ -22,8 +22,7 @@ public final class DataContainersImpl implements DataContainers { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public DataContainersImpl( - DataContainersClient innerClient, + public DataContainersImpl(DataContainersClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,18 +30,18 @@ public DataContainersImpl( public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } @@ -50,15 +49,12 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DataContainerImpl(inner.getValue(), this.manager())); } else { return null; @@ -74,108 +70,26 @@ 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 +99,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..a2eb0ac9f48f9 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,37 +52,28 @@ 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; } public DataVersionBase create() { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataVersions().createOrUpdate(resourceGroupName, + registryName, name, version, this.innerModel(), Context.NONE); return this; } public DataVersionBase create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataVersions().createOrUpdate(resourceGroupName, + registryName, name, version, this.innerModel(), context); return this; } @@ -94,57 +88,50 @@ public DataVersionBaseImpl update() { } public DataVersionBase apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataVersions().createOrUpdate(resourceGroupName, + registryName, name, version, this.innerModel(), Context.NONE); return this; } public DataVersionBase apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataVersions().createOrUpdate(resourceGroupName, + registryName, name, version, this.innerModel(), context); return this; } - DataVersionBaseImpl( - DataVersionBaseInner innerObject, + DataVersionBaseImpl(DataVersionBaseInner 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(), "data"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "data"); + this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); } public DataVersionBase refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryDataVersions() + .getWithResponse(resourceGroupName, registryName, name, version, Context.NONE).getValue(); return this; } public DataVersionBase refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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..0516acd7df065 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,164 +27,146 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in DataVersionsClient. + */ public final class DataVersionsClientImpl implements DataVersionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DataVersionsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of DataVersionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - DataVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(DataVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface DataVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{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("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @QueryParam("$tags") String tags, @QueryParam("listViewType") ListViewType listViewType, + @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}/data/{name}/versions/{version}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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, - @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); + @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"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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); + @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}/data/{name}/versions/{version}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + 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, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}/publish") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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") DataVersionBaseInner body, - @HeaderParam("Accept") String accept, - Context context); + @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List data versions in the data container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @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 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. + * including/excluding (for example) archived entities. + * @param stage data 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 DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String orderBy, Integer top, String skip, String tags, + ListViewType listViewType, String stage) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -197,77 +180,46 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, tags, + listViewType, 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 data versions in the data container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @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 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. + * including/excluding (for example) archived entities. + * @param stage data 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 DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String orderBy, Integer top, String skip, String tags, + ListViewType listViewType, String stage, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -282,67 +234,41 @@ private Mono> listSinglePageAsync( 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(), - 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(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, + this.client.getApiVersion(), orderBy, top, skip, tags, listViewType, stage, 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 workspaceName Name of Azure Machine Learning workspace. * @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 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. + * including/excluding (for example) archived entities. + * @param stage data 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 DataVersionBase entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, String stage) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, + tags, listViewType, stage), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List data versions in the data container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Data container's name. @@ -358,24 +284,25 @@ private PagedFlux listAsync(String resourceGroupName, Stri final String skip = null; final String tags = null; final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + final String stage = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, + tags, listViewType, stage), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List data versions in the data container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @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 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. + * including/excluding (for example) archived entities. + * @param stage data 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. @@ -383,26 +310,16 @@ private PagedFlux listAsync(String resourceGroupName, Stri * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, String stage, Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, + tags, listViewType, stage, 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 workspaceName Name of Azure Machine Learning workspace. * @param name Data container's name. @@ -418,23 +335,25 @@ public PagedIterable list(String resourceGroupName, String final String skip = null; final String tags = null; final ListViewType listViewType = null; + final String stage = null; return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType)); + listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, stage)); } /** * List data versions in the data container. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @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 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. + * including/excluding (for example) archived entities. + * @param stage data 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. @@ -442,23 +361,16 @@ public PagedIterable list(String resourceGroupName, String * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, String stage, Context context) { return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context)); + listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, 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. @@ -469,19 +381,15 @@ public PagedIterable list( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -498,25 +406,14 @@ private Mono> deleteWithResponseAsync( } 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)) + .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. @@ -528,19 +425,15 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -557,22 +450,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -590,7 +474,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -602,14 +486,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).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. @@ -625,7 +509,7 @@ public void delete(String resourceGroupName, String workspaceName, String name, /** * 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. @@ -636,19 +520,15 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -665,25 +545,14 @@ private Mono> getWithResponseAsync( } 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)) + .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. @@ -695,19 +564,15 @@ private Mono> getWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -724,22 +589,13 @@ private Mono> getWithResponseAsync( } 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); + 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. @@ -750,15 +606,15 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { + 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. @@ -770,14 +626,14 @@ private Mono getAsync( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + 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. @@ -794,7 +650,7 @@ public DataVersionBaseInner get(String resourceGroupName, String workspaceName, /** * 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. @@ -803,23 +659,19 @@ public DataVersionBaseInner get(String resourceGroupName, String workspaceName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, DataVersionBaseInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -841,26 +693,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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)) + .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. @@ -870,28 +710,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, - DataVersionBaseInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -913,23 +744,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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); + 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. @@ -941,15 +762,15 @@ private Mono> createOrUpdateWithResponseAsync( * @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, DataVersionBaseInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + String version, DataVersionBaseInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) .flatMap(res -> Mono.justOrEmpty(res.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. @@ -962,19 +783,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - DataVersionBaseInner body, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, DataVersionBaseInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).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. @@ -986,22 +802,284 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body) { + public DataVersionBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, DataVersionBaseInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) .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. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1009,37 +1087,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1047,23 +1116,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..c522f47722d5f 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 { @@ -22,8 +23,7 @@ public final class DataVersionsImpl implements DataVersions { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public DataVersionsImpl( - DataVersionsClient innerClient, + public DataVersionsImpl(DataVersionsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,28 +31,19 @@ public DataVersionsImpl( public PagedIterable list(String resourceGroupName, String workspaceName, String name) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, String stage, Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context); - return Utils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name, + orderBy, top, skip, tags, listViewType, stage, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } @@ -60,15 +51,12 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DataVersionBaseImpl(inner.getValue(), this.manager())); } else { return null; @@ -84,136 +72,37 @@ 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 +112,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/DatastoreImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java index e1686a7722121..f804aa7e5a740 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java @@ -66,24 +66,14 @@ public DatastoreImpl withExistingWorkspace(String resourceGroupName, String work } public Datastore create() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), createSkipValidation, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDatastores().createOrUpdateWithResponse(resourceGroupName, + workspaceName, name, this.innerModel(), createSkipValidation, Context.NONE).getValue(); return this; } public Datastore create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), createSkipValidation, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDatastores().createOrUpdateWithResponse(resourceGroupName, + workspaceName, name, this.innerModel(), createSkipValidation, context).getValue(); return this; } @@ -100,53 +90,35 @@ public DatastoreImpl update() { } public Datastore apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), updateSkipValidation, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDatastores().createOrUpdateWithResponse(resourceGroupName, + workspaceName, name, this.innerModel(), updateSkipValidation, Context.NONE).getValue(); return this; } public Datastore apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), updateSkipValidation, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDatastores().createOrUpdateWithResponse(resourceGroupName, + workspaceName, name, this.innerModel(), updateSkipValidation, context).getValue(); return this; } - DatastoreImpl( - DatastoreInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + DatastoreImpl(DatastoreInner 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(), "datastores"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "datastores"); } public Datastore refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDatastores() + .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); return this; } public Datastore refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getDatastores() + .getWithResponse(resourceGroupName, workspaceName, name, context).getValue(); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java index e2678170c2311..6237cdaef89ad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java @@ -12,8 +12,7 @@ public final class DatastoreSecretsImpl implements DatastoreSecrets { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - DatastoreSecretsImpl( - DatastoreSecretsInner innerObject, + DatastoreSecretsImpl(DatastoreSecretsInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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..e7cedd18135db 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 @@ -38,134 +38,104 @@ import java.util.stream.Collectors; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DatastoresClient. */ +/** + * An instance of this class provides access to all the operations defined in DatastoresClient. + */ public final class DatastoresClientImpl implements DatastoresClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DatastoresService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of DatastoresClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - DatastoresClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface DatastoresService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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("count") Integer count, - @QueryParam("isDefault") Boolean isDefault, - @QueryParam("names") String names, - @QueryParam("searchText") String searchText, - @QueryParam("orderBy") String orderBy, - @QueryParam("orderByAsc") Boolean orderByAsc, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") - @ExpectedResponses({200, 204}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, + @QueryParam("count") Integer count, @QueryParam("isDefault") Boolean isDefault, + @QueryParam("names") String names, @QueryParam("searchText") String searchText, + @QueryParam("orderBy") String orderBy, @QueryParam("orderByAsc") Boolean orderByAsc, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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); + @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}/datastores/{name}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/datastores/{name}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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, - @QueryParam("skipValidation") Boolean skipValidation, - @BodyParam("application/json") DatastoreInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @QueryParam("skipValidation") Boolean skipValidation, @BodyParam("application/json") DatastoreInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, + Mono> listSecrets(@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); + @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List datastores. - * + * * @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. @@ -179,30 +149,19 @@ Mono> listNext( * @throws ManagementException 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 Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -212,44 +171,20 @@ private Mono> listSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } final String accept = "application/json"; - String namesConverted = - (names == null) - ? null - : names.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); + String namesConverted = (names == null) ? null : names.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")).collect(Collectors.joining(",")); return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - count, - isDefault, - namesConverted, - searchText, - orderBy, - orderByAsc, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), skip, count, isDefault, namesConverted, + searchText, orderBy, orderByAsc, 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 datastores. - * + * * @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. @@ -264,31 +199,19 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, Integer count, Boolean isDefault, List names, String searchText, String orderBy, + Boolean orderByAsc, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -298,41 +221,20 @@ private Mono> listSinglePageAsync( return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } final String accept = "application/json"; - String namesConverted = - (names == null) - ? null - : names.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); + String namesConverted = (names == null) ? null : names.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")).collect(Collectors.joining(",")); context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - count, - isDefault, - namesConverted, - searchText, - orderBy, - orderByAsc, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + this.client.getApiVersion(), skip, count, isDefault, namesConverted, searchText, orderBy, orderByAsc, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List datastores. - * + * * @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. @@ -348,26 +250,15 @@ private Mono> listSinglePageAsync( * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, skip, count, isDefault, names, searchText, orderBy, orderByAsc), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, + names, searchText, orderBy, orderByAsc), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List datastores. - * + * * @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. @@ -384,16 +275,13 @@ private PagedFlux listAsync(String resourceGroupName, String wor final String searchText = null; final String orderBy = null; final Boolean orderByAsc = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, skip, count, isDefault, names, searchText, orderBy, orderByAsc), - nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, + names, searchText, orderBy, orderByAsc), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List datastores. - * + * * @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. @@ -410,36 +298,16 @@ private PagedFlux listAsync(String resourceGroupName, String wor * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - skip, - count, - isDefault, - names, - searchText, - orderBy, - orderByAsc, - context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, + names, searchText, orderBy, orderByAsc, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List datastores. - * + * * @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. @@ -456,14 +324,13 @@ public PagedIterable list(String resourceGroupName, String works final String searchText = null; final String orderBy = null; final Boolean orderByAsc = null; - return new PagedIterable<>( - listAsync( - resourceGroupName, workspaceName, skip, count, isDefault, names, searchText, orderBy, orderByAsc)); + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, isDefault, names, + searchText, orderBy, orderByAsc)); } /** * List datastores. - * + * * @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. @@ -480,34 +347,16 @@ public PagedIterable list(String resourceGroupName, String works * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context) { - return new PagedIterable<>( - listAsync( - resourceGroupName, - workspaceName, - skip, - count, - isDefault, - names, - searchText, - orderBy, - orderByAsc, - context)); + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, isDefault, names, + searchText, orderBy, orderByAsc, context)); } /** * Delete datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -519,16 +368,12 @@ public PagedIterable list( @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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -542,24 +387,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } 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)) + .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 datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -570,19 +405,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -596,21 +427,13 @@ private Mono> deleteWithResponseAsync( } 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); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), accept, context); } /** * Delete datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -626,7 +449,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * Delete datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -637,14 +460,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** * Delete datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -659,7 +482,7 @@ public void delete(String resourceGroupName, String workspaceName, String name) /** * Get datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -669,19 +492,15 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @return datastore along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -695,24 +514,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(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 datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -723,19 +532,15 @@ private Mono> getWithResponseAsync( * @return datastore along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -749,21 +554,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + name, this.client.getApiVersion(), accept, context); } /** * Get datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -780,7 +577,7 @@ private Mono getAsync(String resourceGroupName, String workspace /** * Get datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -791,14 +588,14 @@ private Mono getAsync(String resourceGroupName, String workspace * @return datastore along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** * Get datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -814,7 +611,7 @@ public DatastoreInner get(String resourceGroupName, String workspaceName, String /** * Create or update datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -823,23 +620,19 @@ public DatastoreInner get(String resourceGroupName, String workspaceName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. + * @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, DatastoreInner body, Boolean skipValidation) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, DatastoreInner body, Boolean skipValidation) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -858,26 +651,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - skipValidation, - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, this.client.getApiVersion(), skipValidation, body, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -887,28 +669,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, - DatastoreInner body, - Boolean skipValidation, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, DatastoreInner body, Boolean skipValidation, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -927,23 +700,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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(), - skipValidation, - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), skipValidation, body, accept, context); } /** * Create or update datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -954,8 +717,8 @@ private Mono> createOrUpdateWithResponseAsync( * @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, DatastoreInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + DatastoreInner body) { final Boolean skipValidation = null; return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -963,7 +726,7 @@ private Mono createOrUpdateAsync( /** * Create or update datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -976,20 +739,15 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - DatastoreInner body, - Boolean skipValidation, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, DatastoreInner body, Boolean skipValidation, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation, context) .block(); } /** * Create or update datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -1000,8 +758,8 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DatastoreInner body) { + public DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + DatastoreInner body) { final Boolean skipValidation = null; return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, skipValidation, Context.NONE) .getValue(); @@ -1009,7 +767,7 @@ public DatastoreInner createOrUpdate( /** * Get datastore secrets. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -1019,19 +777,15 @@ public DatastoreInner createOrUpdate( * @return datastore secrets along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { + private Mono> listSecretsWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1045,24 +799,14 @@ private Mono> listSecretsWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listSecrets(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 datastore secrets. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -1073,19 +817,15 @@ private Mono> listSecretsWithResponseAsync( * @return datastore secrets along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + private Mono> listSecretsWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1099,21 +839,13 @@ private Mono> listSecretsWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), accept, context); } /** * Get datastore secrets. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -1130,7 +862,7 @@ private Mono listSecretsAsync(String resourceGroupName, S /** * Get datastore secrets. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -1141,14 +873,14 @@ private Mono listSecretsAsync(String resourceGroupName, S * @return datastore secrets along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response listSecretsWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** * Get datastore secrets. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -1164,14 +896,15 @@ public DatastoreSecretsInner listSecrets(String resourceGroupName, String worksp /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1179,37 +912,28 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1217,23 +941,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java index bc059720b005c..a4d276fa75100 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java @@ -24,47 +24,26 @@ public final class DatastoresImpl implements Datastores { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public DatastoresImpl( - DatastoresClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + public DatastoresImpl(DatastoresClient 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 DatastoreImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, + return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, skip, count, + isDefault, names, searchText, orderBy, orderByAsc, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); + } + + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - resourceGroupName, - workspaceName, - skip, - count, - isDefault, - names, - searchText, - orderBy, - orderByAsc, - context); - return Utils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } @@ -72,15 +51,12 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DatastoreImpl(inner.getValue(), this.manager())); } else { return null; @@ -96,15 +72,12 @@ public Datastore get(String resourceGroupName, String workspaceName, String name } } - public Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); + public Response listSecretsWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + Response inner + = this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DatastoreSecretsImpl(inner.getValue(), this.manager())); } else { return null; @@ -121,105 +94,77 @@ public DatastoreSecrets listSecrets(String resourceGroupName, String workspaceNa } public Datastore getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String name = Utils.getValueFromIdByName(id, "datastores"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String name = Utils.getValueFromIdByName(id, "datastores"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, name, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String name = Utils.getValueFromIdByName(id, "datastores"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); } this.deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String name = Utils.getValueFromIdByName(id, "datastores"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "datastores"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'datastores'.", id))); } return this.deleteWithResponse(resourceGroupName, workspaceName, name, context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java index e3f96c2eabf72..c4e57feffea92 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java @@ -12,8 +12,7 @@ public final class DeploymentLogsImpl implements DeploymentLogs { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - DeploymentLogsImpl( - DeploymentLogsInner innerObject, + DeploymentLogsImpl(DeploymentLogsInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java index 7b4dfe310adac..887a49f6b5cc1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java @@ -13,8 +13,7 @@ public final class DiagnoseResponseResultImpl implements DiagnoseResponseResult private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - DiagnoseResponseResultImpl( - DiagnoseResponseResultInner innerObject, + DiagnoseResponseResultImpl(DiagnoseResponseResultInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java index 5cd99472c86a0..d407a063e1c66 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java @@ -12,8 +12,7 @@ public final class EndpointAuthKeysImpl implements EndpointAuthKeys { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - EndpointAuthKeysImpl( - EndpointAuthKeysInner innerObject, + EndpointAuthKeysImpl(EndpointAuthKeysInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java index 2bb22886310c2..c3b96d3617e53 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java @@ -12,8 +12,7 @@ public final class EndpointAuthTokenImpl implements EndpointAuthToken { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - EndpointAuthTokenImpl( - EndpointAuthTokenInner innerObject, + EndpointAuthTokenImpl(EndpointAuthTokenInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java new file mode 100644 index 0000000000000..536f533beb9ef --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; + +public final class EndpointDeploymentResourcePropertiesBasicResourceImpl implements + EndpointDeploymentResourcePropertiesBasicResource, EndpointDeploymentResourcePropertiesBasicResource.Definition, + EndpointDeploymentResourcePropertiesBasicResource.Update { + private EndpointDeploymentResourcePropertiesBasicResourceInner 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 EndpointDeploymentResourceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public EndpointDeploymentResourcePropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String endpointName; + + private String deploymentName; + + public EndpointDeploymentResourcePropertiesBasicResourceImpl withExistingEndpoint(String resourceGroupName, + String workspaceName, String endpointName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.endpointName = endpointName; + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient().getEndpointDeployments().createOrUpdate(resourceGroupName, + workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient().getEndpointDeployments().createOrUpdate(resourceGroupName, + workspaceName, endpointName, deploymentName, this.innerModel(), context); + return this; + } + + EndpointDeploymentResourcePropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new EndpointDeploymentResourcePropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.deploymentName = name; + } + + public EndpointDeploymentResourcePropertiesBasicResourceImpl update() { + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource apply() { + this.innerObject = serviceManager.serviceClient().getEndpointDeployments().createOrUpdate(resourceGroupName, + workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource apply(Context context) { + this.innerObject = serviceManager.serviceClient().getEndpointDeployments().createOrUpdate(resourceGroupName, + workspaceName, endpointName, deploymentName, this.innerModel(), context); + return this; + } + + EndpointDeploymentResourcePropertiesBasicResourceImpl( + EndpointDeploymentResourcePropertiesBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "endpoints"); + this.deploymentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deployments"); + } + + public EndpointDeploymentResourcePropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient().getEndpointDeployments() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getEndpointDeployments() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context).getValue(); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResourceImpl + withProperties(EndpointDeploymentResourceProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java new file mode 100644 index 0000000000000..de48cf4714cad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java @@ -0,0 +1,1270 @@ +// Copyright (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.EndpointDeploymentsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +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 EndpointDeploymentsClient. + */ +public final class EndpointDeploymentsClientImpl implements EndpointDeploymentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final EndpointDeploymentsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of EndpointDeploymentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EndpointDeploymentsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(EndpointDeploymentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesEndpointDeployments to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface EndpointDeploymentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInWorkspace( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @QueryParam("endpointType") EndpointType endpointType, + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @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}/endpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @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}/endpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @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}/endpoints/{endpointName}/deployments/{deploymentName}") + @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("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EndpointDeploymentResourcePropertiesBasicResourceInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInWorkspaceNext( + @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); + } + + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 all the deployments under the workspace scope along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInWorkspaceSinglePageAsync( + String resourceGroupName, String workspaceName, EndpointType endpointType, 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 (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.getInWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), endpointType, 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())); + } + + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 all the deployments under the workspace scope along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInWorkspaceSinglePageAsync( + String resourceGroupName, String workspaceName, EndpointType endpointType, 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 (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 + .getInWorkspace(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), endpointType, skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 all the deployments under the workspace scope as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + getInWorkspaceAsync(String resourceGroupName, String workspaceName, EndpointType endpointType, String skip) { + return new PagedFlux<>( + () -> getInWorkspaceSinglePageAsync(resourceGroupName, workspaceName, endpointType, skip), + nextLink -> getInWorkspaceNextSinglePageAsync(nextLink)); + } + + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all the deployments under the workspace scope as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + getInWorkspaceAsync(String resourceGroupName, String workspaceName) { + final EndpointType endpointType = null; + final String skip = null; + return new PagedFlux<>( + () -> getInWorkspaceSinglePageAsync(resourceGroupName, workspaceName, endpointType, skip), + nextLink -> getInWorkspaceNextSinglePageAsync(nextLink)); + } + + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 all the deployments under the workspace scope as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getInWorkspaceAsync( + String resourceGroupName, String workspaceName, EndpointType endpointType, String skip, Context context) { + return new PagedFlux<>( + () -> getInWorkspaceSinglePageAsync(resourceGroupName, workspaceName, endpointType, skip, context), + nextLink -> getInWorkspaceNextSinglePageAsync(nextLink, context)); + } + + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + getInWorkspace(String resourceGroupName, String workspaceName) { + final EndpointType endpointType = null; + final String skip = null; + return new PagedIterable<>(getInWorkspaceAsync(resourceGroupName, workspaceName, endpointType, skip)); + } + + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getInWorkspace( + String resourceGroupName, String workspaceName, EndpointType endpointType, String skip, Context context) { + return new PagedIterable<>(getInWorkspaceAsync(resourceGroupName, workspaceName, endpointType, skip, context)); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSinglePageAsync(String resourceGroupName, String workspaceName, String endpointName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, endpointName, 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())); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSinglePageAsync(String resourceGroupName, String workspaceName, String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, + endpointName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String endpointName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName)); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName, context)); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (deploymentName == null) { + return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (deploymentName == null) { + return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, endpointName, deploymentName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).getSyncPoller(); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) + .getSyncPoller(); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { + deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); + } + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (deploymentName == null) { + return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (deploymentName == null) { + return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, + endpointName, deploymentName, this.client.getApiVersion(), accept, context); + } + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); + } + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointDeploymentResourcePropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (deploymentName == null) { + return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, endpointName, deploymentName, this.client.getApiVersion(), body, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (deploymentName == null) { + return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, + endpointName, deploymentName, body, context); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, context); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) + .getSyncPoller(); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + .getSyncPoller(); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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 createOrUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + .last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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 EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, 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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getInWorkspaceNextSinglePageAsync(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.getInWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getInWorkspaceNextSinglePageAsync(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.getInWorkspaceNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body 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/EndpointDeploymentsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java new file mode 100644 index 0000000000000..ca7d6a8129429 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java @@ -0,0 +1,203 @@ +// Copyright (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.EndpointDeploymentsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.EndpointDeployments; +import com.azure.resourcemanager.machinelearning.models.EndpointType; + +public final class EndpointDeploymentsImpl implements EndpointDeployments { + private static final ClientLogger LOGGER = new ClientLogger(EndpointDeploymentsImpl.class); + + private final EndpointDeploymentsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public EndpointDeploymentsImpl(EndpointDeploymentsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName) { + PagedIterable inner + = this.serviceClient().getInWorkspace(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName, EndpointType endpointType, String skip, Context context) { + PagedIterable inner + = this.serviceClient().getInWorkspace(resourceGroupName, workspaceName, endpointType, skip, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); + } + + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EndpointDeploymentResourcePropertiesBasicResource get(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + EndpointDeploymentResourcePropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); + if (inner != null) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointDeploymentResourcePropertiesBasicResource getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); + } + + private EndpointDeploymentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public EndpointDeploymentResourcePropertiesBasicResourceImpl define(String name) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java new file mode 100644 index 0000000000000..193ac92257ec8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.models.AccountApiKeys; +import com.azure.resourcemanager.machinelearning.models.EndpointKeys; + +public final class EndpointKeysImpl implements EndpointKeys { + private EndpointKeysInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + EndpointKeysImpl(EndpointKeysInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public AccountApiKeys keys() { + AccountApiKeysInner inner = this.innerModel().keys(); + if (inner != null) { + return new AccountApiKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointKeysInner 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/EndpointPropertiesBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java index 72da8064892e2..6ed2d488ad9ac 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java @@ -17,8 +17,7 @@ public final class EndpointPropertiesBaseImpl implements EndpointPropertiesBase private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - EndpointPropertiesBaseImpl( - EndpointPropertiesBaseInner innerObject, + EndpointPropertiesBaseImpl(EndpointPropertiesBaseInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java new file mode 100644 index 0000000000000..75e1ba028c72c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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.EndpointResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AccountApiKeys; +import com.azure.resourcemanager.machinelearning.models.EndpointKeys; +import com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; + +public final class EndpointResourcePropertiesBasicResourceImpl implements EndpointResourcePropertiesBasicResource, + EndpointResourcePropertiesBasicResource.Definition, EndpointResourcePropertiesBasicResource.Update { + private EndpointResourcePropertiesBasicResourceInner 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 EndpointResourceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public EndpointResourcePropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String endpointName; + + public EndpointResourcePropertiesBasicResourceImpl withExistingWorkspace(String resourceGroupName, + String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public EndpointResourcePropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient().getEndpoints().createOrUpdate(resourceGroupName, + workspaceName, endpointName, this.innerModel(), Context.NONE); + return this; + } + + public EndpointResourcePropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient().getEndpoints().createOrUpdate(resourceGroupName, + workspaceName, endpointName, this.innerModel(), context); + return this; + } + + EndpointResourcePropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new EndpointResourcePropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.endpointName = name; + } + + public EndpointResourcePropertiesBasicResourceImpl update() { + return this; + } + + public EndpointResourcePropertiesBasicResource apply() { + this.innerObject = serviceManager.serviceClient().getEndpoints().createOrUpdate(resourceGroupName, + workspaceName, endpointName, this.innerModel(), Context.NONE); + return this; + } + + public EndpointResourcePropertiesBasicResource apply(Context context) { + this.innerObject = serviceManager.serviceClient().getEndpoints().createOrUpdate(resourceGroupName, + workspaceName, endpointName, this.innerModel(), context); + return this; + } + + EndpointResourcePropertiesBasicResourceImpl(EndpointResourcePropertiesBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "endpoints"); + } + + public EndpointResourcePropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient().getEndpoints() + .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); + return this; + } + + public EndpointResourcePropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getEndpoints() + .getWithResponse(resourceGroupName, workspaceName, endpointName, context).getValue(); + return this; + } + + public Response listKeysWithResponse(Context context) { + return serviceManager.endpoints().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); + } + + public EndpointKeys listKeys() { + return serviceManager.endpoints().listKeys(resourceGroupName, workspaceName, endpointName); + } + + public Response regenerateKeysWithResponse(RegenerateServiceAccountKeyContent body, + Context context) { + return serviceManager.endpoints().regenerateKeysWithResponse(resourceGroupName, workspaceName, endpointName, + body, context); + } + + public AccountApiKeys regenerateKeys(RegenerateServiceAccountKeyContent body) { + return serviceManager.endpoints().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); + } + + public EndpointResourcePropertiesBasicResourceImpl withProperties(EndpointResourceProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java new file mode 100644 index 0000000000000..f81f47093d376 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java @@ -0,0 +1,1268 @@ +// Copyright (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.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.EndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountModelInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointModels; +import com.azure.resourcemanager.machinelearning.models.EndpointResourcePropertiesBasicResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; +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 EndpointsClient. + */ +public final class EndpointsClientImpl implements EndpointsClient { + /** + * The proxy service used to perform REST calls. + */ + private final EndpointsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of EndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EndpointsClientImpl(AzureMachineLearningServicesImpl client) { + this.service + = RestProxy.create(EndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesEndpoints to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface EndpointsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints") + @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("endpointType") EndpointType endpointType, + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @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}/endpoints/{endpointName}") + @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("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EndpointResourcePropertiesBasicResourceInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/listKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @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}/endpoints/{endpointName}/models") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getModels(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/regenerateKey") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKeys(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RegenerateServiceAccountKeyContent 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); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getModelsNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSinglePageAsync(String resourceGroupName, String workspaceName, EndpointType endpointType, 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 (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(), endpointType, 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 All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, EndpointType endpointType, 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 (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(), endpointType, skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, EndpointType endpointType, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, endpointType, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName) { + final EndpointType endpointType = null; + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, endpointType, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, EndpointType endpointType, String skip, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, endpointType, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName) { + final EndpointType endpointType = null; + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointType, skip)); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, EndpointType endpointType, String skip, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointType, skip, context)); + } + + /** + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, endpointName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, + endpointName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String endpointName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + } + + /** + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointResourcePropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, EndpointResourcePropertiesBasicResourceInner 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, endpointName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, EndpointResourcePropertiesBasicResourceInner 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, endpointName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointResourcePropertiesBasicResourceInner.class, + EndpointResourcePropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointResourcePropertiesBasicResourceInner.class, + EndpointResourcePropertiesBasicResourceInner.class, context); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) + .getSyncPoller(); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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 createOrUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, EndpointResourcePropertiesBasicResourceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, EndpointResourcePropertiesBasicResourceInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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 EndpointResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); + } + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), accept, context); + } + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKeysAsync(String resourceGroupName, String workspaceName, String endpointName) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + } + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { + return listKeysWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getModels(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, 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())); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getModels(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getModelsAsync(String resourceGroupName, String workspaceName, + String endpointName) { + return new PagedFlux<>(() -> getModelsSinglePageAsync(resourceGroupName, workspaceName, endpointName), + nextLink -> getModelsNextSinglePageAsync(nextLink)); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getModelsAsync(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + return new PagedFlux<>(() -> getModelsSinglePageAsync(resourceGroupName, workspaceName, endpointName, context), + nextLink -> getModelsNextSinglePageAsync(nextLink, context)); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName) { + return new PagedIterable<>(getModelsAsync(resourceGroupName, workspaceName, endpointName)); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + return new PagedIterable<>(getModelsAsync(resourceGroupName, workspaceName, endpointName, context)); + } + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> regenerateKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, RegenerateServiceAccountKeyContent 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> regenerateKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, RegenerateServiceAccountKeyContent 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 (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body) { + return regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body, Context context) { + return regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); + } + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccountApiKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateServiceAccountKeyContent body) { + return regenerateKeysWithResponse(resourceGroupName, workspaceName, endpointName, 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 the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsNextSinglePageAsync(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.getModelsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsNextSinglePageAsync(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.getModelsNext(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/EndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java new file mode 100644 index 0000000000000..94c57edac7148 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java @@ -0,0 +1,182 @@ +// Copyright (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.EndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountModelInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AccountApiKeys; +import com.azure.resourcemanager.machinelearning.models.AccountModel; +import com.azure.resourcemanager.machinelearning.models.EndpointKeys; +import com.azure.resourcemanager.machinelearning.models.EndpointResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +import com.azure.resourcemanager.machinelearning.models.Endpoints; +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; + +public final class EndpointsImpl implements Endpoints { + private static final ClientLogger LOGGER = new ClientLogger(EndpointsImpl.class); + + private final EndpointsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public EndpointsImpl(EndpointsClient 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 ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + EndpointType endpointType, String skip, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointType, skip, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointResourcePropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EndpointResourcePropertiesBasicResource get(String resourceGroupName, String workspaceName, + String endpointName) { + EndpointResourcePropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); + if (inner != null) { + return new EndpointResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + Response inner + = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EndpointKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { + EndpointKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, endpointName); + if (inner != null) { + return new EndpointKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable getModels(String resourceGroupName, String workspaceName, String endpointName) { + PagedIterable inner + = this.serviceClient().getModels(resourceGroupName, workspaceName, endpointName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountModelImpl(inner1, this.manager())); + } + + public PagedIterable getModels(String resourceGroupName, String workspaceName, String endpointName, + Context context) { + PagedIterable inner + = this.serviceClient().getModels(resourceGroupName, workspaceName, endpointName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountModelImpl(inner1, this.manager())); + } + + public Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body, Context context) { + Response inner = this.serviceClient().regenerateKeysWithResponse(resourceGroupName, + workspaceName, endpointName, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AccountApiKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AccountApiKeys regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateServiceAccountKeyContent body) { + AccountApiKeysInner inner + = this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); + if (inner != null) { + return new AccountApiKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointResourcePropertiesBasicResource getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, context); + } + + private EndpointsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public EndpointResourcePropertiesBasicResourceImpl define(String name) { + return new EndpointResourcePropertiesBasicResourceImpl(name, this.manager()); + } +} 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..f3935d41cbe31 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,41 +50,33 @@ 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; } public EnvironmentContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), Context.NONE); return this; } public EnvironmentContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), context); return this; } - EnvironmentContainerImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + EnvironmentContainerImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = new EnvironmentContainerInner(); this.serviceManager = serviceManager; - this.name = name; + this.environmentName = name; } public EnvironmentContainerImpl update() { @@ -92,52 +84,35 @@ public EnvironmentContainerImpl update() { } public EnvironmentContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), Context.NONE); return this; } public EnvironmentContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentContainers() + .createOrUpdate(resourceGroupName, registryName, environmentName, this.innerModel(), context); return this; } - EnvironmentContainerImpl( - EnvironmentContainerInner innerObject, + EnvironmentContainerImpl(EnvironmentContainerInner 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(), "environments"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "environments"); } public EnvironmentContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentContainers() + .getWithResponse(resourceGroupName, registryName, environmentName, Context.NONE).getValue(); return this; } public EnvironmentContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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..6ffa7fd5a2eae 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 @@ -34,113 +34,92 @@ 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 EnvironmentContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in EnvironmentContainersClient. + */ public final class EnvironmentContainersClientImpl implements EnvironmentContainersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final EnvironmentContainersService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of EnvironmentContainersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - EnvironmentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy - .create(EnvironmentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + EnvironmentContainersClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(EnvironmentContainersService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * 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}") @ServiceInterface(name = "AzureMachineLearning") public interface EnvironmentContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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/workspaces/{workspaceName}/environments/{name}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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); + @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}/environments/{name}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/environments/{name}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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") EnvironmentContainerInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") EnvironmentContainerInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List environment 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. @@ -149,22 +128,18 @@ Mono> listNext( * @throws ManagementException 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}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip, ListViewType listViewType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -175,34 +150,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, 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 workspaceName Name of Azure Machine Learning workspace. * @param skip Continuation token for pagination. @@ -212,22 +169,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -239,30 +192,15 @@ private Mono> listSinglePageAsync( 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, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + 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 workspaceName Name of Azure Machine Learning workspace. * @param skip Continuation token for pagination. @@ -273,16 +211,15 @@ private Mono> listSinglePageAsync( * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List environment 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. @@ -294,14 +231,13 @@ private PagedFlux listAsync( private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List environment 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. @@ -313,16 +249,15 @@ private PagedFlux listAsync(String resourceGroupName, * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List environment 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. @@ -339,7 +274,7 @@ public PagedIterable list(String resourceGroupName, S /** * List environment 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. @@ -351,14 +286,14 @@ public PagedIterable list(String resourceGroupName, S * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, 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. @@ -370,16 +305,12 @@ public PagedIterable list( @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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -393,24 +324,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } 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)) + .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. @@ -421,19 +342,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -447,21 +364,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -477,7 +386,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -488,14 +397,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).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. @@ -510,7 +419,7 @@ public void delete(String resourceGroupName, String workspaceName, String name) /** * 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. @@ -520,19 +429,15 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -546,24 +451,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(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. @@ -574,19 +469,15 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -600,21 +491,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.get(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. @@ -631,7 +514,7 @@ private Mono getAsync(String resourceGroupName, Strin /** * 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. @@ -642,14 +525,14 @@ private Mono getAsync(String resourceGroupName, Strin * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { return getWithResponseAsync(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. @@ -665,7 +548,7 @@ public EnvironmentContainerInner get(String resourceGroupName, String workspaceN /** * 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. @@ -673,23 +556,19 @@ public EnvironmentContainerInner get(String resourceGroupName, String workspaceN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, EnvironmentContainerInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, EnvironmentContainerInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -708,25 +587,14 @@ private Mono> createOrUpdateWithResponseAsyn } 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)) + .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. @@ -735,23 +603,19 @@ private Mono> createOrUpdateWithResponseAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, EnvironmentContainerInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, EnvironmentContainerInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -770,22 +634,13 @@ private Mono> createOrUpdateWithResponseAsyn } 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); + 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. @@ -796,15 +651,15 @@ private Mono> createOrUpdateWithResponseAsyn * @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, EnvironmentContainerInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, EnvironmentContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.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. @@ -816,14 +671,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String workspaceName, String name, EnvironmentContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).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. @@ -834,21 +689,22 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { + public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + EnvironmentContainerInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -856,37 +712,28 @@ private Mono> listNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -894,23 +741,13 @@ private Mono> listNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..2fc436a988624 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 @@ -22,8 +22,7 @@ public final class EnvironmentContainersImpl implements EnvironmentContainers { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public EnvironmentContainersImpl( - EnvironmentContainersClient innerClient, + public EnvironmentContainersImpl(EnvironmentContainersClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,18 +30,18 @@ public EnvironmentContainersImpl( public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } @@ -50,15 +49,12 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new EnvironmentContainerImpl(inner.getValue(), this.manager())); } else { return null; @@ -74,108 +70,27 @@ 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 +100,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..3c241d4e5f37a 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,42 +50,34 @@ 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; } public EnvironmentVersion create() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentVersions() + .createOrUpdate(resourceGroupName, registryName, environmentName, version, this.innerModel(), Context.NONE); return this; } public EnvironmentVersion create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentVersions() + .createOrUpdate(resourceGroupName, registryName, environmentName, version, this.innerModel(), context); return this; } - EnvironmentVersionImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + EnvironmentVersionImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = new EnvironmentVersionInner(); this.serviceManager = serviceManager; this.version = name; @@ -96,54 +88,36 @@ public EnvironmentVersionImpl update() { } public EnvironmentVersion apply() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentVersions() + .createOrUpdate(resourceGroupName, registryName, environmentName, version, this.innerModel(), Context.NONE); return this; } public EnvironmentVersion apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentVersions() + .createOrUpdate(resourceGroupName, registryName, environmentName, version, this.innerModel(), context); return this; } - EnvironmentVersionImpl( - EnvironmentVersionInner innerObject, + EnvironmentVersionImpl(EnvironmentVersionInner 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(), "environments"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "environments"); + this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); } public EnvironmentVersion refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryEnvironmentVersions() + .getWithResponse(resourceGroupName, registryName, environmentName, version, Context.NONE).getValue(); return this; } public EnvironmentVersion refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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..921e408ccef9c 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,129 +27,118 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in EnvironmentVersionsClient. + */ public final class EnvironmentVersionsClientImpl implements EnvironmentVersionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final EnvironmentVersionsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of EnvironmentVersionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - EnvironmentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(EnvironmentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface EnvironmentVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{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("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, @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}/environments/{name}/versions/{version}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); + @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"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions" - + "/{version}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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); + @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}/environments/{name}/versions" - + "/{version}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + 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, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @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"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions" - + "/{version}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}/publish") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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") EnvironmentVersionInner body, - @HeaderParam("Accept") String accept, - Context context); + @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * 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 Container name. This is case-sensitive. @@ -156,32 +146,24 @@ Mono> listNext( * @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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType, + String stage) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -195,37 +177,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, listViewType, + 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 Container name. This is case-sensitive. @@ -233,34 +195,25 @@ private Mono> listSinglePageAsync( * @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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType, + String stage, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -275,33 +228,15 @@ private Mono> listSinglePageAsync( 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(), - orderBy, - top, - skip, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, + this.client.getApiVersion(), orderBy, top, skip, listViewType, 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 Container name. This is case-sensitive. @@ -309,28 +244,23 @@ private Mono> listSinglePageAsync( * @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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, String stage) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, 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 Container name. This is case-sensitive. @@ -345,14 +275,15 @@ private PagedFlux listAsync(String resourceGroupName, S final Integer top = null; final String skip = null; final ListViewType listViewType = null; + final String stage = null; return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, 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 Container name. This is case-sensitive. @@ -360,6 +291,7 @@ private PagedFlux listAsync(String resourceGroupName, S * @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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -367,24 +299,15 @@ private PagedFlux listAsync(String resourceGroupName, S * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, String stage, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, + listViewType, 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 Container name. This is case-sensitive. @@ -399,12 +322,14 @@ public PagedIterable list(String resourceGroupName, Str final Integer top = null; final String skip = null; final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType)); + final String stage = null; + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, 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 Container name. This is case-sensitive. @@ -412,6 +337,7 @@ public PagedIterable list(String resourceGroupName, Str * @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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -419,22 +345,15 @@ public PagedIterable list(String resourceGroupName, Str * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, String stage, Context context) { return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context)); + listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, 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. @@ -445,19 +364,15 @@ public PagedIterable list( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -474,25 +389,14 @@ private Mono> deleteWithResponseAsync( } 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)) + .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. @@ -504,19 +408,15 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -533,22 +433,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -566,7 +457,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -578,14 +469,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).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. @@ -601,7 +492,7 @@ public void delete(String resourceGroupName, String workspaceName, String name, /** * 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. @@ -612,19 +503,15 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -641,25 +528,14 @@ private Mono> getWithResponseAsync( } 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)) + .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. @@ -671,19 +547,15 @@ private Mono> getWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -700,22 +572,13 @@ private Mono> getWithResponseAsync( } 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); + 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. @@ -726,15 +589,15 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { + 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. @@ -746,14 +609,14 @@ private Mono getAsync( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + 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. @@ -770,7 +633,7 @@ public EnvironmentVersionInner get(String resourceGroupName, String workspaceNam /** * Creates or updates an EnvironmentVersion. - * + * * @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. @@ -779,23 +642,19 @@ public EnvironmentVersionInner get(String resourceGroupName, String workspaceNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, EnvironmentVersionInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, EnvironmentVersionInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -817,26 +676,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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)) + .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())); } /** * Creates or updates an EnvironmentVersion. - * + * * @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. @@ -846,28 +693,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, - EnvironmentVersionInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -889,23 +727,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, version, this.client.getApiVersion(), body, accept, context); } /** * Creates or updates an EnvironmentVersion. - * + * * @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. @@ -917,15 +745,15 @@ private Mono> createOrUpdateWithResponseAsync( * @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, EnvironmentVersionInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, String version, EnvironmentVersionInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates an EnvironmentVersion. - * + * * @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. @@ -938,19 +766,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - EnvironmentVersionInner body, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, EnvironmentVersionInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); } /** * Creates or updates an EnvironmentVersion. - * + * * @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. @@ -962,22 +785,284 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body) { + public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, EnvironmentVersionInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) .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. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -985,37 +1070,28 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1023,23 +1099,13 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..67ccfc0640d5d 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; @@ -22,37 +23,27 @@ public final class EnvironmentVersionsImpl implements EnvironmentVersions { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public EnvironmentVersionsImpl( - EnvironmentVersionsClient innerClient, + public EnvironmentVersionsImpl(EnvironmentVersionsClient 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 EnvironmentVersionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, name); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, String stage, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name, + orderBy, top, skip, listViewType, stage, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } @@ -60,15 +51,12 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new EnvironmentVersionImpl(inner.getValue(), this.manager())); } else { return null; @@ -84,136 +72,37 @@ 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 +112,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/ExportSummaryImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExportSummaryImpl.java new file mode 100644 index 0000000000000..96106e6f38f1a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExportSummaryImpl.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.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.models.ExportSummary; +import java.time.OffsetDateTime; + +public final class ExportSummaryImpl implements ExportSummary { + private ExportSummaryInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + ExportSummaryImpl(ExportSummaryInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public OffsetDateTime endDateTime() { + return this.innerModel().endDateTime(); + } + + public Long exportedRowCount() { + return this.innerModel().exportedRowCount(); + } + + public String labelingJobId() { + return this.innerModel().labelingJobId(); + } + + public OffsetDateTime startDateTime() { + return this.innerModel().startDateTime(); + } + + public ExportSummaryInner 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/ExternalFqdnResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java index 7f27891cd16a6..7a3613e958d92 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java @@ -6,7 +6,7 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; +import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag; import java.util.Collections; import java.util.List; @@ -15,15 +15,14 @@ public final class ExternalFqdnResponseImpl implements ExternalFqdnResponse { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - ExternalFqdnResponseImpl( - ExternalFqdnResponseInner innerObject, + ExternalFqdnResponseImpl(ExternalFqdnResponseInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public List value() { - List inner = this.innerModel().value(); + public List value() { + List inner = this.innerModel().value(); if (inner != null) { return Collections.unmodifiableList(inner); } else { 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..547f0617bbd32 --- /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..89334089e885e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java @@ -0,0 +1,563 @@ +// Copyright (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..1c49e6a836c51 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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..ddcf75c4d8ae3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java @@ -0,0 +1,123 @@ +// Copyright (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 = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = ResourceManagerUtils.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..2c220492186ae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java @@ -0,0 +1,1003 @@ +// Copyright (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..d553b395b8442 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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/PrivateLinkResourceListResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java similarity index 56% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java index 14109bebe8033..274f7f04de241 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java @@ -4,26 +4,24 @@ package com.azure.resourcemanager.machinelearning.implementation; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; +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 PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { - private PrivateLinkResourceListResultInner innerObject; +public final class FeaturesetVersionBackfillResponseImpl implements FeaturesetVersionBackfillResponse { + private FeaturesetVersionBackfillResponseInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - PrivateLinkResourceListResultImpl( - PrivateLinkResourceListResultInner innerObject, + FeaturesetVersionBackfillResponseImpl(FeaturesetVersionBackfillResponseInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public List value() { - List inner = this.innerModel().value(); + public List jobIds() { + List inner = this.innerModel().jobIds(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -31,7 +29,7 @@ public List value() { } } - public PrivateLinkResourceListResultInner innerModel() { + public FeaturesetVersionBackfillResponseInner innerModel() { return this.innerObject; } 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..1db98bd5b2441 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java @@ -0,0 +1,138 @@ +// Copyright (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 = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "featuresets"); + this.version = ResourceManagerUtils.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..60d927aaaffd0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java @@ -0,0 +1,1378 @@ +// Copyright (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..7785bc6ec7905 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java @@ -0,0 +1,205 @@ +// Copyright (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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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..aef32badec3dc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java @@ -0,0 +1,123 @@ +// Copyright (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 = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = ResourceManagerUtils.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..ccdae35952a0f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java @@ -0,0 +1,1013 @@ +// Copyright (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..a2d22e5c20054 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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..e9e6de49bc612 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java @@ -0,0 +1,128 @@ +// Copyright (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 = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "featurestoreEntities"); + this.version = ResourceManagerUtils.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..f7721ae9fc08f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java @@ -0,0 +1,1094 @@ +// Copyright (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..b3120f40c432f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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..a27f24baf480a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.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.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/GroupStatusImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.java new file mode 100644 index 0000000000000..f410ee73d039c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.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.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner; +import com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo; +import com.azure.resourcemanager.machinelearning.models.GroupStatus; + +public final class GroupStatusImpl implements GroupStatus { + private GroupStatusInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + GroupStatusImpl(GroupStatusInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ActualCapacityInfo actualCapacityInfo() { + return this.innerModel().actualCapacityInfo(); + } + + public Integer bonusExtraCapacity() { + return this.innerModel().bonusExtraCapacity(); + } + + public Integer endpointCount() { + return this.innerModel().endpointCount(); + } + + public Integer requestedCapacity() { + return this.innerModel().requestedCapacity(); + } + + public GroupStatusInner 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/InferenceEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.java new file mode 100644 index 0000000000000..25844d5e4f51d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.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.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.InferenceEndpointInner; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpoint; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class InferenceEndpointImpl + implements InferenceEndpoint, InferenceEndpoint.Definition, InferenceEndpoint.Update { + private InferenceEndpointInner 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 InferenceEndpointProperties properties() { + return this.innerModel().properties(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InferenceEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String poolName; + + private String endpointName; + + public InferenceEndpointImpl withExistingInferencePool(String resourceGroupName, String workspaceName, + String poolName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.poolName = poolName; + return this; + } + + public InferenceEndpoint create() { + this.innerObject = serviceManager.serviceClient().getInferenceEndpoints().createOrUpdate(resourceGroupName, + workspaceName, poolName, endpointName, this.innerModel(), Context.NONE); + return this; + } + + public InferenceEndpoint create(Context context) { + this.innerObject = serviceManager.serviceClient().getInferenceEndpoints().createOrUpdate(resourceGroupName, + workspaceName, poolName, endpointName, this.innerModel(), context); + return this; + } + + InferenceEndpointImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new InferenceEndpointInner(); + this.serviceManager = serviceManager; + this.endpointName = name; + } + + public InferenceEndpointImpl update() { + return this; + } + + public InferenceEndpoint apply() { + this.innerObject = serviceManager.serviceClient().getInferenceEndpoints().createOrUpdate(resourceGroupName, + workspaceName, poolName, endpointName, this.innerModel(), Context.NONE); + return this; + } + + public InferenceEndpoint apply(Context context) { + this.innerObject = serviceManager.serviceClient().getInferenceEndpoints().createOrUpdate(resourceGroupName, + workspaceName, poolName, endpointName, this.innerModel(), context); + return this; + } + + InferenceEndpointImpl(InferenceEndpointInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "inferencePools"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "endpoints"); + } + + public InferenceEndpoint refresh() { + this.innerObject = serviceManager.serviceClient().getInferenceEndpoints() + .getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, Context.NONE).getValue(); + return this; + } + + public InferenceEndpoint refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getInferenceEndpoints() + .getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, context).getValue(); + return this; + } + + public InferenceEndpointImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public InferenceEndpointImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public InferenceEndpointImpl withProperties(InferenceEndpointProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public InferenceEndpointImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public InferenceEndpointImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public InferenceEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public InferenceEndpointImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java new file mode 100644 index 0000000000000..e3153e22fb73b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java @@ -0,0 +1,1334 @@ +// Copyright (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.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.InferenceEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpointTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.OrderString; +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 InferenceEndpointsClient. + */ +public final class InferenceEndpointsClientImpl implements InferenceEndpointsClient { + /** + * The proxy service used to perform REST calls. + */ + private final InferenceEndpointsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of InferenceEndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InferenceEndpointsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(InferenceEndpointsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesInferenceEndpoints to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface InferenceEndpointsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @QueryParam("api-version") String apiVersion, + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @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("poolName") String poolName, @PathParam("endpointName") String endpointName, + @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}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") Object body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @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("poolName") String poolName, @PathParam("endpointName") String endpointName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") InferenceEndpointInner 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 Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceEndpoint entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String poolName, Integer count, String skip, String tags, String properties, + OrderString orderBy) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName 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, poolName, this.client.getApiVersion(), count, skip, tags, properties, + orderBy, 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 Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceEndpoint entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String poolName, Integer count, String skip, String tags, String properties, + OrderString orderBy, 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName 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, + poolName, this.client.getApiVersion(), count, skip, tags, properties, orderBy, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String poolName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy)); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy, context)); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, + String poolName, String endpointName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, poolName, endpointName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, + String poolName, String endpointName, 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, poolName, endpointName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, + String poolName, String endpointName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, + String poolName, String endpointName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, + String poolName, String endpointName) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, poolName, endpointName).getSyncPoller(); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, + String poolName, String endpointName, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, poolName, endpointName, context).getSyncPoller(); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, + String endpointName) { + return beginDeleteAsync(resourceGroupName, workspaceName, poolName, endpointName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, String endpointName, + Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, poolName, endpointName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, String endpointName) { + deleteAsync(resourceGroupName, workspaceName, poolName, endpointName).block(); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, String endpointName, + Context context) { + deleteAsync(resourceGroupName, workspaceName, poolName, endpointName, context).block(); + } + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 inferenceEndpoint along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String endpointName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, poolName, endpointName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 inferenceEndpoint along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String endpointName, 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, + poolName, endpointName, this.client.getApiVersion(), accept, context); + } + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 inferenceEndpoint on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String poolName, + String endpointName) { + return getWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 inferenceEndpoint along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String poolName, String endpointName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName, context).block(); + } + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 inferenceEndpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceEndpointInner get(String resourceGroupName, String workspaceName, String poolName, + String endpointName) { + return getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, Context.NONE).getValue(); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String poolName, String endpointName, Object 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, poolName, endpointName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String endpointName, Object 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, poolName, endpointName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, InferenceEndpointInner> beginUpdateAsync( + String resourceGroupName, String workspaceName, String poolName, String endpointName, Object body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InferenceEndpointInner.class, InferenceEndpointInner.class, + this.client.getContext()); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferenceEndpointInner> beginUpdateAsync( + String resourceGroupName, String workspaceName, String poolName, String endpointName, Object body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InferenceEndpointInner.class, InferenceEndpointInner.class, context); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, InferenceEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, Object body) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body).getSyncPoller(); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, Object body, Context context) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body, context) + .getSyncPoller(); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String poolName, + String endpointName, Object body) { + return beginUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Object body, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceEndpointInner update(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Object body) { + return updateAsync(resourceGroupName, workspaceName, poolName, endpointName, body).block(); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceEndpointInner update(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Object body, Context context) { + return updateAsync(resourceGroupName, workspaceName, poolName, endpointName, body, context).block(); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String poolName, String endpointName, InferenceEndpointInner 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, poolName, endpointName, this.client.getApiVersion(), body, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String poolName, String endpointName, InferenceEndpointInner 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (endpointName == null) { + return Mono.error(new IllegalArgumentException("Parameter endpointName 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, poolName, endpointName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, InferenceEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String poolName, String endpointName, + InferenceEndpointInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InferenceEndpointInner.class, InferenceEndpointInner.class, + this.client.getContext()); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferenceEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String poolName, String endpointName, + InferenceEndpointInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InferenceEndpointInner.class, InferenceEndpointInner.class, context); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, InferenceEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String poolName, String endpointName, + InferenceEndpointInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body) + .getSyncPoller(); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String poolName, String endpointName, + InferenceEndpointInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body, context) + .getSyncPoller(); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String poolName, String endpointName, InferenceEndpointInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String poolName, String endpointName, InferenceEndpointInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String endpointName, InferenceEndpointInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body).block(); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body InferenceEndpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String endpointName, InferenceEndpointInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, 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 InferenceEndpoint 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 InferenceEndpoint 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/InferenceEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java new file mode 100644 index 0000000000000..70de85082600e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java @@ -0,0 +1,204 @@ +// Copyright (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.InferenceEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpoint; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpoints; +import com.azure.resourcemanager.machinelearning.models.OrderString; + +public final class InferenceEndpointsImpl implements InferenceEndpoints { + private static final ClientLogger LOGGER = new ClientLogger(InferenceEndpointsImpl.class); + + private final InferenceEndpointsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public InferenceEndpointsImpl(InferenceEndpointsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferenceEndpointImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, + poolName, count, skip, tags, properties, orderBy, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferenceEndpointImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName) { + this.serviceClient().delete(resourceGroupName, workspaceName, poolName, endpointName); + } + + public void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, poolName, endpointName, context); + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InferenceEndpointImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public InferenceEndpoint get(String resourceGroupName, String workspaceName, String poolName, String endpointName) { + InferenceEndpointInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, poolName, endpointName); + if (inner != null) { + return new InferenceEndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public InferenceEndpoint update(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Object body) { + InferenceEndpointInner inner + = this.serviceClient().update(resourceGroupName, workspaceName, poolName, endpointName, body); + if (inner != null) { + return new InferenceEndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public InferenceEndpoint update(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Object body, Context context) { + InferenceEndpointInner inner + = this.serviceClient().update(resourceGroupName, workspaceName, poolName, endpointName, body, context); + if (inner != null) { + return new InferenceEndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public InferenceEndpoint getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + this.delete(resourceGroupName, workspaceName, poolName, endpointName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + this.delete(resourceGroupName, workspaceName, poolName, endpointName, context); + } + + private InferenceEndpointsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public InferenceEndpointImpl define(String name) { + return new InferenceEndpointImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java new file mode 100644 index 0000000000000..1f4eb38c961fe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java @@ -0,0 +1,224 @@ +// Copyright (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.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import com.azure.resourcemanager.machinelearning.models.GroupStatus; +import com.azure.resourcemanager.machinelearning.models.InferenceGroup; +import com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class InferenceGroupImpl implements InferenceGroup, InferenceGroup.Definition, InferenceGroup.Update { + private InferenceGroupInner 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 InferenceGroupProperties properties() { + return this.innerModel().properties(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InferenceGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String poolName; + + private String groupName; + + private PartialMinimalTrackedResourceWithSku updateBody; + + public InferenceGroupImpl withExistingInferencePool(String resourceGroupName, String workspaceName, + String poolName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.poolName = poolName; + return this; + } + + public InferenceGroup create() { + this.innerObject = serviceManager.serviceClient().getInferenceGroups().createOrUpdate(resourceGroupName, + workspaceName, poolName, groupName, this.innerModel(), Context.NONE); + return this; + } + + public InferenceGroup create(Context context) { + this.innerObject = serviceManager.serviceClient().getInferenceGroups().createOrUpdate(resourceGroupName, + workspaceName, poolName, groupName, this.innerModel(), context); + return this; + } + + InferenceGroupImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new InferenceGroupInner(); + this.serviceManager = serviceManager; + this.groupName = name; + } + + public InferenceGroupImpl update() { + this.updateBody = new PartialMinimalTrackedResourceWithSku(); + return this; + } + + public InferenceGroup apply() { + this.innerObject = serviceManager.serviceClient().getInferenceGroups().update(resourceGroupName, workspaceName, + poolName, groupName, updateBody, Context.NONE); + return this; + } + + public InferenceGroup apply(Context context) { + this.innerObject = serviceManager.serviceClient().getInferenceGroups().update(resourceGroupName, workspaceName, + poolName, groupName, updateBody, context); + return this; + } + + InferenceGroupImpl(InferenceGroupInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "inferencePools"); + this.groupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "groups"); + } + + public InferenceGroup refresh() { + this.innerObject = serviceManager.serviceClient().getInferenceGroups() + .getWithResponse(resourceGroupName, workspaceName, poolName, groupName, Context.NONE).getValue(); + return this; + } + + public InferenceGroup refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getInferenceGroups() + .getWithResponse(resourceGroupName, workspaceName, poolName, groupName, context).getValue(); + return this; + } + + public Response getStatusWithResponse(Context context) { + return serviceManager.inferenceGroups().getStatusWithResponse(resourceGroupName, workspaceName, poolName, + groupName, context); + } + + public GroupStatus getStatus() { + return serviceManager.inferenceGroups().getStatus(resourceGroupName, workspaceName, poolName, groupName); + } + + public InferenceGroupImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public InferenceGroupImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public InferenceGroupImpl withProperties(InferenceGroupProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public InferenceGroupImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public InferenceGroupImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public InferenceGroupImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public InferenceGroupImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public InferenceGroupImpl 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/InferenceGroupsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java new file mode 100644 index 0000000000000..d9a505d84286e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java @@ -0,0 +1,1773 @@ +// Copyright (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.InferenceGroupsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.models.InferenceGroupTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; +import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; +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 InferenceGroupsClient. + */ +public final class InferenceGroupsClientImpl implements InferenceGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final InferenceGroupsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of InferenceGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InferenceGroupsClientImpl(AzureMachineLearningServicesImpl client) { + this.service + = RestProxy.create(InferenceGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesInferenceGroups to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface InferenceGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @QueryParam("api-version") String apiVersion, + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @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("poolName") String poolName, @PathParam("groupName") String groupName, + @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}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @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("poolName") String poolName, @PathParam("groupName") String groupName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") InferenceGroupInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getStatus(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @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}/inferencePools/{poolName}/groups/{groupName}/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkus(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @QueryParam("api-version") String apiVersion, @QueryParam("count") Integer count, + @QueryParam("$skip") String skip, @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); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkusNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceGroup entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String poolName, Integer count, String skip, String tags, String properties, OrderString orderBy) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName 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, poolName, this.client.getApiVersion(), count, skip, tags, properties, + orderBy, 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 Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceGroup entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String poolName, Integer count, String skip, String tags, String properties, OrderString orderBy, + 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName 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, + poolName, this.client.getApiVersion(), count, skip, tags, properties, orderBy, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String poolName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy)); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy, context)); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, + String poolName, String groupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, groupName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, + String poolName, String groupName, 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, poolName, groupName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, + String poolName, String groupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, + String poolName, String groupName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, + String poolName, String groupName) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, poolName, groupName).getSyncPoller(); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, + String poolName, String groupName, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, poolName, groupName, context).getSyncPoller(); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, String groupName) { + return beginDeleteAsync(resourceGroupName, workspaceName, poolName, groupName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, String groupName, + Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, poolName, groupName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, String groupName) { + deleteAsync(resourceGroupName, workspaceName, poolName, groupName).block(); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, String groupName, + Context context) { + deleteAsync(resourceGroupName, workspaceName, poolName, groupName, context).block(); + } + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 inferenceGroup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, groupName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 inferenceGroup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + poolName, groupName, this.client.getApiVersion(), accept, context); + } + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 inferenceGroup on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + return getWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 inferenceGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String poolName, String groupName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, context).block(); + } + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 inferenceGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceGroupInner get(String resourceGroupName, String workspaceName, String poolName, String groupName) { + return getWithResponse(resourceGroupName, workspaceName, poolName, groupName, Context.NONE).getValue(); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String poolName, String groupName, PartialMinimalTrackedResourceWithSku 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName 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, + workspaceName, poolName, groupName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, PartialMinimalTrackedResourceWithSku 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName 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, + workspaceName, poolName, groupName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, InferenceGroupInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferenceGroupInner.class, InferenceGroupInner.class, this.client.getContext()); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferenceGroupInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferenceGroupInner.class, InferenceGroupInner.class, context); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, InferenceGroupInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body).getSyncPoller(); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceGroupInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body, + Context context) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body, context) + .getSyncPoller(); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String poolName, + String groupName, PartialMinimalTrackedResourceWithSku body) { + return beginUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, PartialMinimalTrackedResourceWithSku body, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceGroupInner update(String resourceGroupName, String workspaceName, String poolName, String groupName, + PartialMinimalTrackedResourceWithSku body) { + return updateAsync(resourceGroupName, workspaceName, poolName, groupName, body).block(); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceGroupInner update(String resourceGroupName, String workspaceName, String poolName, String groupName, + PartialMinimalTrackedResourceWithSku body, Context context) { + return updateAsync(resourceGroupName, workspaceName, poolName, groupName, body, context).block(); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String poolName, String groupName, InferenceGroupInner 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName 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, poolName, groupName, this.client.getApiVersion(), body, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, InferenceGroupInner 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName 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, poolName, groupName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, InferenceGroupInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String poolName, String groupName, InferenceGroupInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferenceGroupInner.class, InferenceGroupInner.class, this.client.getContext()); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferenceGroupInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String poolName, String groupName, InferenceGroupInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferenceGroupInner.class, InferenceGroupInner.class, context); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, InferenceGroupInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String poolName, String groupName, InferenceGroupInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body) + .getSyncPoller(); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceGroupInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String poolName, String groupName, InferenceGroupInner body, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body, context) + .getSyncPoller(); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String poolName, String groupName, InferenceGroupInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, InferenceGroupInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferenceGroupInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String groupName, InferenceGroupInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body).block(); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup name. + * @param body InferenceGroup entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceGroupInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String groupName, InferenceGroupInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body, context).block(); + } + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStatusWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, groupName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStatusWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, 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 (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, poolName, groupName, this.client.getApiVersion(), accept, context); + } + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getStatusAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + return getStatusWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getStatusWithResponse(String resourceGroupName, String workspaceName, + String poolName, String groupName, Context context) { + return getStatusWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, context).block(); + } + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GroupStatusInner getStatus(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + return getStatusWithResponse(resourceGroupName, workspaceName, poolName, groupName, Context.NONE).getValue(); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusSinglePageAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, Integer count, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, groupName, this.client.getApiVersion(), count, 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 Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusSinglePageAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, Integer count, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + poolName, groupName, this.client.getApiVersion(), count, skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip) { + return new PagedFlux<>( + () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, poolName, groupName, count, skip), + nextLink -> listSkusNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group 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 SkuResource entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + final Integer count = null; + final String skip = null; + return new PagedFlux<>( + () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, poolName, groupName, count, skip), + nextLink -> listSkusNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip, Context context) { + return new PagedFlux<>( + () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, poolName, groupName, count, skip, context), + nextLink -> listSkusNextSinglePageAsync(nextLink, context)); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group 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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + final Integer count = null; + final String skip = null; + return new PagedIterable<>(listSkusAsync(resourceGroupName, workspaceName, poolName, groupName, count, skip)); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip, Context context) { + return new PagedIterable<>( + listSkusAsync(resourceGroupName, workspaceName, poolName, groupName, count, skip, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceGroup 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 InferenceGroup 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)); + } + + /** + * 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 SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusNextSinglePageAsync(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.listSkusNext(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 SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusNextSinglePageAsync(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.listSkusNext(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/InferenceGroupsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java new file mode 100644 index 0000000000000..a03fa212c9128 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java @@ -0,0 +1,220 @@ +// Copyright (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.InferenceGroupsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.models.GroupStatus; +import com.azure.resourcemanager.machinelearning.models.InferenceGroup; +import com.azure.resourcemanager.machinelearning.models.InferenceGroups; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.SkuResource; + +public final class InferenceGroupsImpl implements InferenceGroups { + private static final ClientLogger LOGGER = new ClientLogger(InferenceGroupsImpl.class); + + private final InferenceGroupsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public InferenceGroupsImpl(InferenceGroupsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferenceGroupImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, poolName, + count, skip, tags, properties, orderBy, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferenceGroupImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String poolName, String groupName) { + this.serviceClient().delete(resourceGroupName, workspaceName, poolName, groupName); + } + + public void delete(String resourceGroupName, String workspaceName, String poolName, String groupName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, poolName, groupName, context); + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, poolName, groupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InferenceGroupImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public InferenceGroup get(String resourceGroupName, String workspaceName, String poolName, String groupName) { + InferenceGroupInner inner = this.serviceClient().get(resourceGroupName, workspaceName, poolName, groupName); + if (inner != null) { + return new InferenceGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getStatusWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context) { + Response inner = this.serviceClient().getStatusWithResponse(resourceGroupName, workspaceName, + poolName, groupName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GroupStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public GroupStatus getStatus(String resourceGroupName, String workspaceName, String poolName, String groupName) { + GroupStatusInner inner = this.serviceClient().getStatus(resourceGroupName, workspaceName, poolName, groupName); + if (inner != null) { + return new GroupStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + PagedIterable inner + = this.serviceClient().listSkus(resourceGroupName, workspaceName, poolName, groupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); + } + + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip, Context context) { + PagedIterable inner = this.serviceClient().listSkus(resourceGroupName, workspaceName, + poolName, groupName, count, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); + } + + public InferenceGroup getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "groups"); + if (groupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'groups'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, poolName, groupName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "groups"); + if (groupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'groups'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, poolName, groupName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "groups"); + if (groupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'groups'.", id))); + } + this.delete(resourceGroupName, workspaceName, poolName, groupName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "groups"); + if (groupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'groups'.", id))); + } + this.delete(resourceGroupName, workspaceName, poolName, groupName, context); + } + + private InferenceGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public InferenceGroupImpl define(String name) { + return new InferenceGroupImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java new file mode 100644 index 0000000000000..23edfdce40983 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.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.Response; +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.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.models.InferencePool; +import com.azure.resourcemanager.machinelearning.models.InferencePoolProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.PoolStatus; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class InferencePoolImpl implements InferencePool, InferencePool.Definition, InferencePool.Update { + private InferencePoolInner 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 InferencePoolProperties properties() { + return this.innerModel().properties(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InferencePoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String inferencePoolName; + + private PartialMinimalTrackedResourceWithSkuAndIdentity updateBody; + + public InferencePoolImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public InferencePool create() { + this.innerObject = serviceManager.serviceClient().getInferencePools().createOrUpdate(resourceGroupName, + workspaceName, inferencePoolName, this.innerModel(), Context.NONE); + return this; + } + + public InferencePool create(Context context) { + this.innerObject = serviceManager.serviceClient().getInferencePools().createOrUpdate(resourceGroupName, + workspaceName, inferencePoolName, this.innerModel(), context); + return this; + } + + InferencePoolImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new InferencePoolInner(); + this.serviceManager = serviceManager; + this.inferencePoolName = name; + } + + public InferencePoolImpl update() { + this.updateBody = new PartialMinimalTrackedResourceWithSkuAndIdentity(); + return this; + } + + public InferencePool apply() { + this.innerObject = serviceManager.serviceClient().getInferencePools().update(resourceGroupName, workspaceName, + inferencePoolName, updateBody, Context.NONE); + return this; + } + + public InferencePool apply(Context context) { + this.innerObject = serviceManager.serviceClient().getInferencePools().update(resourceGroupName, workspaceName, + inferencePoolName, updateBody, context); + return this; + } + + InferencePoolImpl(InferencePoolInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.inferencePoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "inferencePools"); + } + + public InferencePool refresh() { + this.innerObject = serviceManager.serviceClient().getInferencePools() + .getWithResponse(resourceGroupName, workspaceName, inferencePoolName, Context.NONE).getValue(); + return this; + } + + public InferencePool refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getInferencePools() + .getWithResponse(resourceGroupName, workspaceName, inferencePoolName, context).getValue(); + return this; + } + + public Response getStatusWithResponse(Context context) { + return serviceManager.inferencePools().getStatusWithResponse(resourceGroupName, workspaceName, + inferencePoolName, context); + } + + public PoolStatus getStatus() { + return serviceManager.inferencePools().getStatus(resourceGroupName, workspaceName, inferencePoolName); + } + + public InferencePoolImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public InferencePoolImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public InferencePoolImpl withProperties(InferencePoolProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public InferencePoolImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public InferencePoolImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public InferencePoolImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public InferencePoolImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public InferencePoolImpl withIdentity(PartialManagedServiceIdentity identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public InferencePoolImpl 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/InferencePoolsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java new file mode 100644 index 0000000000000..655b7fd2da037 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java @@ -0,0 +1,1684 @@ +// Copyright (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.InferencePoolsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PoolStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.models.InferencePoolTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; +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 InferencePoolsClient. + */ +public final class InferencePoolsClientImpl implements InferencePoolsClient { + /** + * The proxy service used to perform REST calls. + */ + private final InferencePoolsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of InferencePoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InferencePoolsClientImpl(AzureMachineLearningServicesImpl client) { + this.service + = RestProxy.create(InferencePoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesInferencePools to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface InferencePoolsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools") + @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("count") Integer count, + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @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("inferencePoolName") String inferencePoolName, @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}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSkuAndIdentity body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @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("inferencePoolName") String inferencePoolName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") InferencePoolInner body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getStatus(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @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}/inferencePools/{inferencePoolName}/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkus(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @QueryParam("api-version") String apiVersion, + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @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); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkusNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferencePool entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + Integer count, String skip, String tags, String properties, OrderString orderBy) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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(), count, skip, tags, properties, orderBy, + 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 InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferencePool entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + Integer count, String skip, String tags, String properties, OrderString orderBy, 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(), count, skip, tags, properties, orderBy, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferencePool entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, + String skip, String tags, String properties, OrderString orderBy) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, tags, properties, orderBy), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List InferencePools. + * + * @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 InferencePool entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, tags, properties, orderBy), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferencePool entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, + String skip, String tags, String properties, OrderString orderBy, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, tags, + properties, orderBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List InferencePools. + * + * @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 InferencePool entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip, tags, properties, orderBy)); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferencePool entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, + String skip, String tags, String properties, OrderString orderBy, Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, count, skip, tags, properties, orderBy, context)); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 inferencePoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName 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, inferencePoolName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 inferencePoolName, 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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName 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, inferencePoolName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 inferencePoolName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 inferencePoolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 inferencePoolName) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, inferencePoolName).getSyncPoller(); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 inferencePoolName, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, inferencePoolName, context).getSyncPoller(); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 inferencePoolName) { + return beginDeleteAsync(resourceGroupName, workspaceName, inferencePoolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 inferencePoolName, + Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, inferencePoolName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 inferencePoolName) { + deleteAsync(resourceGroupName, workspaceName, inferencePoolName).block(); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 inferencePoolName, Context context) { + deleteAsync(resourceGroupName, workspaceName, inferencePoolName, context).block(); + } + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String inferencePoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName 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, inferencePoolName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, 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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName 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, + inferencePoolName, this.client.getApiVersion(), accept, context); + } + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String inferencePoolName) { + return getWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName, context).block(); + } + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferencePoolInner get(String resourceGroupName, String workspaceName, String inferencePoolName) { + return getWithResponse(resourceGroupName, workspaceName, inferencePoolName, Context.NONE).getValue(); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity 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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName 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, + workspaceName, inferencePoolName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity 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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName 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, + workspaceName, inferencePoolName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, InferencePoolInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferencePoolInner.class, InferencePoolInner.class, this.client.getContext()); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferencePoolInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferencePoolInner.class, InferencePoolInner.class, context); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, InferencePoolInner> beginUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body).getSyncPoller(); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferencePoolInner> beginUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body, + Context context) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body, context) + .getSyncPoller(); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return beginUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferencePoolInner update(String resourceGroupName, String workspaceName, String inferencePoolName, + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return updateAsync(resourceGroupName, workspaceName, inferencePoolName, body).block(); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferencePoolInner update(String resourceGroupName, String workspaceName, String inferencePoolName, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + return updateAsync(resourceGroupName, workspaceName, inferencePoolName, body, context).block(); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String inferencePoolName, InferencePoolInner 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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName 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, inferencePoolName, this.client.getApiVersion(), body, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner 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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName 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, inferencePoolName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, InferencePoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String inferencePoolName, InferencePoolInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferencePoolInner.class, InferencePoolInner.class, this.client.getContext()); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferencePoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String inferencePoolName, InferencePoolInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferencePoolInner.class, InferencePoolInner.class, context); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, InferencePoolInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body).getSyncPoller(); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferencePoolInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body, context) + .getSyncPoller(); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String inferencePoolName, InferencePoolInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, InferencePoolInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 InferencePoolInner createOrUpdate(String resourceGroupName, String workspaceName, String inferencePoolName, + InferencePoolInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body).block(); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferencePoolInner createOrUpdate(String resourceGroupName, String workspaceName, String inferencePoolName, + InferencePoolInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body, context).block(); + } + + /** + * Retrieve inference pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> getStatusWithResponseAsync(String resourceGroupName, String workspaceName, + String inferencePoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, inferencePoolName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieve inference pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> getStatusWithResponseAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, 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 (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, inferencePoolName, this.client.getApiVersion(), accept, context); + } + + /** + * Retrieve inference pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 getStatusAsync(String resourceGroupName, String workspaceName, + String inferencePoolName) { + return getStatusWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieve inference pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 getStatusWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context) { + return getStatusWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName, context).block(); + } + + /** + * Retrieve inference pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 PoolStatusInner getStatus(String resourceGroupName, String workspaceName, String inferencePoolName) { + return getStatusWithResponse(resourceGroupName, workspaceName, inferencePoolName, Context.NONE).getValue(); + } + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusSinglePageAsync(String resourceGroupName, + String workspaceName, String inferencePoolName, Integer count, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, inferencePoolName, this.client.getApiVersion(), count, 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 Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusSinglePageAsync(String resourceGroupName, + String workspaceName, String inferencePoolName, Integer count, 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 (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (inferencePoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter inferencePoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + inferencePoolName, this.client.getApiVersion(), count, skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, Integer count, String skip) { + return new PagedFlux<>( + () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, inferencePoolName, count, skip), + nextLink -> listSkusNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group 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 SkuResource entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, + String inferencePoolName) { + final Integer count = null; + final String skip = null; + return new PagedFlux<>( + () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, inferencePoolName, count, skip), + nextLink -> listSkusNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, Integer count, String skip, Context context) { + return new PagedFlux<>( + () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, inferencePoolName, count, skip, context), + nextLink -> listSkusNextSinglePageAsync(nextLink, context)); + } + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group 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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSkus(String resourceGroupName, String workspaceName, + String inferencePoolName) { + final Integer count = null; + final String skip = null; + return new PagedIterable<>(listSkusAsync(resourceGroupName, workspaceName, inferencePoolName, count, skip)); + } + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSkus(String resourceGroupName, String workspaceName, + String inferencePoolName, Integer count, String skip, Context context) { + return new PagedIterable<>( + listSkusAsync(resourceGroupName, workspaceName, inferencePoolName, count, skip, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferencePool 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 InferencePool 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)); + } + + /** + * 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 SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusNextSinglePageAsync(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.listSkusNext(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 SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusNextSinglePageAsync(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.listSkusNext(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/InferencePoolsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.java new file mode 100644 index 0000000000000..5bafbefd2edfb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.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.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.InferencePoolsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PoolStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.models.InferencePool; +import com.azure.resourcemanager.machinelearning.models.InferencePools; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PoolStatus; +import com.azure.resourcemanager.machinelearning.models.SkuResource; + +public final class InferencePoolsImpl implements InferencePools { + private static final ClientLogger LOGGER = new ClientLogger(InferencePoolsImpl.class); + + private final InferencePoolsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public InferencePoolsImpl(InferencePoolsClient 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 ResourceManagerUtils.mapPage(inner, inner1 -> new InferencePoolImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + String tags, String properties, OrderString orderBy, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, count, + skip, tags, properties, orderBy, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferencePoolImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName, String inferencePoolName) { + this.serviceClient().delete(resourceGroupName, workspaceName, inferencePoolName); + } + + public void delete(String resourceGroupName, String workspaceName, String inferencePoolName, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, inferencePoolName, context); + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, inferencePoolName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InferencePoolImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public InferencePool get(String resourceGroupName, String workspaceName, String inferencePoolName) { + InferencePoolInner inner = this.serviceClient().get(resourceGroupName, workspaceName, inferencePoolName); + if (inner != null) { + return new InferencePoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getStatusWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context) { + Response inner + = this.serviceClient().getStatusWithResponse(resourceGroupName, workspaceName, inferencePoolName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PoolStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PoolStatus getStatus(String resourceGroupName, String workspaceName, String inferencePoolName) { + PoolStatusInner inner = this.serviceClient().getStatus(resourceGroupName, workspaceName, inferencePoolName); + if (inner != null) { + return new PoolStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listSkus(String resourceGroupName, String workspaceName, + String inferencePoolName) { + PagedIterable inner + = this.serviceClient().listSkus(resourceGroupName, workspaceName, inferencePoolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); + } + + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String inferencePoolName, + Integer count, String skip, Context context) { + PagedIterable inner + = this.serviceClient().listSkus(resourceGroupName, workspaceName, inferencePoolName, count, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); + } + + public InferencePool getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 inferencePoolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (inferencePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, inferencePoolName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 inferencePoolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (inferencePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, inferencePoolName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 inferencePoolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (inferencePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + this.delete(resourceGroupName, workspaceName, inferencePoolName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 inferencePoolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (inferencePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + this.delete(resourceGroupName, workspaceName, inferencePoolName, context); + } + + private InferencePoolsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public InferencePoolImpl define(String name) { + return new InferencePoolImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java index 1b26fd5f42d47..1e3634b1980da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java @@ -9,6 +9,8 @@ import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; import com.azure.resourcemanager.machinelearning.models.JobBase; import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; +import com.azure.resourcemanager.machinelearning.models.PartialJobBase; +import com.azure.resourcemanager.machinelearning.models.PartialJobBasePartialResource; public final class JobBaseImpl implements JobBase, JobBase.Definition, JobBase.Update { private JobBaseInner innerObject; @@ -53,6 +55,8 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String id; + private PartialJobBasePartialResource updateBody; + public JobBaseImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; @@ -60,22 +64,15 @@ public JobBaseImpl withExistingWorkspace(String resourceGroupName, String worksp } public JobBase create() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJobs() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE) + .getValue(); return this; } public JobBase create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJobs() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), context).getValue(); return this; } @@ -86,55 +83,40 @@ public JobBase create(Context context) { } public JobBaseImpl update() { + this.updateBody = new PartialJobBasePartialResource(); return this; } public JobBase apply() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJobs() + .updateWithResponse(resourceGroupName, workspaceName, id, updateBody, Context.NONE).getValue(); return this; } public JobBase apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJobs() + .updateWithResponse(resourceGroupName, workspaceName, id, updateBody, context).getValue(); return this; } - JobBaseImpl( - JobBaseInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + JobBaseImpl(JobBaseInner 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.id = Utils.getValueFromIdByName(innerObject.id(), "jobs"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.id = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); } public JobBase refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, workspaceName, id, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJobs() + .getWithResponse(resourceGroupName, workspaceName, id, Context.NONE).getValue(); return this; } public JobBase refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, workspaceName, id, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJobs() + .getWithResponse(resourceGroupName, workspaceName, id, context).getValue(); return this; } @@ -150,4 +132,9 @@ public JobBaseImpl withProperties(JobBaseProperties properties) { this.innerModel().withProperties(properties); return this; } + + public JobBaseImpl withProperties(PartialJobBase properties) { + this.updateBody.withProperties(properties); + return this; + } } 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..e897d44abfa83 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 @@ -12,6 +12,7 @@ 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; @@ -36,164 +37,145 @@ import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.PartialJobBasePartialResource; 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 JobsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsClient. + */ public final class JobsClientImpl implements JobsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface JobsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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("jobType") String jobType, - @QueryParam("tag") String tag, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, + @QueryParam("jobType") String jobType, @QueryParam("tag") String tag, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("properties") String properties, + @QueryParam("assetName") String assetName, @QueryParam("scheduled") Boolean scheduled, + @QueryParam("scheduleId") String scheduleId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @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}/jobs/{id}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @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}/jobs/{id}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobBaseInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PartialJobBasePartialResource body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cancel( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") JobBaseInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> cancel(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists Jobs in the workspace. - * + * * @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 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 property names (and optionally values). Example: prop1,prop2=value2. + * @param assetName Asset name the job's named output is registered with. + * @param scheduled Indicator whether the job is scheduled job. + * @param scheduleId The scheduled id for listing the job triggered from. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobBase entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a paginated list of JobBase 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 jobType, - String tag, - ListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, String jobType, String tag, ListViewType listViewType, String properties, String assetName, + Boolean scheduled, String scheduleId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -204,69 +186,45 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - jobType, - tag, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), skip, jobType, tag, listViewType, + properties, assetName, scheduled, scheduleId, 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 Jobs in the workspace. - * + * * @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 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 property names (and optionally values). Example: prop1,prop2=value2. + * @param assetName Asset name the job's named output is registered with. + * @param scheduled Indicator whether the job is scheduled job. + * @param scheduleId The scheduled id for listing the job triggered from. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobBase entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a paginated list of JobBase 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 jobType, - String tag, - ListViewType listViewType, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, String jobType, String tag, ListViewType listViewType, String properties, String assetName, + Boolean scheduled, String scheduleId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -278,59 +236,42 @@ private Mono> listSinglePageAsync( 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, - jobType, - tag, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + this.client.getApiVersion(), skip, jobType, tag, listViewType, properties, assetName, scheduled, + scheduleId, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists Jobs in the workspace. - * + * * @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 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 property names (and optionally values). Example: prop1,prop2=value2. + * @param assetName Asset name the job's named output is registered with. + * @param scheduled Indicator whether the job is scheduled job. + * @param scheduleId The scheduled id for listing the job triggered from. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 JobBase entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - String jobType, - String tag, - ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + String jobType, String tag, ListViewType listViewType, String properties, String assetName, Boolean scheduled, + String scheduleId) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, + listViewType, properties, assetName, scheduled, scheduleId), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists Jobs in the 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. @@ -344,20 +285,27 @@ private PagedFlux listAsync(String resourceGroupName, String works final String jobType = null; final String tag = null; final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + final String properties = null; + final String assetName = null; + final Boolean scheduled = null; + final String scheduleId = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, + listViewType, properties, assetName, scheduled, scheduleId), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists Jobs in the workspace. - * + * * @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 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 property names (and optionally values). Example: prop1,prop2=value2. + * @param assetName Asset name the job's named output is registered with. + * @param scheduled Indicator whether the job is scheduled job. + * @param scheduleId The scheduled id for listing the job triggered from. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -365,22 +313,17 @@ private PagedFlux listAsync(String resourceGroupName, String works * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - String jobType, - String tag, - ListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, context), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + String jobType, String tag, ListViewType listViewType, String properties, String assetName, Boolean scheduled, + String scheduleId, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, + listViewType, properties, assetName, scheduled, scheduleId, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists Jobs in the 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. @@ -394,18 +337,27 @@ 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; + final String assetName = null; + final Boolean scheduled = null; + final String scheduleId = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, + properties, assetName, scheduled, scheduleId)); } /** * Lists Jobs in the workspace. - * + * * @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 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 property names (and optionally values). Example: prop1,prop2=value2. + * @param assetName Asset name the job's named output is registered with. + * @param scheduled Indicator whether the job is scheduled job. + * @param scheduleId The scheduled id for listing the job triggered from. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -413,21 +365,16 @@ public PagedIterable list(String resourceGroupName, String workspa * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - String jobType, - String tag, - ListViewType listViewType, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, context)); + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, + String tag, ListViewType listViewType, String properties, String assetName, Boolean scheduled, + String scheduleId, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, + properties, assetName, scheduled, scheduleId, context)); } /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -437,19 +384,15 @@ public PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String id) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String id) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -463,24 +406,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -491,19 +424,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String id, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String id, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -517,21 +446,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, id, this.client.getApiVersion(), accept, context); } /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -541,18 +462,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String id) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String id) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, id); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -563,18 +482,17 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String id, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String id, Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, id, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -590,7 +508,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -601,14 +519,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @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 id, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id, + Context context) { return this.beginDeleteAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); } /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -619,14 +537,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName, String id) { - return beginDeleteAsync(resourceGroupName, workspaceName, id) - .last() + return beginDeleteAsync(resourceGroupName, workspaceName, id).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -638,14 +555,13 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName, String id, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, id, context) - .last() + return beginDeleteAsync(resourceGroupName, workspaceName, id, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -660,7 +576,7 @@ public void delete(String resourceGroupName, String workspaceName, String id) { /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -676,7 +592,7 @@ public void delete(String resourceGroupName, String workspaceName, String id, Co /** * Gets a Job by name/id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -686,19 +602,15 @@ public void delete(String resourceGroupName, String workspaceName, String id, Co * @return a Job by name/id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String id) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String id) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -712,24 +624,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a Job by name/id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -740,19 +642,15 @@ private Mono> getWithResponseAsync( * @return a Job by name/id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String id, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, String id, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -766,21 +664,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + id, this.client.getApiVersion(), accept, context); } /** * Gets a Job by name/id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -797,7 +687,7 @@ private Mono getAsync(String resourceGroupName, String workspaceNa /** * Gets a Job by name/id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -808,14 +698,14 @@ private Mono getAsync(String resourceGroupName, String workspaceNa * @return a Job by name/id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String id, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); } /** * Gets a Job by name/id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -830,32 +720,177 @@ public JobBaseInner get(String resourceGroupName, String workspaceName, String i } /** - * Creates and executes a Job. - * + * Updates a Job. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. + * @param body Job definition to apply during the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. + * @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 id, JobBaseInner body) { + private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String id, PartialJobBasePartialResource 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 this.client.getEndpoint() is required and cannot be null.")); + .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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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, workspaceName, id, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates a Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition to apply during the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String id, PartialJobBasePartialResource 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 this.client.getSubscriptionId() is required and cannot be null.")); + .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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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, + workspaceName, id, this.client.getApiVersion(), body, accept, context); + } + + /** + * Updates a Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition to apply during the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, String id, + PartialJobBasePartialResource body) { + return updateWithResponseAsync(resourceGroupName, workspaceName, id, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates a Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition to apply during the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String workspaceName, String id, + PartialJobBasePartialResource body, Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, id, body, context).block(); + } + + /** + * Updates a Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition to apply during the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobBaseInner update(String resourceGroupName, String workspaceName, String id, + PartialJobBasePartialResource body) { + return updateWithResponse(resourceGroupName, workspaceName, id, body, Context.NONE).getValue(); + } + + /** + * 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. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition 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 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 id, JobBaseInner 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 @@ -874,25 +909,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, id, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. * @param id The name and identifier for the Job. This is case-sensitive. @@ -901,23 +926,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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 id, JobBaseInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String workspaceName, + String id, JobBaseInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -936,22 +957,14 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, id, this.client.getApiVersion(), body, accept, context); } /** * 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. * @param id The name and identifier for the Job. This is case-sensitive. @@ -962,15 +975,16 @@ private Mono> createOrUpdateWithResponseAsync( * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String id, JobBaseInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String id, + JobBaseInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. * @param id The name and identifier for the Job. This is case-sensitive. @@ -982,14 +996,15 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String id, + JobBaseInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context).block(); } /** * 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. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1006,7 +1021,7 @@ public JobBaseInner createOrUpdate(String resourceGroupName, String workspaceNam /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1016,19 +1031,15 @@ public JobBaseInner createOrUpdate(String resourceGroupName, String workspaceNam * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync( - String resourceGroupName, String workspaceName, String id) { + private Mono>> cancelWithResponseAsync(String resourceGroupName, String workspaceName, + String id) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1042,24 +1053,14 @@ private Mono>> cancelWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .cancel( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1070,19 +1071,15 @@ private Mono>> cancelWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync( - String resourceGroupName, String workspaceName, String id, Context context) { + private Mono>> cancelWithResponseAsync(String resourceGroupName, String workspaceName, + String id, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1096,21 +1093,13 @@ private Mono>> cancelWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .cancel( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context); + return service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, id, this.client.getApiVersion(), accept, context); } /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1120,18 +1109,16 @@ private Mono>> cancelWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync( - String resourceGroupName, String workspaceName, String id) { + private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String workspaceName, + String id) { Mono>> mono = cancelWithResponseAsync(resourceGroupName, workspaceName, id); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1142,18 +1129,17 @@ private PollerFlux, Void> beginCancelAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync( - String resourceGroupName, String workspaceName, String id, Context context) { + private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String workspaceName, + String id, Context context) { context = this.client.mergeContext(context); Mono>> mono = cancelWithResponseAsync(resourceGroupName, workspaceName, id, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1169,7 +1155,7 @@ public SyncPoller, Void> beginCancel(String resourceGroupName, /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1180,14 +1166,14 @@ public SyncPoller, Void> beginCancel(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancel( - String resourceGroupName, String workspaceName, String id, Context context) { + public SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id, + Context context) { return this.beginCancelAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); } /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1198,14 +1184,13 @@ public SyncPoller, Void> beginCancel( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelAsync(String resourceGroupName, String workspaceName, String id) { - return beginCancelAsync(resourceGroupName, workspaceName, id) - .last() + return beginCancelAsync(resourceGroupName, workspaceName, id).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1217,14 +1202,13 @@ private Mono cancelAsync(String resourceGroupName, String workspaceName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelAsync(String resourceGroupName, String workspaceName, String id, Context context) { - return beginCancelAsync(resourceGroupName, workspaceName, id, context) - .last() + return beginCancelAsync(resourceGroupName, workspaceName, id, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1239,7 +1223,7 @@ public void cancel(String resourceGroupName, String workspaceName, String id) { /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -1255,14 +1239,15 @@ public void cancel(String resourceGroupName, String workspaceName, String id, Co /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a paginated list of JobBase entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1270,37 +1255,28 @@ private Mono> listNextSinglePageAsync(String nextLin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a paginated list of JobBase entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1308,23 +1284,13 @@ private Mono> listNextSinglePageAsync(String nextLin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..e7c811803a3a1 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 @@ -22,28 +22,23 @@ public final class JobsImpl implements Jobs { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public JobsImpl( - JobsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + public JobsImpl(JobsClient 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 JobBaseImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - String jobType, - String tag, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, context); - return Utils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, + String tag, ListViewType listViewType, String properties, String assetName, Boolean scheduled, + String scheduleId, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, skip, jobType, + tag, listViewType, properties, assetName, scheduled, scheduleId, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String id) { @@ -54,15 +49,12 @@ public void delete(String resourceGroupName, String workspaceName, String id, Co this.serviceClient().delete(resourceGroupName, workspaceName, id, context); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String id, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, id, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, id, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new JobBaseImpl(inner.getValue(), this.manager())); } else { return null; @@ -87,105 +79,77 @@ public void cancel(String resourceGroupName, String workspaceName, String id, Co } public JobBase getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String varId = Utils.getValueFromIdByName(id, "jobs"); + String varId = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); if (varId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, varId, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String varId = Utils.getValueFromIdByName(id, "jobs"); + String varId = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); if (varId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, varId, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String varId = Utils.getValueFromIdByName(id, "jobs"); + String varId = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); if (varId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } this.delete(resourceGroupName, workspaceName, varId, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String varId = Utils.getValueFromIdByName(id, "jobs"); + String varId = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); if (varId == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } this.delete(resourceGroupName, workspaceName, varId, context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobImpl.java new file mode 100644 index 0000000000000..9f300babf8eba --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobImpl.java @@ -0,0 +1,154 @@ +// Copyright (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.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; +import com.azure.resourcemanager.machinelearning.models.ExportSummary; +import com.azure.resourcemanager.machinelearning.models.LabelingJob; +import com.azure.resourcemanager.machinelearning.models.LabelingJobProperties; + +public final class LabelingJobImpl implements LabelingJob, LabelingJob.Definition, LabelingJob.Update { + private LabelingJobInner 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 LabelingJobProperties properties() { + LabelingJobPropertiesInner inner = this.innerModel().properties(); + if (inner != null) { + return new LabelingJobPropertiesImpl(inner, this.manager()); + } else { + return null; + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public LabelingJobInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String id; + + public LabelingJobImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public LabelingJob create() { + this.innerObject = serviceManager.serviceClient().getLabelingJobs().createOrUpdate(resourceGroupName, + workspaceName, id, this.innerModel(), Context.NONE); + return this; + } + + public LabelingJob create(Context context) { + this.innerObject = serviceManager.serviceClient().getLabelingJobs().createOrUpdate(resourceGroupName, + workspaceName, id, this.innerModel(), context); + return this; + } + + LabelingJobImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new LabelingJobInner(); + this.serviceManager = serviceManager; + this.id = name; + } + + public LabelingJobImpl update() { + return this; + } + + public LabelingJob apply() { + this.innerObject = serviceManager.serviceClient().getLabelingJobs().createOrUpdate(resourceGroupName, + workspaceName, id, this.innerModel(), Context.NONE); + return this; + } + + public LabelingJob apply(Context context) { + this.innerObject = serviceManager.serviceClient().getLabelingJobs().createOrUpdate(resourceGroupName, + workspaceName, id, this.innerModel(), context); + return this; + } + + LabelingJobImpl(LabelingJobInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.id = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "labelingJobs"); + } + + public LabelingJob refresh() { + this.innerObject = serviceManager.serviceClient().getLabelingJobs() + .getWithResponse(resourceGroupName, workspaceName, id, Context.NONE).getValue(); + return this; + } + + public LabelingJob refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getLabelingJobs() + .getWithResponse(resourceGroupName, workspaceName, id, context).getValue(); + return this; + } + + public ExportSummary exportLabels(ExportSummaryInner body) { + return serviceManager.labelingJobs().exportLabels(resourceGroupName, workspaceName, id, body); + } + + public ExportSummary exportLabels(ExportSummaryInner body, Context context) { + return serviceManager.labelingJobs().exportLabels(resourceGroupName, workspaceName, id, body, context); + } + + public Response pauseWithResponse(Context context) { + return serviceManager.labelingJobs().pauseWithResponse(resourceGroupName, workspaceName, id, context); + } + + public LabelingJobProperties pause() { + return serviceManager.labelingJobs().pause(resourceGroupName, workspaceName, id); + } + + public LabelingJobProperties resume() { + return serviceManager.labelingJobs().resume(resourceGroupName, workspaceName, id); + } + + public LabelingJobProperties resume(Context context) { + return serviceManager.labelingJobs().resume(resourceGroupName, workspaceName, id, context); + } + + public LabelingJobImpl withProperties(LabelingJobPropertiesInner properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobPropertiesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobPropertiesImpl.java new file mode 100644 index 0000000000000..cbaf386a1f2c3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobPropertiesImpl.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.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; +import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobProvisioningState; +import com.azure.resourcemanager.machinelearning.models.JobService; +import com.azure.resourcemanager.machinelearning.models.JobStatus; +import com.azure.resourcemanager.machinelearning.models.LabelCategory; +import com.azure.resourcemanager.machinelearning.models.LabelingDataConfiguration; +import com.azure.resourcemanager.machinelearning.models.LabelingJobInstructions; +import com.azure.resourcemanager.machinelearning.models.LabelingJobMediaProperties; +import com.azure.resourcemanager.machinelearning.models.LabelingJobProperties; +import com.azure.resourcemanager.machinelearning.models.MLAssistConfiguration; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; +import com.azure.resourcemanager.machinelearning.models.ProgressMetrics; +import com.azure.resourcemanager.machinelearning.models.SecretConfiguration; +import com.azure.resourcemanager.machinelearning.models.StatusMessage; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +public final class LabelingJobPropertiesImpl implements LabelingJobProperties { + private LabelingJobPropertiesInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + LabelingJobPropertiesImpl(LabelingJobPropertiesInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String description() { + return this.innerModel().description(); + } + + public Map properties() { + Map inner = this.innerModel().properties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String componentId() { + return this.innerModel().componentId(); + } + + public String computeId() { + return this.innerModel().computeId(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String experimentName() { + return this.innerModel().experimentName(); + } + + public IdentityConfiguration identity() { + return this.innerModel().identity(); + } + + public Boolean isArchived() { + return this.innerModel().isArchived(); + } + + public NotificationSetting notificationSetting() { + return this.innerModel().notificationSetting(); + } + + public Map secretsConfiguration() { + Map inner = this.innerModel().secretsConfiguration(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map services() { + Map inner = this.innerModel().services(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public JobStatus status() { + return this.innerModel().status(); + } + + public OffsetDateTime createdDateTime() { + return this.innerModel().createdDateTime(); + } + + public LabelingDataConfiguration dataConfiguration() { + return this.innerModel().dataConfiguration(); + } + + public LabelingJobInstructions jobInstructions() { + return this.innerModel().jobInstructions(); + } + + public Map labelCategories() { + Map inner = this.innerModel().labelCategories(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public LabelingJobMediaProperties labelingJobMediaProperties() { + return this.innerModel().labelingJobMediaProperties(); + } + + public MLAssistConfiguration mlAssistConfiguration() { + return this.innerModel().mlAssistConfiguration(); + } + + public ProgressMetrics progressMetrics() { + return this.innerModel().progressMetrics(); + } + + public UUID projectId() { + return this.innerModel().projectId(); + } + + public JobProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List statusMessages() { + List inner = this.innerModel().statusMessages(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public LabelingJobPropertiesInner 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/LabelingJobsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsClientImpl.java new file mode 100644 index 0000000000000..7286f25fb8047 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsClientImpl.java @@ -0,0 +1,1501 @@ +// Copyright (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.LabelingJobsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; +import com.azure.resourcemanager.machinelearning.models.LabelingJobResourceArmPaginatedResult; +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 LabelingJobsClient. + */ +public final class LabelingJobsClientImpl implements LabelingJobsClient { + /** + * The proxy service used to perform REST calls. + */ + private final LabelingJobsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of LabelingJobsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LabelingJobsClientImpl(AzureMachineLearningServicesImpl client) { + this.service + = RestProxy.create(LabelingJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesLabelingJobs to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface LabelingJobsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs") + @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("$top") Integer top, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @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}/labelingJobs/{id}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @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}/labelingJobs/{id}") + @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("id") String id, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") LabelingJobInner body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/exportLabels") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> exportLabels(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ExportSummaryInner body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/pause") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> pause(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/resume") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resume(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @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); + } + + /** + * Lists labeling jobs in the workspace. + * + * @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 top Number of labeling jobs to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 LabelingJob entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, Integer top) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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, top, 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 labeling jobs in the workspace. + * + * @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 top Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 LabelingJob entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, Integer top, 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, top, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists labeling jobs in the workspace. + * + * @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 top Number of labeling jobs to return. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 LabelingJob entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Integer top) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, top), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists labeling jobs in the 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 a paginated list of LabelingJob entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer top = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, top), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists labeling jobs in the workspace. + * + * @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 top Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 LabelingJob entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Integer top, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, top, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists labeling jobs in the 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 a paginated list of LabelingJob entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer top = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, top)); + } + + /** + * Lists labeling jobs in the workspace. + * + * @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 top Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 LabelingJob entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Integer top, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, top, context)); + } + + /** + * Delete a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 id) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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, id, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 id, + 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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, id, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 id) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, id).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); + } + + /** + * Delete a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 id) { + deleteWithResponse(resourceGroupName, workspaceName, id, Context.NONE); + } + + /** + * Gets a labeling job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String id) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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, id, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a labeling job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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, + id, this.client.getApiVersion(), accept, context); + } + + /** + * Gets a labeling job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String id) { + return getWithResponseAsync(resourceGroupName, workspaceName, id) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a labeling job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); + } + + /** + * Gets a labeling job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobInner get(String resourceGroupName, String workspaceName, String id) { + return getWithResponse(resourceGroupName, workspaceName, id, Context.NONE).getValue(); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 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 id, LabelingJobInner 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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, id, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 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 id, LabelingJobInner 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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, id, this.client.getApiVersion(), body, accept, context); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LabelingJobInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String id, LabelingJobInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LabelingJobInner.class, LabelingJobInner.class, this.client.getContext()); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LabelingJobInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String id, LabelingJobInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LabelingJobInner.class, LabelingJobInner.class, context); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LabelingJobInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String id, LabelingJobInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, id, body).getSyncPoller(); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LabelingJobInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String id, LabelingJobInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, id, body, context).getSyncPoller(); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String id, + LabelingJobInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, id, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String id, + LabelingJobInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, id, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobInner createOrUpdate(String resourceGroupName, String workspaceName, String id, + LabelingJobInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, id, body).block(); + } + + /** + * Creates or updates a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body LabelingJob definition 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobInner createOrUpdate(String resourceGroupName, String workspaceName, String id, + LabelingJobInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, id, body, context).block(); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> exportLabelsWithResponseAsync(String resourceGroupName, + String workspaceName, String id, ExportSummaryInner 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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.exportLabels(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, id, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> exportLabelsWithResponseAsync(String resourceGroupName, + String workspaceName, String id, ExportSummaryInner 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id 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.exportLabels(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, id, this.client.getApiVersion(), body, accept, context); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, ExportSummaryInner> + beginExportLabelsAsync(String resourceGroupName, String workspaceName, String id, ExportSummaryInner body) { + Mono>> mono + = exportLabelsWithResponseAsync(resourceGroupName, workspaceName, id, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExportSummaryInner.class, ExportSummaryInner.class, this.client.getContext()); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, ExportSummaryInner> beginExportLabelsAsync( + String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = exportLabelsWithResponseAsync(resourceGroupName, workspaceName, id, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ExportSummaryInner.class, ExportSummaryInner.class, context); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ExportSummaryInner> beginExportLabels(String resourceGroupName, + String workspaceName, String id, ExportSummaryInner body) { + return this.beginExportLabelsAsync(resourceGroupName, workspaceName, id, body).getSyncPoller(); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ExportSummaryInner> beginExportLabels(String resourceGroupName, + String workspaceName, String id, ExportSummaryInner body, Context context) { + return this.beginExportLabelsAsync(resourceGroupName, workspaceName, id, body, context).getSyncPoller(); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 exportLabelsAsync(String resourceGroupName, String workspaceName, String id, + ExportSummaryInner body) { + return beginExportLabelsAsync(resourceGroupName, workspaceName, id, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 exportLabelsAsync(String resourceGroupName, String workspaceName, String id, + ExportSummaryInner body, Context context) { + return beginExportLabelsAsync(resourceGroupName, workspaceName, id, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExportSummaryInner exportLabels(String resourceGroupName, String workspaceName, String id, + ExportSummaryInner body) { + return exportLabelsAsync(resourceGroupName, workspaceName, id, body).block(); + } + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ExportSummaryInner exportLabels(String resourceGroupName, String workspaceName, String id, + ExportSummaryInner body, Context context) { + return exportLabelsAsync(resourceGroupName, workspaceName, id, body, context).block(); + } + + /** + * Pause a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> pauseWithResponseAsync(String resourceGroupName, + String workspaceName, String id) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.pause(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Pause a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> pauseWithResponseAsync(String resourceGroupName, + String workspaceName, String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.pause(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, id, this.client.getApiVersion(), accept, context); + } + + /** + * Pause a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono pauseAsync(String resourceGroupName, String workspaceName, String id) { + return pauseWithResponseAsync(resourceGroupName, workspaceName, id) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Pause a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response pauseWithResponse(String resourceGroupName, String workspaceName, + String id, Context context) { + return pauseWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); + } + + /** + * Pause a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobPropertiesInner pause(String resourceGroupName, String workspaceName, String id) { + return pauseWithResponse(resourceGroupName, workspaceName, id, Context.NONE).getValue(); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resumeWithResponseAsync(String resourceGroupName, String workspaceName, + String id) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.resume(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resumeWithResponseAsync(String resourceGroupName, String workspaceName, + String id, 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 (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.resume(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, id, this.client.getApiVersion(), accept, context); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 labeling job definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LabelingJobPropertiesInner> + beginResumeAsync(String resourceGroupName, String workspaceName, String id) { + Mono>> mono = resumeWithResponseAsync(resourceGroupName, workspaceName, id); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LabelingJobPropertiesInner.class, LabelingJobPropertiesInner.class, + this.client.getContext()); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 labeling job definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LabelingJobPropertiesInner> + beginResumeAsync(String resourceGroupName, String workspaceName, String id, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = resumeWithResponseAsync(resourceGroupName, workspaceName, id, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), LabelingJobPropertiesInner.class, LabelingJobPropertiesInner.class, context); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of labeling job definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LabelingJobPropertiesInner> + beginResume(String resourceGroupName, String workspaceName, String id) { + return this.beginResumeAsync(resourceGroupName, workspaceName, id).getSyncPoller(); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of labeling job definition. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LabelingJobPropertiesInner> + beginResume(String resourceGroupName, String workspaceName, String id, Context context) { + return this.beginResumeAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resumeAsync(String resourceGroupName, String workspaceName, String id) { + return beginResumeAsync(resourceGroupName, workspaceName, id).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resumeAsync(String resourceGroupName, String workspaceName, String id, + Context context) { + return beginResumeAsync(resourceGroupName, workspaceName, id, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobPropertiesInner resume(String resourceGroupName, String workspaceName, String id) { + return resumeAsync(resourceGroupName, workspaceName, id).block(); + } + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LabelingJobPropertiesInner resume(String resourceGroupName, String workspaceName, String id, + Context context) { + return resumeAsync(resourceGroupName, workspaceName, id, 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 LabelingJob 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 LabelingJob 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/LabelingJobsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsImpl.java new file mode 100644 index 0000000000000..bc85a9b4fb269 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/LabelingJobsImpl.java @@ -0,0 +1,223 @@ +// Copyright (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.LabelingJobsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; +import com.azure.resourcemanager.machinelearning.models.ExportSummary; +import com.azure.resourcemanager.machinelearning.models.LabelingJob; +import com.azure.resourcemanager.machinelearning.models.LabelingJobProperties; +import com.azure.resourcemanager.machinelearning.models.LabelingJobs; + +public final class LabelingJobsImpl implements LabelingJobs { + private static final ClientLogger LOGGER = new ClientLogger(LabelingJobsImpl.class); + + private final LabelingJobsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public LabelingJobsImpl(LabelingJobsClient 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 ResourceManagerUtils.mapPage(inner, inner1 -> new LabelingJobImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer top, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, top, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LabelingJobImpl(inner1, this.manager())); + } + + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, id, context); + } + + public void delete(String resourceGroupName, String workspaceName, String id) { + this.serviceClient().delete(resourceGroupName, workspaceName, id); + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, id, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LabelingJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LabelingJob get(String resourceGroupName, String workspaceName, String id) { + LabelingJobInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); + if (inner != null) { + return new LabelingJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public ExportSummary exportLabels(String resourceGroupName, String workspaceName, String id, + ExportSummaryInner body) { + ExportSummaryInner inner = this.serviceClient().exportLabels(resourceGroupName, workspaceName, id, body); + if (inner != null) { + return new ExportSummaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public ExportSummary exportLabels(String resourceGroupName, String workspaceName, String id, + ExportSummaryInner body, Context context) { + ExportSummaryInner inner + = this.serviceClient().exportLabels(resourceGroupName, workspaceName, id, body, context); + if (inner != null) { + return new ExportSummaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response pauseWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { + Response inner + = this.serviceClient().pauseWithResponse(resourceGroupName, workspaceName, id, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LabelingJobPropertiesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public LabelingJobProperties pause(String resourceGroupName, String workspaceName, String id) { + LabelingJobPropertiesInner inner = this.serviceClient().pause(resourceGroupName, workspaceName, id); + if (inner != null) { + return new LabelingJobPropertiesImpl(inner, this.manager()); + } else { + return null; + } + } + + public LabelingJobProperties resume(String resourceGroupName, String workspaceName, String id) { + LabelingJobPropertiesInner inner = this.serviceClient().resume(resourceGroupName, workspaceName, id); + if (inner != null) { + return new LabelingJobPropertiesImpl(inner, this.manager()); + } else { + return null; + } + } + + public LabelingJobProperties resume(String resourceGroupName, String workspaceName, String id, Context context) { + LabelingJobPropertiesInner inner = this.serviceClient().resume(resourceGroupName, workspaceName, id, context); + if (inner != null) { + return new LabelingJobPropertiesImpl(inner, this.manager()); + } else { + return null; + } + } + + public LabelingJob getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 varId = ResourceManagerUtils.getValueFromIdByName(id, "labelingJobs"); + if (varId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, varId, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 varId = ResourceManagerUtils.getValueFromIdByName(id, "labelingJobs"); + if (varId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, varId, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 varId = ResourceManagerUtils.getValueFromIdByName(id, "labelingJobs"); + if (varId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + this.deleteWithResponse(resourceGroupName, workspaceName, varId, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 varId = ResourceManagerUtils.getValueFromIdByName(id, "labelingJobs"); + if (varId == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'labelingJobs'.", id))); + } + return this.deleteWithResponse(resourceGroupName, workspaceName, varId, context); + } + + private LabelingJobsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public LabelingJobImpl define(String name) { + return new LabelingJobImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java index 66fa88be97b17..9202fd672f04a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java @@ -12,8 +12,7 @@ public final class ListNotebookKeysResultImpl implements ListNotebookKeysResult private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - ListNotebookKeysResultImpl( - ListNotebookKeysResultInner innerObject, + ListNotebookKeysResultImpl(ListNotebookKeysResultInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java index 5b7e3b40f651a..ed94a54767279 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java @@ -12,8 +12,7 @@ public final class ListStorageAccountKeysResultImpl implements ListStorageAccoun private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - ListStorageAccountKeysResultImpl( - ListStorageAccountKeysResultInner innerObject, + ListStorageAccountKeysResultImpl(ListStorageAccountKeysResultInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java index 02beede5a627c..1b4e07f1ffd4e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java @@ -15,21 +15,12 @@ public final class ListWorkspaceKeysResultImpl implements ListWorkspaceKeysResul private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - ListWorkspaceKeysResultImpl( - ListWorkspaceKeysResultInner innerObject, + ListWorkspaceKeysResultImpl(ListWorkspaceKeysResultInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public String userStorageKey() { - return this.innerModel().userStorageKey(); - } - - public String userStorageResourceId() { - return this.innerModel().userStorageResourceId(); - } - public String appInsightsInstrumentationKey() { return this.innerModel().appInsightsInstrumentationKey(); } @@ -47,6 +38,14 @@ public ListNotebookKeysResult notebookAccessKeys() { } } + public String userStorageArmId() { + return this.innerModel().userStorageArmId(); + } + + public String userStorageKey() { + return this.innerModel().userStorageKey(); + } + public ListWorkspaceKeysResultInner innerModel() { return this.innerObject; } 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..1f1709890f1af --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.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.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..7eeaf554b1372 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java @@ -0,0 +1,359 @@ +// Copyright (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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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..eb0d0a15e575e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.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.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..0470aecb84b3b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.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.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.List; +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 List changeableIsolationModes() { + List inner = this.innerModel().changeableIsolationModes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + 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..f56ec66553437 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java @@ -0,0 +1,930 @@ +// Copyright (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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 response body 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 Azure Machine Learning Workspace Name. + * @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 response body 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 Azure Machine Learning Workspace Name. + * @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 long-running operation. + */ + @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 Azure Machine Learning Workspace Name. + * @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 long-running operation. + */ + @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 Azure Machine Learning Workspace Name. + * @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 long-running operation. + */ + @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 Azure Machine Learning Workspace Name. + * @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 long-running operation. + */ + @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 Azure Machine Learning Workspace Name. + * @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 response body 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 Azure Machine Learning Workspace Name. + * @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 response body 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 Azure Machine Learning Workspace Name. + * @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 response. + */ + @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 Azure Machine Learning Workspace Name. + * @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 response. + */ + @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..4e0e44e021e66 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.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/MarketplaceSubscriptionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java new file mode 100644 index 0000000000000..ac760c9431e10 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java @@ -0,0 +1,123 @@ +// Copyright (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.MarketplaceSubscriptionInner; +import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; +import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; + +public final class MarketplaceSubscriptionImpl + implements MarketplaceSubscription, MarketplaceSubscription.Definition, MarketplaceSubscription.Update { + private MarketplaceSubscriptionInner 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 MarketplaceSubscriptionProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public MarketplaceSubscriptionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String name; + + public MarketplaceSubscriptionImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public MarketplaceSubscription create() { + this.innerObject = serviceManager.serviceClient().getMarketplaceSubscriptions() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public MarketplaceSubscription create(Context context) { + this.innerObject = serviceManager.serviceClient().getMarketplaceSubscriptions() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + MarketplaceSubscriptionImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new MarketplaceSubscriptionInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public MarketplaceSubscriptionImpl update() { + return this; + } + + public MarketplaceSubscription apply() { + this.innerObject = serviceManager.serviceClient().getMarketplaceSubscriptions() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public MarketplaceSubscription apply(Context context) { + this.innerObject = serviceManager.serviceClient().getMarketplaceSubscriptions() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + MarketplaceSubscriptionImpl(MarketplaceSubscriptionInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "marketplaceSubscriptions"); + } + + public MarketplaceSubscription refresh() { + this.innerObject = serviceManager.serviceClient().getMarketplaceSubscriptions() + .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + return this; + } + + public MarketplaceSubscription refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getMarketplaceSubscriptions() + .getWithResponse(resourceGroupName, workspaceName, name, context).getValue(); + return this; + } + + public MarketplaceSubscriptionImpl withProperties(MarketplaceSubscriptionProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java new file mode 100644 index 0000000000000..9c5793393bdce --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java @@ -0,0 +1,948 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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.MarketplaceSubscriptionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; +import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionResourceArmPaginatedResult; +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 MarketplaceSubscriptionsClient. + */ +public final class MarketplaceSubscriptionsClientImpl implements MarketplaceSubscriptionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MarketplaceSubscriptionsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of MarketplaceSubscriptionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MarketplaceSubscriptionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(MarketplaceSubscriptionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesMarketplaceSubscriptions to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface MarketplaceSubscriptionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions") + @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, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") + @ExpectedResponses({ 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}/marketplaceSubscriptions/{name}") + @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, @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}/marketplaceSubscriptions/{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") MarketplaceSubscriptionInner 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 workspaceName Name of Azure Machine Learning workspace. + * @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 MarketplaceSubscription entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, 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 (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, 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 workspaceName Name of Azure Machine Learning workspace. + * @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 MarketplaceSubscription entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, 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 (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, 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 workspaceName Name of Azure Machine Learning workspace. + * @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 MarketplaceSubscription entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List 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 MarketplaceSubscription entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 MarketplaceSubscription entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String skip, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List 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 MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + } + + /** + * List 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); + } + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 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 Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 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 Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 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 Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 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 Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 workspaceName, String name) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); + } + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 workspaceName, String name, + Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); + } + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 workspaceName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 workspaceName, String name) { + deleteAsync(resourceGroupName, workspaceName, name).block(); + } + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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.get(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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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.get(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, String name) { + return getWithResponseAsync(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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, + String name, Context context) { + return getWithResponseAsync(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 MarketplaceSubscriptionInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, MarketplaceSubscriptionInner 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 Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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, MarketplaceSubscriptionInner 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 Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, MarketplaceSubscriptionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MarketplaceSubscriptionInner.class, MarketplaceSubscriptionInner.class, + this.client.getContext()); + } + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MarketplaceSubscriptionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MarketplaceSubscriptionInner.class, MarketplaceSubscriptionInner.class, + context); + } + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, MarketplaceSubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + } + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + } + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, MarketplaceSubscriptionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, MarketplaceSubscriptionInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + } + + /** + * Create or update Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription name. + * @param body Marketplace Subscription entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner 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 MarketplaceSubscription 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 MarketplaceSubscription 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/MarketplaceSubscriptionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java new file mode 100644 index 0000000000000..6ff1a2cd38b08 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.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.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.MarketplaceSubscriptionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; +import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; +import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptions; + +public final class MarketplaceSubscriptionsImpl implements MarketplaceSubscriptions { + private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSubscriptionsImpl.class); + + private final MarketplaceSubscriptionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public MarketplaceSubscriptionsImpl(MarketplaceSubscriptionsClient 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 ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceSubscriptionImpl(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 getWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MarketplaceSubscriptionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MarketplaceSubscription get(String resourceGroupName, String workspaceName, String name) { + MarketplaceSubscriptionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new MarketplaceSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public MarketplaceSubscription getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceSubscriptions"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceSubscriptions'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceSubscriptions"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceSubscriptions'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceSubscriptions"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceSubscriptions'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "marketplaceSubscriptions"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'marketplaceSubscriptions'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, context); + } + + private MarketplaceSubscriptionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public MarketplaceSubscriptionImpl define(String name) { + return new MarketplaceSubscriptionImpl(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..56692eebf3ffd 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,40 +49,32 @@ 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; } public ModelContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelContainers().createOrUpdate(resourceGroupName, + registryName, modelName, this.innerModel(), Context.NONE); return this; } public ModelContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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() { @@ -90,52 +82,35 @@ public ModelContainerImpl update() { } public ModelContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelContainers().createOrUpdate(resourceGroupName, + registryName, modelName, this.innerModel(), Context.NONE); return this; } public ModelContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelContainers().createOrUpdate(resourceGroupName, + registryName, modelName, this.innerModel(), context); return this; } - ModelContainerImpl( - ModelContainerInner innerObject, + ModelContainerImpl(ModelContainerInner 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(), "models"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.modelName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "models"); } public ModelContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelContainers() + .getWithResponse(resourceGroupName, registryName, modelName, Context.NONE).getValue(); return this; } public ModelContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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..2557445bed84d 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 @@ -34,113 +34,92 @@ import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ModelContainersClient. */ +/** + * An instance of this class provides access to all the operations defined in ModelContainersClient. + */ public final class ModelContainersClientImpl implements ModelContainersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ModelContainersService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ModelContainersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - ModelContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(ModelContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface ModelContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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("count") Integer count, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") - @ExpectedResponses({200, 204}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, + @QueryParam("count") Integer count, @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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); + @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}/models/{name}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/models/{name}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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") ModelContainerInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ModelContainerInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List model 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. @@ -150,22 +129,18 @@ Mono> listNext( * @throws ManagementException 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, Integer count, ListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, Integer count, ListViewType listViewType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -177,34 +152,16 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - count, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), skip, count, 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 workspaceName Name of Azure Machine Learning workspace. * @param skip Continuation token for pagination. @@ -215,27 +172,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, Integer count, ListViewType listViewType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -247,31 +195,15 @@ private Mono> listSinglePageAsync( 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, - count, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + this.client.getApiVersion(), skip, count, 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 workspaceName Name of Azure Machine Learning workspace. * @param skip Continuation token for pagination. @@ -283,16 +215,15 @@ private Mono> listSinglePageAsync( * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, Integer count, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Integer count, ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List model 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. @@ -305,14 +236,13 @@ private PagedFlux listAsync(String resourceGroupName, Strin final String skip = null; final Integer count = null; final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List model 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. @@ -325,13 +255,8 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Integer count, ListViewType listViewType, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -339,7 +264,7 @@ private PagedFlux listAsync( /** * List model 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. @@ -357,7 +282,7 @@ public PagedIterable list(String resourceGroupName, String /** * List model 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. @@ -370,19 +295,14 @@ public PagedIterable list(String resourceGroupName, String * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Integer count, ListViewType listViewType, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, listViewType, 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. @@ -394,16 +314,12 @@ public PagedIterable list( @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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -417,24 +333,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } 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)) + .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. @@ -445,19 +351,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -471,21 +373,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -501,7 +395,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -512,14 +406,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).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. @@ -534,7 +428,7 @@ public void delete(String resourceGroupName, String workspaceName, String name) /** * 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. @@ -544,19 +438,15 @@ public void delete(String resourceGroupName, String workspaceName, String name) * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -570,24 +460,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(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. @@ -598,19 +478,15 @@ private Mono> getWithResponseAsync( * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -624,21 +500,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.get(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. @@ -655,7 +523,7 @@ private Mono getAsync(String resourceGroupName, String work /** * 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. @@ -666,14 +534,14 @@ private Mono getAsync(String resourceGroupName, String work * @return container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return getWithResponseAsync(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. @@ -689,7 +557,7 @@ public ModelContainerInner get(String resourceGroupName, String workspaceName, S /** * 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. @@ -697,23 +565,19 @@ public ModelContainerInner get(String resourceGroupName, String workspaceName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. + * @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, ModelContainerInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ModelContainerInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -732,25 +596,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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)) + .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. @@ -759,23 +612,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, ModelContainerInner body, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ModelContainerInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -794,22 +643,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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); + 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. @@ -820,15 +660,15 @@ private Mono> createOrUpdateWithResponseAsync( * @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, ModelContainerInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + ModelContainerInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.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. @@ -840,14 +680,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, ModelContainerInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).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. @@ -858,21 +698,22 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { + public ModelContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ModelContainerInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -880,37 +721,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -918,23 +750,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..d306fddea8716 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 @@ -22,8 +22,7 @@ public final class ModelContainersImpl implements ModelContainers { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public ModelContainersImpl( - ModelContainersClient innerClient, + public ModelContainersImpl(ModelContainersClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,23 +30,18 @@ public ModelContainersImpl( public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, count, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Integer count, ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, count, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); } @@ -55,15 +49,12 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ModelContainerImpl(inner.getValue(), this.manager())); } else { return null; @@ -79,108 +70,26 @@ 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 +99,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..a664184e36e67 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,16 @@ 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.PackageRequest; +import com.azure.resourcemanager.machinelearning.models.PackageResponse; +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,37 +54,28 @@ 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; } public ModelVersion create() { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelVersions().createOrUpdate(resourceGroupName, + registryName, modelName, version, this.innerModel(), Context.NONE); return this; } public ModelVersion create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelVersions().createOrUpdate(resourceGroupName, + registryName, modelName, version, this.innerModel(), context); return this; } @@ -94,57 +90,60 @@ public ModelVersionImpl update() { } public ModelVersion apply() { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelVersions().createOrUpdate(resourceGroupName, + registryName, modelName, version, this.innerModel(), Context.NONE); return this; } public ModelVersion apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelVersions().createOrUpdate(resourceGroupName, + registryName, modelName, version, this.innerModel(), context); return this; } - ModelVersionImpl( - ModelVersionInner innerObject, + ModelVersionImpl(ModelVersionInner 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(), "models"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "registries"); + this.modelName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "models"); + this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions"); } public ModelVersion refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelVersions() + .getWithResponse(resourceGroupName, registryName, modelName, version, Context.NONE).getValue(); return this; } public ModelVersion refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getRegistryModelVersions() + .getWithResponse(resourceGroupName, registryName, modelName, version, context).getValue(); return this; } + public PackageResponse packageMethod(PackageRequest body) { + return serviceManager.registryModelVersions().packageMethod(resourceGroupName, registryName, modelName, version, + body); + } + + public PackageResponse packageMethod(PackageRequest body, Context context) { + return serviceManager.registryModelVersions().packageMethod(resourceGroupName, registryName, modelName, version, + body, context); + } + + 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..7d7a845474817 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,132 +27,134 @@ 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.fluent.models.PackageResponseInner; +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.PackageRequest; +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. */ +/** + * An instance of this class provides access to all the operations defined in ModelVersionsClient. + */ public final class ModelVersionsClientImpl implements ModelVersionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ModelVersionsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of ModelVersionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - ModelVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(ModelVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface ModelVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{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("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("version") String version, @QueryParam("description") String description, + @QueryParam("offset") Integer offset, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("feed") String feed, + @QueryParam("listViewType") ListViewType listViewType, @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}/models/{name}/versions/{version}") + @ExpectedResponses({ 200, 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}/models/{name}/versions/{version}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> get(@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("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("version") String version, - @QueryParam("description") String description, - @QueryParam("offset") Integer offset, - @QueryParam("tags") String tags, - @QueryParam("properties") String properties, - @QueryParam("feed") String feed, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); + @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"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + 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, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @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"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono>> packageMethod(@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); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PackageRequest body, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/publish") + @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + 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") ModelVersionInner body, - @HeaderParam("Accept") String accept, - Context context); + @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -165,38 +168,24 @@ Mono> listNext( * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. * @param feed Name of the feed. * @param listViewType View type for including/excluding (for example) archived entities. + * @param stage Model 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 ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String name, String skip, String orderBy, Integer top, String version, String description, Integer offset, + String tags, String properties, String feed, ListViewType listViewType, String stage) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -210,43 +199,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, this.client.getApiVersion(), skip, orderBy, top, version, + description, offset, tags, properties, feed, listViewType, 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 model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -260,40 +223,25 @@ private Mono> listSinglePageAsync( * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. * @param feed Name of the feed. * @param listViewType View type for including/excluding (for example) archived entities. + * @param stage Model 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 ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String name, String skip, String orderBy, Integer top, String version, String description, Integer offset, + String tags, String properties, String feed, ListViewType listViewType, String stage, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -308,39 +256,16 @@ private Mono> listSinglePageAsync( 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, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, + this.client.getApiVersion(), skip, orderBy, top, version, description, offset, tags, properties, feed, + listViewType, stage, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -354,48 +279,24 @@ private Mono> listSinglePageAsync( * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. * @param feed Name of the feed. * @param listViewType View type for including/excluding (for example) archived entities. + * @param stage Model 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 ModelVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, + String properties, String feed, ListViewType listViewType, String stage) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, + version, description, offset, tags, properties, feed, listViewType, stage), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -416,28 +317,15 @@ private PagedFlux listAsync(String resourceGroupName, String final String properties = null; final String feed = null; final ListViewType listViewType = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType), + final String stage = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, + version, description, offset, tags, properties, feed, listViewType, stage), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -451,6 +339,7 @@ private PagedFlux listAsync(String resourceGroupName, String * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. * @param feed Name of the feed. * @param listViewType View type for including/excluding (for example) archived entities. + * @param stage Model 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. @@ -458,44 +347,18 @@ private PagedFlux listAsync(String resourceGroupName, String * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, + String properties, String feed, ListViewType listViewType, String stage, Context context) { return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - context), + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, + offset, tags, properties, feed, listViewType, stage, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -516,26 +379,14 @@ public PagedIterable list(String resourceGroupName, String wo final String properties = null; final String feed = null; final ListViewType listViewType = null; - return new PagedIterable<>( - listAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType)); + final String stage = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, version, + description, offset, tags, properties, feed, listViewType, stage)); } /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -549,6 +400,7 @@ public PagedIterable list(String resourceGroupName, String wo * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. * @param feed Name of the feed. * @param listViewType View type for including/excluding (for example) archived entities. + * @param stage Model 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. @@ -556,42 +408,16 @@ public PagedIterable list(String resourceGroupName, String wo * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context) { - return new PagedIterable<>( - listAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - context)); + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, + String properties, String feed, ListViewType listViewType, String stage, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, version, + description, offset, tags, properties, feed, listViewType, 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. @@ -602,19 +428,15 @@ public PagedIterable list( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -631,25 +453,14 @@ private Mono> deleteWithResponseAsync( } 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)) + .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. @@ -661,19 +472,15 @@ private Mono> deleteWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -690,22 +497,13 @@ private Mono> deleteWithResponseAsync( } 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); + 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. @@ -723,7 +521,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S /** * 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. @@ -735,14 +533,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).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. @@ -758,7 +556,7 @@ public void delete(String resourceGroupName, String workspaceName, String name, /** * 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. @@ -769,19 +567,15 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -798,25 +592,14 @@ private Mono> getWithResponseAsync( } 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)) + .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. @@ -828,19 +611,15 @@ private Mono> getWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -857,22 +636,13 @@ private Mono> getWithResponseAsync( } 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); + 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. @@ -883,15 +653,15 @@ private Mono> getWithResponseAsync( * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { + 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. @@ -903,14 +673,14 @@ private Mono getAsync( * @return version along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + 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. @@ -927,7 +697,7 @@ public ModelVersionInner get(String resourceGroupName, String workspaceName, Str /** * 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. @@ -936,23 +706,19 @@ public ModelVersionInner get(String resourceGroupName, String workspaceName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. + * @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, ModelVersionInner body) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, ModelVersionInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -974,26 +740,14 @@ private Mono> createOrUpdateWithResponseAsync( } 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)) + .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. @@ -1003,28 +757,19 @@ private Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, - ModelVersionInner body, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1046,23 +791,13 @@ private Mono> createOrUpdateWithResponseAsync( } 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); + 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. @@ -1074,15 +809,15 @@ private Mono> createOrUpdateWithResponseAsync( * @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, ModelVersionInner body) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + String version, ModelVersionInner body) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) .flatMap(res -> Mono.justOrEmpty(res.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. @@ -1095,19 +830,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ModelVersionInner body, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, ModelVersionInner body, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).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. @@ -1119,22 +849,558 @@ public Response createOrUpdateWithResponse( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body) { + public ModelVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + ModelVersionInner body) { return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) .getValue(); } + /** + * Model Version Package 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 Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> packageMethodWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, PackageRequest 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.packageMethod(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())); + } + + /** + * Model Version Package 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 Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> packageMethodWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, PackageRequest 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.packageMethod(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + } + + /** + * Model Version Package 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 Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PackageResponseInner> beginPackageMethodAsync( + String resourceGroupName, String workspaceName, String name, String version, PackageRequest body) { + Mono>> mono + = packageMethodWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PackageResponseInner.class, PackageResponseInner.class, this.client.getContext()); + } + + /** + * Model Version Package 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 Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PackageResponseInner> beginPackageMethodAsync( + String resourceGroupName, String workspaceName, String name, String version, PackageRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = packageMethodWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PackageResponseInner.class, PackageResponseInner.class, context); + } + + /** + * Model Version Package 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 Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PackageResponseInner> beginPackageMethod( + String resourceGroupName, String workspaceName, String name, String version, PackageRequest body) { + return this.beginPackageMethodAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + } + + /** + * Model Version Package 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 Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PackageResponseInner> beginPackageMethod( + String resourceGroupName, String workspaceName, String name, String version, PackageRequest body, + Context context) { + return this.beginPackageMethodAsync(resourceGroupName, workspaceName, name, version, body, context) + .getSyncPoller(); + } + + /** + * Model Version Package 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 Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono packageMethodAsync(String resourceGroupName, String workspaceName, String name, + String version, PackageRequest body) { + return beginPackageMethodAsync(resourceGroupName, workspaceName, name, version, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Model Version Package 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 Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono packageMethodAsync(String resourceGroupName, String workspaceName, String name, + String version, PackageRequest body, Context context) { + return beginPackageMethodAsync(resourceGroupName, workspaceName, name, version, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Model Version Package 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 Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PackageResponseInner packageMethod(String resourceGroupName, String workspaceName, String name, + String version, PackageRequest body) { + return packageMethodAsync(resourceGroupName, workspaceName, name, version, body).block(); + } + + /** + * Model Version Package 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 Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PackageResponseInner packageMethod(String resourceGroupName, String workspaceName, String name, + String version, PackageRequest body, Context context) { + return packageMethodAsync(resourceGroupName, workspaceName, name, version, body, context).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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1142,37 +1408,28 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1180,23 +1437,13 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..3dd12a968c0eb 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,9 +11,13 @@ 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.fluent.models.PackageResponseInner; +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; +import com.azure.resourcemanager.machinelearning.models.PackageRequest; +import com.azure.resourcemanager.machinelearning.models.PackageResponse; public final class ModelVersionsImpl implements ModelVersions { private static final ClientLogger LOGGER = new ClientLogger(ModelVersionsImpl.class); @@ -22,8 +26,7 @@ public final class ModelVersionsImpl implements ModelVersions { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public ModelVersionsImpl( - ModelVersionsClient innerClient, + public ModelVersionsImpl(ModelVersionsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,47 +34,19 @@ public ModelVersionsImpl( public PagedIterable list(String resourceGroupName, String workspaceName, String name) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - context); - return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, + String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, + String feed, ListViewType listViewType, String stage, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name, skip, + orderBy, top, version, description, offset, tags, properties, feed, listViewType, stage, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); } @@ -79,15 +54,12 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ModelVersionImpl(inner.getValue(), this.manager())); } else { return null; @@ -103,136 +75,59 @@ 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))); + public PackageResponse packageMethod(String resourceGroupName, String workspaceName, String name, String version, + PackageRequest body) { + PackageResponseInner inner + = this.serviceClient().packageMethod(resourceGroupName, workspaceName, name, version, body); + if (inner != null) { + return new PackageResponseImpl(inner, this.manager()); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, workspaceName, name, version, 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))); - } - 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 PackageResponse packageMethod(String resourceGroupName, String workspaceName, String name, String version, + PackageRequest body, Context context) { + PackageResponseInner inner + = this.serviceClient().packageMethod(resourceGroupName, workspaceName, name, version, body, context); + if (inner != null) { + return new PackageResponseImpl(inner, this.manager()); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, workspaceName, name, version, context); + } + + public void publish(String resourceGroupName, String workspaceName, String name, String version, + DestinationAsset body) { + this.serviceClient().publish(resourceGroupName, workspaceName, name, version, body); + } + + 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 +137,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/NotebookAccessTokenResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java index 56f19f2680b1c..6094ec8e0c303 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java @@ -12,35 +12,30 @@ public final class NotebookAccessTokenResultImpl implements NotebookAccessTokenR private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - NotebookAccessTokenResultImpl( - NotebookAccessTokenResultInner innerObject, + NotebookAccessTokenResultImpl(NotebookAccessTokenResultInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public String notebookResourceId() { - return this.innerModel().notebookResourceId(); - } - - public String hostname() { - return this.innerModel().hostname(); + public String accessToken() { + return this.innerModel().accessToken(); } - public String publicDns() { - return this.innerModel().publicDns(); + public Integer expiresIn() { + return this.innerModel().expiresIn(); } - public String accessToken() { - return this.innerModel().accessToken(); + public String hostname() { + return this.innerModel().hostname(); } - public String tokenType() { - return this.innerModel().tokenType(); + public String notebookResourceId() { + return this.innerModel().notebookResourceId(); } - public Integer expiresIn() { - return this.innerModel().expiresIn(); + public String publicDns() { + return this.innerModel().publicDns(); } public String refreshToken() { @@ -51,6 +46,10 @@ public String scope() { return this.innerModel().scope(); } + public String tokenType() { + return this.innerModel().tokenType(); + } + public NotebookAccessTokenResultInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java index 79a6782c20d9b..e1ae74c03ea39 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java @@ -13,8 +13,7 @@ public final class NotebookResourceInfoImpl implements NotebookResourceInfo { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - NotebookResourceInfoImpl( - NotebookResourceInfoInner innerObject, + NotebookResourceInfoImpl(NotebookResourceInfoInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -24,14 +23,18 @@ public String fqdn() { return this.innerModel().fqdn(); } - public String resourceId() { - return this.innerModel().resourceId(); + public Boolean isPrivateLinkEnabled() { + return this.innerModel().isPrivateLinkEnabled(); } public NotebookPreparationError notebookPreparationError() { return this.innerModel().notebookPreparationError(); } + public String resourceId() { + return this.innerModel().resourceId(); + } + public NotebookResourceInfoInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java index d6f213d3eda47..543afd2934d8b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java @@ -101,8 +101,8 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private PartialMinimalTrackedResourceWithSku updateBody; - public OnlineDeploymentImpl withExistingOnlineEndpoint( - String resourceGroupName, String workspaceName, String endpointName) { + public OnlineDeploymentImpl withExistingOnlineEndpoint(String resourceGroupName, String workspaceName, + String endpointName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; this.endpointName = endpointName; @@ -110,22 +110,14 @@ public OnlineDeploymentImpl withExistingOnlineEndpoint( } public OnlineDeployment create() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getOnlineDeployments().createOrUpdate(resourceGroupName, + workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); return this; } public OnlineDeployment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getOnlineDeployments().createOrUpdate(resourceGroupName, + workspaceName, endpointName, deploymentName, this.innerModel(), context); return this; } @@ -141,64 +133,47 @@ public OnlineDeploymentImpl update() { } public OnlineDeployment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient().getOnlineDeployments().update(resourceGroupName, + workspaceName, endpointName, deploymentName, updateBody, Context.NONE); return this; } public OnlineDeployment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, context); + this.innerObject = serviceManager.serviceClient().getOnlineDeployments().update(resourceGroupName, + workspaceName, endpointName, deploymentName, updateBody, context); return this; } - OnlineDeploymentImpl( - OnlineDeploymentInner innerObject, + OnlineDeploymentImpl(OnlineDeploymentInner 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.endpointName = Utils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); - this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "deployments"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); + this.deploymentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deployments"); } public OnlineDeployment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getOnlineDeployments() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); return this; } public OnlineDeployment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getOnlineDeployments() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context).getValue(); return this; } public Response getLogsWithResponse(DeploymentLogsRequest body, Context context) { - return serviceManager - .onlineDeployments() - .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + return serviceManager.onlineDeployments().getLogsWithResponse(resourceGroupName, workspaceName, endpointName, + deploymentName, body, context); } public DeploymentLogs getLogs(DeploymentLogsRequest body) { - return serviceManager - .onlineDeployments() - .getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return serviceManager.onlineDeployments().getLogs(resourceGroupName, workspaceName, endpointName, + deploymentName, body); } public OnlineDeploymentImpl withRegion(Region location) { 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..972d4b3da6e97 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 @@ -45,189 +45,134 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OnlineDeploymentsClient. */ +/** + * An instance of this class provides access to all the operations defined in OnlineDeploymentsClient. + */ public final class OnlineDeploymentsClientImpl implements OnlineDeploymentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OnlineDeploymentsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of OnlineDeploymentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - OnlineDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(OnlineDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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 + * 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") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @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/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 202, 204}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @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/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @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}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @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}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 202}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 201}) + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OnlineDeploymentInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}/getLogs") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") OnlineDeploymentInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLogs( - @HostParam("$host") String endpoint, + Mono> getLogs(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentLogsRequest body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}/skus") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DeploymentLogsRequest body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkus( - @HostParam("$host") String endpoint, + Mono> listSkus(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @QueryParam("count") Integer count, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, @QueryParam("count") Integer count, + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSkusNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List Inference Endpoint Deployments. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -238,22 +183,18 @@ Mono> listSkusNext( * @throws ManagementException 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 OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -268,35 +209,16 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - 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)) + context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, 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 Inference Endpoint Deployments. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -308,28 +230,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -344,32 +256,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - 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(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, 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 Inference Endpoint Deployments. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -382,8 +277,8 @@ private Mono> listSinglePageAsync( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -391,7 +286,7 @@ private PagedFlux listAsync( /** * List Inference Endpoint Deployments. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -401,8 +296,8 @@ private PagedFlux listAsync( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -413,7 +308,7 @@ private PagedFlux listAsync( /** * List Inference Endpoint Deployments. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -427,14 +322,8 @@ private PagedFlux listAsync( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -442,7 +331,7 @@ private PagedFlux listAsync( /** * List Inference Endpoint Deployments. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -452,8 +341,8 @@ private PagedFlux listAsync( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String endpointName) { + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName) { final String orderBy = null; final Integer top = null; final String skip = null; @@ -462,7 +351,7 @@ public PagedIterable list( /** * List Inference Endpoint Deployments. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -476,21 +365,15 @@ public PagedIterable list( * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip, Context context) { return new PagedIterable<>( listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context)); } /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -501,19 +384,15 @@ public PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -531,24 +410,14 @@ private Mono>> deleteWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context)) + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -560,19 +429,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -589,22 +454,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context); } /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -615,19 +471,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -639,19 +493,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -662,14 +515,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).getSyncPoller(); } /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -681,16 +534,15 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) .getSyncPoller(); } /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -701,16 +553,15 @@ public SyncPoller, Void> beginDelete( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -722,16 +573,15 @@ private Mono deleteAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -747,7 +597,7 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -758,14 +608,14 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi * @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 endpointName, String deploymentName, Context context) { + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); } /** * Get Inference Deployment Deployment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -776,19 +626,15 @@ public void delete( * @return inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -806,24 +652,14 @@ private Mono> getWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get Inference Deployment Deployment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -835,19 +671,15 @@ private Mono> getWithResponseAsync( * @return inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -864,22 +696,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, deploymentName, this.client.getApiVersion(), accept, context); } /** * Get Inference Deployment Deployment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -890,15 +713,15 @@ private Mono> getWithResponseAsync( * @return inference Deployment Deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get Inference Deployment Deployment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -910,14 +733,14 @@ private Mono getAsync( * @return inference Deployment Deployment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); } /** * Get Inference Deployment Deployment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -928,14 +751,14 @@ public Response getWithResponse( * @return inference Deployment Deployment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + public OnlineDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -947,23 +770,15 @@ public OnlineDeploymentInner get( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -986,25 +801,14 @@ private Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1017,24 +821,15 @@ private Mono>> updateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1056,23 +851,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1085,26 +870,18 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineDeploymentInner.class, - OnlineDeploymentInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, + this.client.getContext()); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1118,24 +895,18 @@ private PollerFlux, OnlineDeploymentInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context) { + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + PartialMinimalTrackedResourceWithSku body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1147,20 +918,15 @@ private PollerFlux, OnlineDeploymentInner> beg * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) + public SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .getSyncPoller(); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1173,21 +939,16 @@ public SyncPoller, OnlineDeploymentInner> begi * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, + public SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .getSyncPoller(); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1199,20 +960,15 @@ public SyncPoller, OnlineDeploymentInner> begi * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .last() + private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialMinimalTrackedResourceWithSku body) { + return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1225,21 +981,15 @@ private Mono updateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() + private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1251,18 +1001,14 @@ private Mono updateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body) { + public OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialMinimalTrackedResourceWithSku body) { return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); } /** * Update Online Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1275,19 +1021,14 @@ public OnlineDeploymentInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context) { + public OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); } /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1299,23 +1040,15 @@ public OnlineDeploymentInner update( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1337,26 +1070,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1369,24 +1091,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1408,23 +1121,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); } /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1437,26 +1140,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OnlineDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineDeploymentInner.class, - OnlineDeploymentInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, + this.client.getContext()); } /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1470,25 +1165,18 @@ private PollerFlux, OnlineDeploymentInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OnlineDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + OnlineDeploymentInner body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, + endpointName, deploymentName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); } /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1501,19 +1189,15 @@ private PollerFlux, OnlineDeploymentInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .getSyncPoller(); } /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1527,12 +1211,8 @@ public SyncPoller, OnlineDeploymentInner> begi */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + OnlineDeploymentInner body, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .getSyncPoller(); @@ -1540,7 +1220,7 @@ public SyncPoller, OnlineDeploymentInner> begi /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1552,20 +1232,15 @@ public SyncPoller, OnlineDeploymentInner> begi * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, OnlineDeploymentInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1578,21 +1253,15 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, OnlineDeploymentInner body, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1604,18 +1273,14 @@ private Mono createOrUpdateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body) { + public OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, OnlineDeploymentInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); } /** * Create or update Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1628,20 +1293,15 @@ public OnlineDeploymentInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { + public OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, OnlineDeploymentInner body, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .block(); } /** * Polls an Endpoint operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1653,23 +1313,15 @@ public OnlineDeploymentInner createOrUpdate( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLogsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body) { + private Mono> getLogsWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, DeploymentLogsRequest body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1691,26 +1343,15 @@ private Mono> getLogsWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getLogs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.getLogs(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Polls an Endpoint operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1723,24 +1364,15 @@ private Mono> getLogsWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLogsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context) { + private Mono> getLogsWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, DeploymentLogsRequest body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1762,23 +1394,13 @@ private Mono> getLogsWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getLogs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); + return service.getLogs(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); } /** * Polls an Endpoint operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1790,19 +1412,15 @@ private Mono> getLogsWithResponseAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getLogsAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body) { + private Mono getLogsAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, DeploymentLogsRequest body) { return getLogsWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Polls an Endpoint operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1815,20 +1433,15 @@ private Mono getLogsAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLogsWithResponse( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context) { + public Response getLogsWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, DeploymentLogsRequest body, Context context) { return getLogsWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) .block(); } /** * Polls an Endpoint operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1840,19 +1453,15 @@ public Response getLogsWithResponse( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentLogsInner getLogs( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body) { + public DeploymentLogsInner getLogs(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, DeploymentLogsRequest body) { return getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, Context.NONE) .getValue(); } /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1863,27 +1472,18 @@ public DeploymentLogsInner getLogs( * @throws ManagementException 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 SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip) { + private Mono> listSkusSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Integer count, String skip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1900,36 +1500,17 @@ private Mono> listSkusSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSkus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - count, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), count, + 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 Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -1941,28 +1522,18 @@ private Mono> listSkusSinglePageAsync( * @throws ManagementException 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 SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context) { + private Mono> listSkusSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Integer count, String skip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1980,32 +1551,15 @@ private Mono> listSkusSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listSkus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - count, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, deploymentName, this.client.getApiVersion(), count, skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -2018,13 +1572,8 @@ private Mono> listSkusSinglePageAsync( * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip) { + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Integer count, String skip) { return new PagedFlux<>( () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip), nextLink -> listSkusNextSinglePageAsync(nextLink)); @@ -2032,7 +1581,7 @@ private PagedFlux listSkusAsync( /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -2043,8 +1592,8 @@ private PagedFlux listSkusAsync( * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { final Integer count = null; final String skip = null; return new PagedFlux<>( @@ -2054,7 +1603,7 @@ private PagedFlux listSkusAsync( /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -2068,24 +1617,15 @@ private PagedFlux listSkusAsync( * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context) { - return new PagedFlux<>( - () -> - listSkusSinglePageAsync( - resourceGroupName, workspaceName, endpointName, deploymentName, count, skip, context), - nextLink -> listSkusNextSinglePageAsync(nextLink, context)); + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Integer count, String skip, Context context) { + return new PagedFlux<>(() -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, + deploymentName, count, skip, context), nextLink -> listSkusNextSinglePageAsync(nextLink, context)); } /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -2096,8 +1636,8 @@ private PagedFlux listSkusAsync( * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { final Integer count = null; final String skip = null; return new PagedIterable<>( @@ -2106,7 +1646,7 @@ public PagedIterable listSkus( /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -2120,28 +1660,23 @@ public PagedIterable listSkus( * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context) { + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Integer count, String skip, Context context) { return new PagedIterable<>( listSkusAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2149,37 +1684,28 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -2187,36 +1713,27 @@ private Mono> listNextSinglePageAsync(Strin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSkusNextSinglePageAsync(String nextLink) { @@ -2224,37 +1741,29 @@ private Mono> listSkusNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listSkusNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSkusNextSinglePageAsync(String nextLink, Context context) { @@ -2262,23 +1771,13 @@ private Mono> listSkusNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSkusNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listSkusNext(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/OnlineDeploymentsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java index 4c98b529a0d7e..f4cce98e550f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java @@ -26,62 +26,50 @@ public final class OnlineDeploymentsImpl implements OnlineDeployments { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public OnlineDeploymentsImpl( - OnlineDeploymentsClient innerClient, + public OnlineDeploymentsImpl(OnlineDeploymentsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return Utils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return Utils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); } - public void delete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, + endpointName, deploymentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new OnlineDeploymentImpl(inner.getValue(), this.manager())); } else { return null; } } - public OnlineDeployment get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - OnlineDeploymentInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); + public OnlineDeployment get(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + OnlineDeploymentInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); if (inner != null) { return new OnlineDeploymentImpl(inner, this.manager()); } else { @@ -89,36 +77,22 @@ public OnlineDeployment get( } } - public Response getLogsWithResponse( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context) { - Response inner = - this - .serviceClient() - .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + public Response getLogsWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, DeploymentLogsRequest body, Context context) { + Response inner = this.serviceClient().getLogsWithResponse(resourceGroupName, workspaceName, + endpointName, deploymentName, body, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DeploymentLogsImpl(inner.getValue(), this.manager())); } else { return null; } } - public DeploymentLogs getLogs( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body) { - DeploymentLogsInner inner = - this.serviceClient().getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); + public DeploymentLogs getLogs(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, DeploymentLogsRequest body) { + DeploymentLogsInner inner + = this.serviceClient().getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); if (inner != null) { return new DeploymentLogsImpl(inner, this.manager()); } else { @@ -126,162 +100,113 @@ public DeploymentLogs getLogs( } } - public PagedIterable listSkus( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - PagedIterable inner = - this.serviceClient().listSkus(resourceGroupName, workspaceName, endpointName, deploymentName); - return Utils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + PagedIterable inner + = this.serviceClient().listSkus(resourceGroupName, workspaceName, endpointName, deploymentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); } - public PagedIterable listSkus( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listSkus(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip, context); - return Utils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Integer count, String skip, Context context) { + PagedIterable inner = this.serviceClient().listSkus(resourceGroupName, workspaceName, + endpointName, deploymentName, count, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); } public OnlineDeployment getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); } - String deploymentName = Utils.getValueFromIdByName(id, "deployments"); + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } - return this - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); } - String deploymentName = Utils.getValueFromIdByName(id, "deployments"); + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); } - String deploymentName = Utils.getValueFromIdByName(id, "deployments"); + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); } - String deploymentName = Utils.getValueFromIdByName(id, "deployments"); + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); } this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java index f45e6848ce3ae..58b323930b233 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java @@ -106,20 +106,14 @@ public OnlineEndpointImpl withExistingWorkspace(String resourceGroupName, String } public OnlineEndpoint create() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getOnlineEndpoints().createOrUpdate(resourceGroupName, + workspaceName, endpointName, this.innerModel(), Context.NONE); return this; } public OnlineEndpoint create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getOnlineEndpoints().createOrUpdate(resourceGroupName, + workspaceName, endpointName, this.innerModel(), context); return this; } @@ -135,57 +129,41 @@ public OnlineEndpointImpl update() { } public OnlineEndpoint apply() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, Context.NONE); + this.innerObject = serviceManager.serviceClient().getOnlineEndpoints().update(resourceGroupName, workspaceName, + endpointName, updateBody, Context.NONE); return this; } public OnlineEndpoint apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, context); + this.innerObject = serviceManager.serviceClient().getOnlineEndpoints().update(resourceGroupName, workspaceName, + endpointName, updateBody, context); return this; } - OnlineEndpointImpl( - OnlineEndpointInner innerObject, + OnlineEndpointImpl(OnlineEndpointInner 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.endpointName = Utils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); } public OnlineEndpoint refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getOnlineEndpoints() + .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); return this; } public OnlineEndpoint refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getOnlineEndpoints() + .getWithResponse(resourceGroupName, workspaceName, endpointName, context).getValue(); return this; } public Response listKeysWithResponse(Context context) { - return serviceManager - .onlineEndpoints() - .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); + return serviceManager.onlineEndpoints().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, + context); } public EndpointAuthKeys listKeys() { @@ -201,9 +179,8 @@ public void regenerateKeys(RegenerateEndpointKeysRequest body, Context context) } public Response getTokenWithResponse(Context context) { - return serviceManager - .onlineEndpoints() - .getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); + return serviceManager.onlineEndpoints().getTokenWithResponse(resourceGroupName, workspaceName, endpointName, + context); } public EndpointAuthToken getToken() { 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..33617a90e3e30 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 @@ -46,185 +46,136 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OnlineEndpointsClient. */ +/** + * An instance of this class provides access to all the operations defined in OnlineEndpointsClient. + */ public final class OnlineEndpointsClientImpl implements OnlineEndpointsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OnlineEndpointsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of OnlineEndpointsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - OnlineEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(OnlineEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface OnlineEndpointsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("name") String name, - @QueryParam("count") Integer count, - @QueryParam("computeType") EndpointComputeType computeType, - @QueryParam("$skip") String skip, - @QueryParam("tags") String tags, - @QueryParam("properties") String properties, - @QueryParam("orderBy") OrderString orderBy, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({200, 202, 204}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @QueryParam("name") String name, + @QueryParam("count") Integer count, @QueryParam("computeType") EndpointComputeType computeType, + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @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}/onlineEndpoints/{endpointName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OnlineEndpointInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") OnlineEndpointInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/listKeys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") String endpoint, + Mono> listKeys(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/regenerateKeys") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKeys( - @HostParam("$host") String endpoint, + Mono>> regenerateKeys(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RegenerateEndpointKeysRequest body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RegenerateEndpointKeysRequest body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getToken( - @HostParam("$host") String endpoint, + Mono> getToken(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List Online Endpoints. - * + * * @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 the endpoint. @@ -232,38 +183,27 @@ Mono> listNext( * @param computeType EndpointComputeType to be filtered by. * @param skip Continuation token for pagination. * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . * @param orderBy The option to order the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String name, Integer count, EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -274,39 +214,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - name, - count, - computeType, - skip, - tags, - properties, - orderBy, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), name, count, computeType, skip, tags, + properties, orderBy, 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 Online Endpoints. - * + * * @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 the endpoint. @@ -314,40 +232,28 @@ private Mono> listSinglePageAsync( * @param computeType EndpointComputeType to be filtered by. * @param skip Continuation token for pagination. * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . * @param orderBy The option to order the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String name, Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -359,35 +265,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - name, - count, - computeType, - skip, - tags, - properties, - orderBy, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + this.client.getApiVersion(), name, count, computeType, skip, tags, properties, orderBy, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List Online Endpoints. - * + * * @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 the endpoint. @@ -395,9 +281,9 @@ private Mono> listSinglePageAsync( * @param computeType EndpointComputeType to be filtered by. * @param skip Continuation token for pagination. * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . * @param orderBy The option to order the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -405,26 +291,16 @@ private Mono> listSinglePageAsync( * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + Integer count, EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy), - nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, + skip, tags, properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List Online Endpoints. - * + * * @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. @@ -441,16 +317,13 @@ private PagedFlux listAsync(String resourceGroupName, Strin final String tags = null; final String properties = null; final OrderString orderBy = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy), - nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, + skip, tags, properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List Online Endpoints. - * + * * @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 the endpoint. @@ -458,9 +331,9 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @param computeType EndpointComputeType to be filtered by. * @param skip Continuation token for pagination. * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . * @param orderBy The option to order the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -469,36 +342,16 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - name, - count, - computeType, - skip, - tags, - properties, - orderBy, - context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, + skip, tags, properties, orderBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List Online Endpoints. - * + * * @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. @@ -521,7 +374,7 @@ public PagedIterable list(String resourceGroupName, String /** * List Online Endpoints. - * + * * @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 the endpoint. @@ -529,9 +382,9 @@ public PagedIterable list(String resourceGroupName, String * @param computeType EndpointComputeType to be filtered by. * @param skip Continuation token for pagination. * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . * @param orderBy The option to order the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -540,25 +393,16 @@ public PagedIterable list(String resourceGroupName, String * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, - Context context) { - return new PagedIterable<>( - listAsync( - resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy, context)); + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, count, computeType, skip, tags, + properties, orderBy, context)); } /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -568,19 +412,15 @@ public PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -594,24 +434,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -622,19 +452,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -648,21 +474,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), accept, context); } /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -672,18 +490,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -694,19 +510,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -716,14 +531,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName) { return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName).getSyncPoller(); } /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -734,14 +549,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, Context context) { return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).getSyncPoller(); } /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -752,14 +567,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName) - .last() + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -770,16 +584,15 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -794,7 +607,7 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -810,7 +623,7 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi /** * Get Online Endpoint. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -820,19 +633,15 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi * @return online Endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -846,24 +655,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get Online Endpoint. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -874,19 +673,15 @@ private Mono> getWithResponseAsync( * @return online Endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -900,21 +695,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, this.client.getApiVersion(), accept, context); } /** * Get Online Endpoint. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -931,7 +718,7 @@ private Mono getAsync(String resourceGroupName, String work /** * Get Online Endpoint. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -942,14 +729,14 @@ private Mono getAsync(String resourceGroupName, String work * @return online Endpoint along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** * Get Online Endpoint. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -965,7 +752,7 @@ public OnlineEndpointInner get(String resourceGroupName, String workspaceName, S /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -976,22 +763,15 @@ public OnlineEndpointInner get(String resourceGroupName, String workspaceName, S * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, PartialMinimalTrackedResourceWithIdentity body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1010,25 +790,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1040,23 +809,15 @@ private Mono>> updateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1075,22 +836,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); } /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1101,26 +853,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineEndpointInner.class, - OnlineEndpointInner.class, - this.client.getContext()); + private PollerFlux, OnlineEndpointInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + OnlineEndpointInner.class, OnlineEndpointInner.class, this.client.getContext()); } /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1132,24 +875,18 @@ private PollerFlux, OnlineEndpointInner> beginUp * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { + private PollerFlux, OnlineEndpointInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), OnlineEndpointInner.class, OnlineEndpointInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + OnlineEndpointInner.class, OnlineEndpointInner.class, context); } /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1160,17 +897,14 @@ private PollerFlux, OnlineEndpointInner> beginUp * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { + public SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); } /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1182,18 +916,14 @@ public SyncPoller, OnlineEndpointInner> beginUpd * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { + public SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); } /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1204,19 +934,15 @@ public SyncPoller, OnlineEndpointInner> beginUpd * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, + private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body) - .last() + return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1228,20 +954,15 @@ private Mono updateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() + private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1252,17 +973,14 @@ private Mono updateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, + public OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); } /** * Update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1274,18 +992,14 @@ public OnlineEndpointInner update( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { + public OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body, Context context) { return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); } /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1296,19 +1010,15 @@ public OnlineEndpointInner update( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, OnlineEndpointInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1327,25 +1037,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1357,23 +1056,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, OnlineEndpointInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1392,22 +1083,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); } /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1420,21 +1102,15 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OnlineEndpointInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineEndpointInner.class, - OnlineEndpointInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + OnlineEndpointInner.class, OnlineEndpointInner.class, this.client.getContext()); } /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1447,23 +1123,18 @@ private PollerFlux, OnlineEndpointInner> beginCr */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OnlineEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), OnlineEndpointInner.class, OnlineEndpointInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + OnlineEndpointInner.class, OnlineEndpointInner.class, context); } /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1481,7 +1152,7 @@ public SyncPoller, OnlineEndpointInner> beginCre /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1494,19 +1165,15 @@ public SyncPoller, OnlineEndpointInner> beginCre */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) .getSyncPoller(); } /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1517,16 +1184,15 @@ public SyncPoller, OnlineEndpointInner> beginCre * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, OnlineEndpointInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1538,20 +1204,15 @@ private Mono createOrUpdateAsync( * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, OnlineEndpointInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1562,14 +1223,14 @@ private Mono createOrUpdateAsync( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { + public OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + OnlineEndpointInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); } /** * Create or update Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1581,18 +1242,14 @@ public OnlineEndpointInner createOrUpdate( * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, - Context context) { + public OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + OnlineEndpointInner body, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1602,19 +1259,15 @@ public OnlineEndpointInner createOrUpdate( * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1628,24 +1281,14 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1656,19 +1299,15 @@ private Mono> listKeysWithResponseAsync( * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1682,21 +1321,13 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); + return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), accept, context); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1706,15 +1337,15 @@ private Mono> listKeysWithResponseAsync( * @return keys for endpoint authentication on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono listKeysAsync(String resourceGroupName, String workspaceName, + String endpointName) { return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1725,14 +1356,14 @@ private Mono listKeysAsync( * @return keys for endpoint authentication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1748,7 +1379,7 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1759,19 +1390,15 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { + private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1790,25 +1417,14 @@ private Mono>> regenerateKeysWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .regenerateKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) + .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1820,23 +1436,15 @@ private Mono>> regenerateKeysWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { + private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, RegenerateEndpointKeysRequest body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1855,22 +1463,13 @@ private Mono>> regenerateKeysWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .regenerateKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); + return service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1881,19 +1480,17 @@ private Mono>> regenerateKeysWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRegenerateKeysAsync( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - Mono>> mono = - regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginRegenerateKeysAsync(String resourceGroupName, String workspaceName, + String endpointName, RegenerateEndpointKeysRequest body) { + Mono>> mono + = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1905,23 +1502,18 @@ private PollerFlux, Void> beginRegenerateKeysAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRegenerateKeysAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { + private PollerFlux, Void> beginRegenerateKeysAsync(String resourceGroupName, String workspaceName, + String endpointName, RegenerateEndpointKeysRequest body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1932,14 +1524,14 @@ private PollerFlux, Void> beginRegenerateKeysAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRegenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { + public SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, + String endpointName, RegenerateEndpointKeysRequest body) { return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1951,20 +1543,15 @@ public SyncPoller, Void> beginRegenerateKeys( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRegenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { - return this - .beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context) + public SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, + String endpointName, RegenerateEndpointKeysRequest body, Context context) { + return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context) .getSyncPoller(); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1975,16 +1562,15 @@ public SyncPoller, Void> beginRegenerateKeys( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeysAsync( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body) - .last() + private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, String endpointName, + RegenerateEndpointKeysRequest body) { + return beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -1996,20 +1582,15 @@ private Mono regenerateKeysAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeysAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() + private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, String endpointName, + RegenerateEndpointKeysRequest body, Context context) { + return beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -2019,14 +1600,14 @@ private Mono regenerateKeysAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void regenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { + public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateEndpointKeysRequest body) { regenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).block(); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -2037,18 +1618,14 @@ public void regenerateKeys( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void regenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { + public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateEndpointKeysRequest body, Context context) { regenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); } /** - * 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. * @param endpointName Online Endpoint name. @@ -2058,19 +1635,15 @@ public void regenerateKeys( * @return service Token along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getTokenWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono> getTokenWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2084,24 +1657,14 @@ private Mono> getTokenWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getToken(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. * @param endpointName Online Endpoint name. @@ -2112,19 +1675,15 @@ private Mono> getTokenWithResponseAsync( * @return service Token along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getTokenWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + private Mono> getTokenWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2138,21 +1697,13 @@ private Mono> getTokenWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); + return service.getToken(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, this.client.getApiVersion(), accept, 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. * @param endpointName Online Endpoint name. @@ -2162,15 +1713,15 @@ private Mono> getTokenWithResponseAsync( * @return service Token on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getTokenAsync( - String resourceGroupName, String workspaceName, String endpointName) { + private Mono getTokenAsync(String resourceGroupName, String workspaceName, + String endpointName) { return getTokenWithResponseAsync(resourceGroupName, workspaceName, endpointName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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. * @param endpointName Online Endpoint name. @@ -2181,14 +1732,14 @@ private Mono getTokenAsync( * @return service Token along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTokenWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { + public Response getTokenWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { return getTokenWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); } /** - * 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. * @param endpointName Online Endpoint name. @@ -2204,14 +1755,15 @@ public EndpointAuthTokenInner getToken(String resourceGroupName, String workspac /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2219,37 +1771,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -2257,23 +1800,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java index 6bf5914ab736e..3e1bf90eb7ba2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java @@ -28,8 +28,7 @@ public final class OnlineEndpointsImpl implements OnlineEndpoints { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public OnlineEndpointsImpl( - OnlineEndpointsClient innerClient, + public OnlineEndpointsImpl(OnlineEndpointsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -37,35 +36,15 @@ public OnlineEndpointsImpl( public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - resourceGroupName, - workspaceName, - name, - count, - computeType, - skip, - tags, - properties, - orderBy, - context); - return Utils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name, + count, computeType, skip, tags, properties, orderBy, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String endpointName) { @@ -76,15 +55,12 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new OnlineEndpointImpl(inner.getValue(), this.manager())); } else { return null; @@ -100,15 +76,12 @@ public OnlineEndpoint get(String resourceGroupName, String workspaceName, String } } - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + Response inner + = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new EndpointAuthKeysImpl(inner.getValue(), this.manager())); } else { return null; @@ -124,29 +97,22 @@ public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, } } - public void regenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { + public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateEndpointKeysRequest body) { this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); } - public void regenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { + public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateEndpointKeysRequest body, Context context) { this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body, context); } - public Response getTokenWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); + public Response getTokenWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + Response inner + = this.serviceClient().getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new EndpointAuthTokenImpl(inner.getValue(), this.manager())); } else { return null; @@ -163,109 +129,77 @@ public EndpointAuthToken getToken(String resourceGroupName, String workspaceName } public OnlineEndpoint getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, endpointName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); } this.delete(resourceGroupName, workspaceName, endpointName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String endpointName = Utils.getValueFromIdByName(id, "onlineEndpoints"); + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "onlineEndpoints"); if (endpointName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'onlineEndpoints'.", id))); } this.delete(resourceGroupName, workspaceName, endpointName, context); } 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..99e81f54aa8ee --- /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..52d69a6933a90 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,153 +25,149 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.MachineLearningServices/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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()); } /** * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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)); } /** * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { + public PagedIterable list() { return new PagedIterable<>(listAsync()); } /** * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an array of operations supported by the resource provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { + 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..dda6d3e325819 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 { @@ -19,20 +19,20 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + public OperationsImpl(OperationsClient 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 AmlOperationImpl(inner1, this.manager())); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.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 ResourceManagerUtils.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..41fa807cff37d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java @@ -0,0 +1,123 @@ +// Copyright (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 = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.ruleName = ResourceManagerUtils.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/PackageResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PackageResponseImpl.java new file mode 100644 index 0000000000000..033c81101f312 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PackageResponseImpl.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.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.PackageResponseInner; +import com.azure.resourcemanager.machinelearning.models.BaseEnvironmentSource; +import com.azure.resourcemanager.machinelearning.models.InferencingServer; +import com.azure.resourcemanager.machinelearning.models.ModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelPackageInput; +import com.azure.resourcemanager.machinelearning.models.PackageBuildState; +import com.azure.resourcemanager.machinelearning.models.PackageResponse; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class PackageResponseImpl implements PackageResponse { + private PackageResponseInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + PackageResponseImpl(PackageResponseInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public BaseEnvironmentSource baseEnvironmentSource() { + return this.innerModel().baseEnvironmentSource(); + } + + public String buildId() { + return this.innerModel().buildId(); + } + + public PackageBuildState buildState() { + return this.innerModel().buildState(); + } + + public Map environmentVariables() { + Map inner = this.innerModel().environmentVariables(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public InferencingServer inferencingServer() { + return this.innerModel().inferencingServer(); + } + + public List inputs() { + List inner = this.innerModel().inputs(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String logUrl() { + return this.innerModel().logUrl(); + } + + public ModelConfiguration modelConfiguration() { + return this.innerModel().modelConfiguration(); + } + + public Map properties() { + Map inner = this.innerModel().properties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String targetEnvironmentId() { + return this.innerModel().targetEnvironmentId(); + } + + public PackageResponseInner 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/PendingUploadResponseDtoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java new file mode 100644 index 0000000000000..dd3dc73314e88 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/PoolStatusImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PoolStatusImpl.java new file mode 100644 index 0000000000000..cad298956c58c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PoolStatusImpl.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.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.PoolStatusInner; +import com.azure.resourcemanager.machinelearning.models.PoolStatus; + +public final class PoolStatusImpl implements PoolStatus { + private PoolStatusInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + PoolStatusImpl(PoolStatusInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Integer actualCapacity() { + return this.innerModel().actualCapacity(); + } + + public Integer groupCount() { + return this.innerModel().groupCount(); + } + + public Integer requestedCapacity() { + return this.innerModel().requestedCapacity(); + } + + public Integer reservedCapacity() { + return this.innerModel().reservedCapacity(); + } + + public PoolStatusInner 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/PrivateEndpointConnectionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java index edc0d80a01ead..0762867a5382f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java @@ -9,11 +9,11 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource; import java.util.Collections; import java.util.Map; @@ -43,6 +43,10 @@ public String location() { return this.innerModel().location(); } + public Sku sku() { + return this.innerModel().sku(); + } + public Map tags() { Map inner = this.innerModel().tags(); if (inner != null) { @@ -52,15 +56,11 @@ public Map tags() { } } - public Sku sku() { - return this.innerModel().sku(); - } - public SystemData systemData() { return this.innerModel().systemData(); } - public PrivateEndpoint privateEndpoint() { + public WorkspacePrivateEndpointResource privateEndpoint() { return this.innerModel().privateEndpoint(); } @@ -105,29 +105,21 @@ public PrivateEndpointConnectionImpl withExistingWorkspace(String resourceGroupN } public PrivateEndpointConnection create() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, + this.innerModel(), Context.NONE) + .getValue(); return this; } public PrivateEndpointConnection create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections().createOrUpdateWithResponse( + resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), context).getValue(); return this; } - PrivateEndpointConnectionImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + PrivateEndpointConnectionImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = new PrivateEndpointConnectionInner(); this.serviceManager = serviceManager; this.privateEndpointConnectionName = name; @@ -138,54 +130,38 @@ public PrivateEndpointConnectionImpl update() { } public PrivateEndpointConnection apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, + this.innerModel(), Context.NONE) + .getValue(); return this; } public PrivateEndpointConnection apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections().createOrUpdateWithResponse( + resourceGroupName, workspaceName, privateEndpointConnectionName, this.innerModel(), context).getValue(); return this; } - PrivateEndpointConnectionImpl( - PrivateEndpointConnectionInner innerObject, + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner 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.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); } public PrivateEndpointConnection refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE).getValue(); return this; } public PrivateEndpointConnection refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context).getValue(); return this; } @@ -214,14 +190,20 @@ public PrivateEndpointConnectionImpl withSku(Sku sku) { return this; } - public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + public PrivateEndpointConnectionImpl withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint) { this.innerModel().withPrivateEndpoint(privateEndpoint); return this; } - public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionImpl + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } + + public PrivateEndpointConnectionImpl + withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState) { + this.innerModel().withProvisioningState(provisioningState); + return this; + } } 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..2d30cb2ea8aa4 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 @@ -33,121 +33,101 @@ import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateEndpointConnectionsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - PrivateEndpointConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy - .create( - PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + PrivateEndpointConnectionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * 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") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateEndpointConnectionInner properties, - @HeaderParam("Accept") String accept, - Context context); + @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}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner body, @HeaderParam("Accept") String accept, Context context); } /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified workspace along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -156,52 +136,37 @@ private Mono> listSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified workspace along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -210,39 +175,25 @@ private Mono> listSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + .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(), null, null)); } /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { @@ -250,33 +201,33 @@ private PagedFlux listAsync(String resourceGroup } /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedFlux}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Context context) { + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + Context context) { return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context)); } /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { @@ -284,49 +235,44 @@ public PagedIterable list(String resourceGroupNa } /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); } /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 specified private endpoint connection associated with the workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -336,55 +282,39 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - accept, - context)) + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 specified private endpoint connection associated with the workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -394,110 +324,89 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); } /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 specified private endpoint connection associated with the workspace on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) + .flatMap(ignored -> Mono.empty()); } /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); + public Response deleteWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) + .block(); } /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 specified private endpoint connection associated with the workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); + public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); } /** - * Update the state of specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties) { + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -507,66 +416,40 @@ private Mono> createOrUpdateWithRespons return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - properties, - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update the state of specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties, - Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -576,61 +459,39 @@ private Mono> createOrUpdateWithRespons return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - properties, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + privateEndpointConnectionName, this.client.getApiVersion(), accept, context); } /** - * Update the state of specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, properties) + private Mono getAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Update the state of specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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. @@ -638,65 +499,53 @@ private Mono createOrUpdateAsync( * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, properties, context) - .block(); + public Response getWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); } /** - * Update the state of specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties) { - return createOrUpdateWithResponse( - resourceGroupName, workspaceName, privateEndpointConnectionName, properties, Context.NONE) + public PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) .getValue(); } /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection 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 {@link Response} on successful completion of {@link Mono}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -706,54 +555,48 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (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 - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), body, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection 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 {@link Response} on successful completion of {@link Mono}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner body, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -763,74 +606,79 @@ private Mono> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (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 - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), body, accept, context); } /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection 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 A {@link Mono} that completes when a successful response is received. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap(ignored -> Mono.empty()); + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection 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 {@link Response}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner body, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body, + context).block(); } /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection 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 Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, body, + Context.NONE).getValue(); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java index 33910826bfaf3..fcb065c55eaa0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java @@ -21,47 +21,51 @@ public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConn private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public PrivateEndpointConnectionsImpl( - PrivateEndpointConnectionsClient innerClient, + public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient 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 PrivateEndpointConnectionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(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 PrivateEndpointConnectionImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + public Response deleteWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, + context); + } + + public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + workspaceName, privateEndpointConnectionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateEndpointConnection get( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, privateEndpointConnectionName); + public PrivateEndpointConnection get(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, privateEndpointConnectionName); if (inner != null) { return new PrivateEndpointConnectionImpl(inner, this.manager()); } else { @@ -69,131 +73,83 @@ public PrivateEndpointConnection get( } } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); - } - public PrivateEndpointConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } - return this - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) + return this.getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } this.deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } return this.deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 0000000000000..38f81ab027a55 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + PrivateLinkResourceImpl(PrivateLinkResourceInner 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 ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public String location() { + return this.innerModel().location(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String groupId() { + return this.innerModel().groupId(); + } + + public List requiredMembers() { + List inner = this.innerModel().requiredMembers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List requiredZoneNames() { + List inner = this.innerModel().requiredZoneNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourceInner 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/PrivateLinkResourcesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java index e5f6ffba120f0..f2e4bccb7edf5 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 @@ -16,83 +16,87 @@ 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.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateLinkResourcesService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - PrivateLinkResourcesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy - .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + PrivateLinkResourcesClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * 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}") @ServiceInterface(name = "AzureMachineLearning") public interface PrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** - * Gets the private link resources that need to be created for a workspace. - * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -103,46 +107,39 @@ private Mono> listWithResponseAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context)) + .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(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the private link resources that need to be created for a workspace. - * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -154,61 +151,89 @@ private Mono> listWithResponseAsync 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); + .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(), null, null)); } /** - * Gets the private link resources that need to be created for a workspace. - * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace on successful completion of {@link - * Mono}. + * @return a list of private link resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String workspaceName) { - return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName)); } /** - * Gets the private link resources that need to be created for a workspace. - * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace along with {@link Response}. + * @return a list of private link resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context)); } /** - * Gets the private link resources that need to be created for a workspace. - * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName) { - return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + } + + /** + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 list of private link resources 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)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java index d230fde3cbf93..25326aabb7dee 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.machinelearning.implementation; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; import com.azure.resourcemanager.machinelearning.models.PrivateLinkResources; public final class PrivateLinkResourcesImpl implements PrivateLinkResources { @@ -20,35 +19,21 @@ public final class PrivateLinkResourcesImpl implements PrivateLinkResources { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public PrivateLinkResourcesImpl( - PrivateLinkResourcesClient innerClient, + public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName) { - PrivateLinkResourceListResultInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new PrivateLinkResourceListResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } private PrivateLinkResourcesClient serviceClient() { 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..869e683720f70 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 @@ -34,97 +34,87 @@ import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in QuotasClient. */ +/** + * An instance of this class provides access to all the operations defined in QuotasClient. + */ public final class QuotasClientImpl implements QuotasClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final QuotasService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + 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 + * 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") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, + Mono> update(@HostParam("$host") String endpoint, + @PathParam("location") String location, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") QuotaUpdateParameters parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") QuotaUpdateParameters parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Update quota for each VM family in workspace. - * + * * @param location The location for update quota is queried. * @param parameters Quota update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response} on successful completion of {@link - * Mono}. + * @return the result of update workspace quota along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String location, QuotaUpdateParameters parameters) { + private Mono> updateWithResponseAsync(String location, + QuotaUpdateParameters parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -133,49 +123,36 @@ private Mono> updateWithResponseAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), location, this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update quota for each VM family in workspace. - * + * * @param location The location for update quota is queried. * @param parameters Quota update parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response} on successful completion of {@link - * Mono}. + * @return the result of update workspace quota along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String location, QuotaUpdateParameters parameters, Context context) { + private Mono> updateWithResponseAsync(String location, + QuotaUpdateParameters parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -184,20 +161,13 @@ private Mono> updateWithResponseAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), location, this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context); } /** * Update quota for each VM family in workspace. - * + * * @param location The location for update quota is queried. * @param parameters Quota update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -212,7 +182,7 @@ private Mono updateAsync(String location, Quot /** * Update quota for each VM family in workspace. - * + * * @param location The location for update quota is queried. * @param parameters Quota update parameters. * @param context The context to associate with this operation. @@ -222,14 +192,14 @@ private Mono updateAsync(String location, Quot * @return the result of update workspace quota along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context) { + public Response updateWithResponse(String location, + QuotaUpdateParameters parameters, Context context) { return updateWithResponseAsync(location, parameters, context).block(); } /** * Update quota for each VM family in workspace. - * + * * @param location The location for update quota is queried. * @param parameters Quota update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,79 +214,56 @@ public UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParam /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -324,27 +271,15 @@ private Mono> listSinglePageAsync(String locat final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -358,7 +293,7 @@ private PagedFlux listAsync(String location) { /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -368,19 +303,19 @@ private PagedFlux listAsync(String location) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(location, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. + * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location) { @@ -389,14 +324,14 @@ public PagedIterable list(String location) { /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. + * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, Context context) { @@ -405,14 +340,15 @@ public PagedIterable list(String location, Context context) /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List WorkspaceQuotasByVMFamily operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -420,37 +356,28 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List WorkspaceQuotasByVMFamily operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -458,23 +385,13 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java index 14cdcd39648de..c9cde5b0fe6a7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java @@ -24,21 +24,18 @@ public final class QuotasImpl implements Quotas { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public QuotasImpl( - QuotasClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + public QuotasImpl(QuotasClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context) { - Response inner = - this.serviceClient().updateWithResponse(location, parameters, context); + public Response updateWithResponse(String location, QuotaUpdateParameters parameters, + Context context) { + Response inner + = this.serviceClient().updateWithResponse(location, parameters, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new UpdateWorkspaceQuotasResultImpl(inner.getValue(), this.manager())); } else { return null; @@ -56,12 +53,12 @@ public UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters public PagedIterable list(String location) { PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); } public PagedIterable list(String location, Context context) { PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); } private QuotasClient serviceClient() { 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..6931e3ced819f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java @@ -0,0 +1,1421 @@ +// Copyright (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..f2ade7c855291 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.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.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 ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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..3e0fbf80ca73b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java @@ -0,0 +1,943 @@ +// Copyright (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..a491e6685ad85 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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..40e48b10a8e53 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java @@ -0,0 +1,1198 @@ +// Copyright (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..8f57bdc46f21d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java @@ -0,0 +1,205 @@ +// Copyright (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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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..aeabe2f42edf8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java @@ -0,0 +1,949 @@ +// Copyright (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..5e2a79a306618 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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..8bb52299f6510 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java @@ -0,0 +1,1044 @@ +// Copyright (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, + @QueryParam("stage") String stage, @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. + * @param stage Component 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 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, 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 (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, 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 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 stage Component 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 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, 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 (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, 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 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 stage Component 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 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, String stage) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, stage), + 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; + final String stage = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, stage), + 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 stage Component 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 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, String stage, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, + skip, stage, 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; + final String stage = null; + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, stage)); + } + + /** + * 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 stage Component 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 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, String stage, Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, stage, 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..e9fa9853a3c51 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java @@ -0,0 +1,180 @@ +// Copyright (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 ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String componentName, + String orderBy, Integer top, String skip, String stage, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, + componentName, orderBy, top, skip, stage, context); + return ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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..6d68dd66412d4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java @@ -0,0 +1,951 @@ +// Copyright (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..df5bf929a8a45 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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..c0669004af355 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java @@ -0,0 +1,236 @@ +// Copyright (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 value. + * + * @param resourceGroupName 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 value 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 value. + * + * @param resourceGroupName 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 value 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 value. + * + * @param resourceGroupName 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 value 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 value. + * + * @param resourceGroupName 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 value 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 value. + * + * @param resourceGroupName 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 value. + */ + @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..15795769c719b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.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.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..309c98fd6170a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java @@ -0,0 +1,1227 @@ +// Copyright (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..a6637a610505b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java @@ -0,0 +1,205 @@ +// Copyright (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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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..9241958beb68e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java @@ -0,0 +1,966 @@ +// Copyright (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..667556ba0a77a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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..de032f3b99bd5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java @@ -0,0 +1,1065 @@ +// Copyright (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, @QueryParam("stage") String stage, + @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. + * @param stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, 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 (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, 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 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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, 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 (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, 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 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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, String stage) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, + skip, listViewType, stage), 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; + final String stage = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, + skip, listViewType, stage), 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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, String stage, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, + skip, listViewType, stage, 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; + final String stage = null; + return new PagedIterable<>( + listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, stage)); + } + + /** + * 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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, String stage, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, + listViewType, stage, 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..6657ad9114abc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java @@ -0,0 +1,184 @@ +// Copyright (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 ResourceManagerUtils.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, String stage, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, + environmentName, orderBy, top, skip, listViewType, stage, context); + return ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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..335fe147e0821 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java @@ -0,0 +1,296 @@ +// Copyright (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.ManagedResourceGroupSettings; +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 ManagedResourceGroupSettings managedResourceGroupSettings() { + return this.innerModel().managedResourceGroupSettings(); + } + + 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 = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.registryName = ResourceManagerUtils.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 withManagedResourceGroupSettings(ManagedResourceGroupSettings managedResourceGroupSettings) { + this.innerModel().withManagedResourceGroupSettings(managedResourceGroupSettings); + 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..15875c3bfc158 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java @@ -0,0 +1,953 @@ +// Copyright (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..075465e163fe8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.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.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 ResourceManagerUtils.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 ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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..390e52e9154c3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java @@ -0,0 +1,1535 @@ +// Copyright (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.PackageResponseInner; +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.PackageRequest; +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}/package") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> packageMethod(@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") PackageRequest 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(); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> packageMethodWithResponseAsync(String resourceGroupName, + String registryName, String modelName, String version, PackageRequest 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.packageMethod(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())); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> packageMethodWithResponseAsync(String resourceGroupName, + String registryName, String modelName, String version, PackageRequest 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.packageMethod(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + registryName, modelName, version, this.client.getApiVersion(), body, accept, context); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PackageResponseInner> beginPackageMethodAsync( + String resourceGroupName, String registryName, String modelName, String version, PackageRequest body) { + Mono>> mono + = packageMethodWithResponseAsync(resourceGroupName, registryName, modelName, version, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PackageResponseInner.class, PackageResponseInner.class, this.client.getContext()); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PackageResponseInner> beginPackageMethodAsync( + String resourceGroupName, String registryName, String modelName, String version, PackageRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = packageMethodWithResponseAsync(resourceGroupName, registryName, modelName, version, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + PackageResponseInner.class, PackageResponseInner.class, context); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PackageResponseInner> beginPackageMethod( + String resourceGroupName, String registryName, String modelName, String version, PackageRequest body) { + return this.beginPackageMethodAsync(resourceGroupName, registryName, modelName, version, body).getSyncPoller(); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of package response returned after async package operation completes + * successfully. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PackageResponseInner> beginPackageMethod( + String resourceGroupName, String registryName, String modelName, String version, PackageRequest body, + Context context) { + return this.beginPackageMethodAsync(resourceGroupName, registryName, modelName, version, body, context) + .getSyncPoller(); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono packageMethodAsync(String resourceGroupName, String registryName, + String modelName, String version, PackageRequest body) { + return beginPackageMethodAsync(resourceGroupName, registryName, modelName, version, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono packageMethodAsync(String resourceGroupName, String registryName, + String modelName, String version, PackageRequest body, Context context) { + return beginPackageMethodAsync(resourceGroupName, registryName, modelName, version, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PackageResponseInner packageMethod(String resourceGroupName, String registryName, String modelName, + String version, PackageRequest body) { + return packageMethodAsync(resourceGroupName, registryName, modelName, version, body).block(); + } + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PackageResponseInner packageMethod(String resourceGroupName, String registryName, String modelName, + String version, PackageRequest body, Context context) { + return packageMethodAsync(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..37a3f934ca3e4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java @@ -0,0 +1,232 @@ +// Copyright (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.PackageResponseInner; +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.PackageRequest; +import com.azure.resourcemanager.machinelearning.models.PackageResponse; +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 ResourceManagerUtils.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 ResourceManagerUtils.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 PackageResponse packageMethod(String resourceGroupName, String registryName, String modelName, + String version, PackageRequest body) { + PackageResponseInner inner + = this.serviceClient().packageMethod(resourceGroupName, registryName, modelName, version, body); + if (inner != null) { + return new PackageResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public PackageResponse packageMethod(String resourceGroupName, String registryName, String modelName, + String version, PackageRequest body, Context context) { + PackageResponseInner inner + = this.serviceClient().packageMethod(resourceGroupName, registryName, modelName, version, body, context); + if (inner != null) { + return new PackageResponseImpl(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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String registryName = ResourceManagerUtils.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 = ResourceManagerUtils.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 = ResourceManagerUtils.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/Utils.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java similarity index 80% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/Utils.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java index 7ca689e769aec..a4221b10f5964 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/Utils.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java index a16025c4b7b7f..587759ff4f328 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java @@ -14,8 +14,7 @@ public final class ResourceQuotaImpl implements ResourceQuota { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - ResourceQuotaImpl( - ResourceQuotaInner innerObject, + ResourceQuotaImpl(ResourceQuotaInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java index a4b080c85af25..4815165c8124c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.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.ScheduleInner; import com.azure.resourcemanager.machinelearning.models.Schedule; import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; +import com.azure.resourcemanager.machinelearning.models.TriggerOnceRequest; +import com.azure.resourcemanager.machinelearning.models.TriggerRunSubmissionDto; public final class ScheduleImpl implements Schedule, Schedule.Definition, Schedule.Update { private ScheduleInner innerObject; @@ -60,20 +63,14 @@ public ScheduleImpl withExistingWorkspace(String resourceGroupName, String works } public Schedule create() { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getSchedules().createOrUpdate(resourceGroupName, + workspaceName, name, this.innerModel(), Context.NONE); return this; } public Schedule create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getSchedules().createOrUpdate(resourceGroupName, + workspaceName, name, this.innerModel(), context); return this; } @@ -88,52 +85,46 @@ public ScheduleImpl update() { } public Schedule apply() { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getSchedules().createOrUpdate(resourceGroupName, + workspaceName, name, this.innerModel(), Context.NONE); return this; } public Schedule apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getSchedules().createOrUpdate(resourceGroupName, + workspaceName, name, this.innerModel(), context); return this; } - ScheduleImpl( - ScheduleInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + ScheduleImpl(ScheduleInner 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(), "schedules"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "schedules"); } public Schedule refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSchedules() + .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); return this; } public Schedule refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getSchedules() + .getWithResponse(resourceGroupName, workspaceName, name, context).getValue(); return this; } + public Response triggerWithResponse(TriggerOnceRequest body, Context context) { + return serviceManager.schedules().triggerWithResponse(resourceGroupName, workspaceName, name, body, context); + } + + public TriggerRunSubmissionDto trigger(TriggerOnceRequest body) { + return serviceManager.schedules().trigger(resourceGroupName, workspaceName, name, body); + } + public ScheduleImpl withProperties(ScheduleProperties properties) { this.innerModel().withProperties(properties); return this; 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..308b653c9c5a9 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 @@ -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; @@ -33,118 +34,110 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.SchedulesClient; import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; +import com.azure.resourcemanager.machinelearning.fluent.models.TriggerRunSubmissionDtoInner; import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.TriggerOnceRequest; 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 SchedulesClient. */ +/** + * An instance of this class provides access to all the operations defined in SchedulesClient. + */ public final class SchedulesClientImpl implements SchedulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SchedulesService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of SchedulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - SchedulesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(SchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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 + * 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") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + 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("listViewType") ScheduleListViewType listViewType, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, + @QueryParam("listViewType") ScheduleListViewType listViewType, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/schedules/{name}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @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}/schedules/{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") ScheduleInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}/trigger") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> trigger(@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") ScheduleInner body, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TriggerOnceRequest body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List schedules in specified workspace. - * + * * @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. @@ -152,23 +145,19 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Schedule entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ScheduleListViewType listViewType) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, ScheduleListViewType listViewType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -179,34 +168,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, 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 schedules in specified workspace. - * + * * @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. @@ -215,27 +186,19 @@ 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 a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, ScheduleListViewType listViewType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -247,30 +210,15 @@ private Mono> listSinglePageAsync( 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, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + 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 schedules in specified workspace. - * + * * @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. @@ -281,16 +229,15 @@ private Mono> listSinglePageAsync( * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ScheduleListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List schedules in specified 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. @@ -302,14 +249,13 @@ private PagedFlux listAsync( private PagedFlux listAsync(String resourceGroupName, String workspaceName) { final String skip = null; final ScheduleListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List schedules in specified workspace. - * + * * @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. @@ -321,20 +267,15 @@ private PagedFlux listAsync(String resourceGroupName, String work * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List schedules in specified 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. @@ -351,7 +292,7 @@ public PagedIterable list(String resourceGroupName, String worksp /** * List schedules in specified workspace. - * + * * @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. @@ -363,18 +304,14 @@ public PagedIterable list(String resourceGroupName, String worksp * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context) { + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); } /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -384,19 +321,15 @@ public PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -410,24 +343,14 @@ private Mono>> deleteWithResponseAsync( } 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)) + .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 schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -438,19 +361,15 @@ private Mono>> deleteWithResponseAsync( * @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) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -464,21 +383,13 @@ private Mono>> deleteWithResponseAsync( } 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); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), accept, context); } /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -488,18 +399,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String name) { + 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()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -510,19 +419,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + 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); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -538,7 +446,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -549,14 +457,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @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) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context) { return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); } /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -567,14 +475,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name) - .last() + return beginDeleteAsync(resourceGroupName, workspaceName, name).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -586,14 +493,13 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context) - .last() + return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -608,7 +514,7 @@ public void delete(String resourceGroupName, String workspaceName, String name) /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -624,7 +530,7 @@ public void delete(String resourceGroupName, String workspaceName, String name, /** * Get schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -634,19 +540,15 @@ public void delete(String resourceGroupName, String workspaceName, String name, * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -660,24 +562,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(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 schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -688,19 +580,15 @@ private Mono> getWithResponseAsync( * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { + private Mono> getWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -714,21 +602,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + name, this.client.getApiVersion(), accept, context); } /** * Get schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -745,7 +625,7 @@ private Mono getAsync(String resourceGroupName, String workspaceN /** * Get schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -756,14 +636,14 @@ private Mono getAsync(String resourceGroupName, String workspaceN * @return schedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); } /** * Get schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -779,7 +659,7 @@ public ScheduleInner get(String resourceGroupName, String workspaceName, String /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -787,23 +667,19 @@ public ScheduleInner get(String resourceGroupName, String workspaceName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. + * @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, ScheduleInner body) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ScheduleInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -822,25 +698,14 @@ private Mono>> createOrUpdateWithResponseAsync( } 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)) + .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 schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -849,23 +714,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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, ScheduleInner body, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ScheduleInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -884,22 +745,13 @@ private Mono>> createOrUpdateWithResponseAsync( } 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); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), body, accept, context); } /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -910,23 +762,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ScheduleInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ScheduleInner.class, - ScheduleInner.class, - this.client.getContext()); + private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync(String resourceGroupName, + String workspaceName, String name, ScheduleInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScheduleInner.class, ScheduleInner.class, this.client.getContext()); } /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -938,20 +784,18 @@ private PollerFlux, ScheduleInner> beginCreateOrUpdate * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { + private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync(String resourceGroupName, + String workspaceName, String name, ScheduleInner body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ScheduleInner.class, ScheduleInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScheduleInner.class, ScheduleInner.class, context); } /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -962,14 +806,14 @@ private PollerFlux, ScheduleInner> beginCreateOrUpdate * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScheduleInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body) { + public SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, ScheduleInner body) { return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); } /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -981,14 +825,14 @@ public SyncPoller, ScheduleInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScheduleInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { + public SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, ScheduleInner body, Context context) { return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); } /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -999,16 +843,15 @@ public SyncPoller, ScheduleInner> beginCreateOrUpdate( * @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, ScheduleInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + ScheduleInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -1020,16 +863,15 @@ private Mono createOrUpdateAsync( * @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, ScheduleInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + ScheduleInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -1040,14 +882,14 @@ private Mono createOrUpdateAsync( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body) { + public ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ScheduleInner body) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); } /** * Create or update schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -1059,21 +901,168 @@ public ScheduleInner createOrUpdate( * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { + public ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body, + Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); } + /** + * Trigger run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Request body for trigger once. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> triggerWithResponseAsync(String resourceGroupName, + String workspaceName, String name, TriggerOnceRequest 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.trigger(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())); + } + + /** + * Trigger run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Request body for trigger once. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> triggerWithResponseAsync(String resourceGroupName, + String workspaceName, String name, TriggerOnceRequest 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.trigger(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), body, accept, context); + } + + /** + * Trigger run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Request body for trigger once. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 triggerAsync(String resourceGroupName, String workspaceName, String name, + TriggerOnceRequest body) { + return triggerWithResponseAsync(resourceGroupName, workspaceName, name, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Trigger run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Request body for trigger once. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 triggerWithResponse(String resourceGroupName, String workspaceName, + String name, TriggerOnceRequest body, Context context) { + return triggerWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + } + + /** + * Trigger run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Request body for trigger once. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 TriggerRunSubmissionDtoInner trigger(String resourceGroupName, String workspaceName, String name, + TriggerOnceRequest body) { + return triggerWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); + } + /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1081,37 +1070,28 @@ private Mono> listNextSinglePageAsync(String nextLi return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1119,23 +1099,13 @@ private Mono> listNextSinglePageAsync(String nextLi return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java index af20e658dc52c..88f6319584ac7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java @@ -11,9 +11,12 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.SchedulesClient; import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; +import com.azure.resourcemanager.machinelearning.fluent.models.TriggerRunSubmissionDtoInner; import com.azure.resourcemanager.machinelearning.models.Schedule; import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; import com.azure.resourcemanager.machinelearning.models.Schedules; +import com.azure.resourcemanager.machinelearning.models.TriggerOnceRequest; +import com.azure.resourcemanager.machinelearning.models.TriggerRunSubmissionDto; public final class SchedulesImpl implements Schedules { private static final ClientLogger LOGGER = new ClientLogger(SchedulesImpl.class); @@ -22,26 +25,22 @@ public final class SchedulesImpl implements Schedules { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public SchedulesImpl( - SchedulesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + public SchedulesImpl(SchedulesClient 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 ScheduleImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -52,15 +51,12 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, context); } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScheduleImpl(inner.getValue(), this.manager())); } else { return null; @@ -76,106 +72,100 @@ public Schedule get(String resourceGroupName, String workspaceName, String name) } } + public Response triggerWithResponse(String resourceGroupName, String workspaceName, + String name, TriggerOnceRequest body, Context context) { + Response inner + = this.serviceClient().triggerWithResponse(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new TriggerRunSubmissionDtoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public TriggerRunSubmissionDto trigger(String resourceGroupName, String workspaceName, String name, + TriggerOnceRequest body) { + TriggerRunSubmissionDtoInner inner = this.serviceClient().trigger(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new TriggerRunSubmissionDtoImpl(inner, this.manager()); + } else { + return null; + } + } + public Schedule getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String name = Utils.getValueFromIdByName(id, "schedules"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "schedules"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String name = Utils.getValueFromIdByName(id, "schedules"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "schedules"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); } return this.getWithResponse(resourceGroupName, workspaceName, name, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String name = Utils.getValueFromIdByName(id, "schedules"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "schedules"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); } this.delete(resourceGroupName, workspaceName, name, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String name = Utils.getValueFromIdByName(id, "schedules"); + String name = ResourceManagerUtils.getValueFromIdByName(id, "schedules"); if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); } this.delete(resourceGroupName, workspaceName, name, context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java new file mode 100644 index 0000000000000..bbe88ea4ad794 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.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.implementation; + +import com.azure.core.http.rest.Response; +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.ServerlessEndpointInner; +import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointStatus; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class ServerlessEndpointImpl + implements ServerlessEndpoint, ServerlessEndpoint.Definition, ServerlessEndpoint.Update { + private ServerlessEndpointInner 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 ServerlessEndpointProperties properties() { + return this.innerModel().properties(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ServerlessEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String name; + + private PartialMinimalTrackedResourceWithSkuAndIdentity updateBody; + + public ServerlessEndpointImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public ServerlessEndpoint create() { + this.innerObject = serviceManager.serviceClient().getServerlessEndpoints().createOrUpdate(resourceGroupName, + workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public ServerlessEndpoint create(Context context) { + this.innerObject = serviceManager.serviceClient().getServerlessEndpoints().createOrUpdate(resourceGroupName, + workspaceName, name, this.innerModel(), context); + return this; + } + + ServerlessEndpointImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new ServerlessEndpointInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public ServerlessEndpointImpl update() { + this.updateBody = new PartialMinimalTrackedResourceWithSkuAndIdentity(); + return this; + } + + public ServerlessEndpoint apply() { + this.innerObject = serviceManager.serviceClient().getServerlessEndpoints().update(resourceGroupName, + workspaceName, name, updateBody, Context.NONE); + return this; + } + + public ServerlessEndpoint apply(Context context) { + this.innerObject = serviceManager.serviceClient().getServerlessEndpoints().update(resourceGroupName, + workspaceName, name, updateBody, context); + return this; + } + + ServerlessEndpointImpl(ServerlessEndpointInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "serverlessEndpoints"); + } + + public ServerlessEndpoint refresh() { + this.innerObject = serviceManager.serviceClient().getServerlessEndpoints() + .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + return this; + } + + public ServerlessEndpoint refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getServerlessEndpoints() + .getWithResponse(resourceGroupName, workspaceName, name, context).getValue(); + return this; + } + + public Response getStatusWithResponse(Context context) { + return serviceManager.serverlessEndpoints().getStatusWithResponse(resourceGroupName, workspaceName, name, + context); + } + + public ServerlessEndpointStatus getStatus() { + return serviceManager.serverlessEndpoints().getStatus(resourceGroupName, workspaceName, name); + } + + public Response listKeysWithResponse(Context context) { + return serviceManager.serverlessEndpoints().listKeysWithResponse(resourceGroupName, workspaceName, name, + context); + } + + public EndpointAuthKeys listKeys() { + return serviceManager.serverlessEndpoints().listKeys(resourceGroupName, workspaceName, name); + } + + public EndpointAuthKeys regenerateKeys(RegenerateEndpointKeysRequest body) { + return serviceManager.serverlessEndpoints().regenerateKeys(resourceGroupName, workspaceName, name, body); + } + + public EndpointAuthKeys regenerateKeys(RegenerateEndpointKeysRequest body, Context context) { + return serviceManager.serverlessEndpoints().regenerateKeys(resourceGroupName, workspaceName, name, body, + context); + } + + public ServerlessEndpointImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ServerlessEndpointImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ServerlessEndpointImpl withProperties(ServerlessEndpointProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public ServerlessEndpointImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public ServerlessEndpointImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public ServerlessEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public ServerlessEndpointImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public ServerlessEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public ServerlessEndpointImpl 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/ServerlessEndpointStatusImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointStatusImpl.java new file mode 100644 index 0000000000000..968fe2a108f9e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointStatusImpl.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointStatusInner; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointStatus; +import java.util.Collections; +import java.util.Map; + +public final class ServerlessEndpointStatusImpl implements ServerlessEndpointStatus { + private ServerlessEndpointStatusInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + ServerlessEndpointStatusImpl(ServerlessEndpointStatusInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Map metrics() { + Map inner = this.innerModel().metrics(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ServerlessEndpointStatusInner 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/ServerlessEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java new file mode 100644 index 0000000000000..73a3b767786dc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java @@ -0,0 +1,1749 @@ +// Copyright (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.ServerlessEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointStatusInner; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointTrackedResourceArmPaginatedResult; +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 ServerlessEndpointsClient. + */ +public final class ServerlessEndpointsClientImpl implements ServerlessEndpointsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ServerlessEndpointsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; + + /** + * Initializes an instance of ServerlessEndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ServerlessEndpointsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(ServerlessEndpointsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningServicesServerlessEndpoints to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ServerlessEndpointsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints") + @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, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{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}/serverlessEndpoints/{name}") + @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, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@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") PartialMinimalTrackedResourceWithSkuAndIdentity body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{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") ServerlessEndpointInner body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getStatus(@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" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/listKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys(@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" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/regenerateKeys") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> regenerateKeys(@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") RegenerateEndpointKeysRequest 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 Serverless Endpoints. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ServerlessEndpoint entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, 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 (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, 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 Serverless Endpoints. + * + * @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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ServerlessEndpoint entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, 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 (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, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Serverless Endpoints. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ServerlessEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Serverless Endpoints. + * + * @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 ServerlessEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Serverless Endpoints. + * + * @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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ServerlessEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Serverless Endpoints. + * + * @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 ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + } + + /** + * List Serverless Endpoints. + * + * @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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); + } + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 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 Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 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 Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 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 Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 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 Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); + } + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name, + Context context) { + return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); + } + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name) { + deleteAsync(resourceGroupName, workspaceName, name).block(); + } + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name, Context context) { + deleteAsync(resourceGroupName, workspaceName, name, context).block(); + } + + /** + * Get Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 serverless Endpoint along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(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.get(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 Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 serverless Endpoint along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(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.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + name, this.client.getApiVersion(), accept, context); + } + + /** + * Get Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 serverless Endpoint on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 serverless Endpoint along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + } + + /** + * Get Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 serverless Endpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerlessEndpointInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String name, PartialMinimalTrackedResourceWithSkuAndIdentity 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.update(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())); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String name, PartialMinimalTrackedResourceWithSkuAndIdentity 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.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), body, accept, context); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, ServerlessEndpointInner> beginUpdateAsync( + String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, + this.client.getContext()); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ServerlessEndpointInner> beginUpdateAsync( + String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, context); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ServerlessEndpointInner> beginUpdate( + String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ServerlessEndpointInner> beginUpdate( + String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return beginUpdateAsync(resourceGroupName, workspaceName, name, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return updateAsync(resourceGroupName, workspaceName, name, body).block(); + } + + /** + * Update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + return updateAsync(resourceGroupName, workspaceName, name, body, context).block(); + } + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, String name, ServerlessEndpointInner 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 Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ServerlessEndpointInner 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 Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, ServerlessEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, + this.client.getContext()); + } + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ServerlessEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, context); + } + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ServerlessEndpointInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + } + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ServerlessEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + } + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String name, ServerlessEndpointInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, ServerlessEndpointInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + } + + /** + * Create or update Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); + } + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStatusWithResponseAsync(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.getStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStatusWithResponseAsync(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.getStatus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), accept, context); + } + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getStatusAsync(String resourceGroupName, String workspaceName, + String name) { + return getStatusWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getStatusWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + return getStatusWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + } + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerlessEndpointStatusInner getStatus(String resourceGroupName, String workspaceName, String name) { + return getStatusWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync(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.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync(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.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), accept, context); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 keys for endpoint authentication on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKeysAsync(String resourceGroupName, String workspaceName, String name) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 keys for endpoint authentication along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + } + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String name) { + return listKeysWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys 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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String name, RegenerateEndpointKeysRequest 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.regenerateKeys(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())); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String name, RegenerateEndpointKeysRequest 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.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, name, this.client.getApiVersion(), body, accept, context); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EndpointAuthKeysInner> beginRegenerateKeysAsync( + String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body) { + Mono>> mono + = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EndpointAuthKeysInner.class, EndpointAuthKeysInner.class, + this.client.getContext()); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, EndpointAuthKeysInner> beginRegenerateKeysAsync( + String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EndpointAuthKeysInner.class, EndpointAuthKeysInner.class, context); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys( + String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body) { + return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys( + String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body, + Context context) { + return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys 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 keys for endpoint authentication on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body) { + return beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body, Context context) { + return beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys 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 keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body) { + return regenerateKeysAsync(resourceGroupName, workspaceName, name, body).block(); + } + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body, Context context) { + return regenerateKeysAsync(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 ServerlessEndpoint 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 ServerlessEndpoint 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/ServerlessEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java new file mode 100644 index 0000000000000..51ae35e77ffc6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.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.ServerlessEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointStatusInner; +import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; +import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointStatus; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoints; + +public final class ServerlessEndpointsImpl implements ServerlessEndpoints { + private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointsImpl.class); + + private final ServerlessEndpointsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ServerlessEndpointsImpl(ServerlessEndpointsClient 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 ResourceManagerUtils.mapPage(inner, inner1 -> new ServerlessEndpointImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerlessEndpointImpl(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 getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ServerlessEndpointImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ServerlessEndpoint get(String resourceGroupName, String workspaceName, String name) { + ServerlessEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new ServerlessEndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getStatusWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + Response inner + = this.serviceClient().getStatusWithResponse(resourceGroupName, workspaceName, name, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ServerlessEndpointStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ServerlessEndpointStatus getStatus(String resourceGroupName, String workspaceName, String name) { + ServerlessEndpointStatusInner inner = this.serviceClient().getStatus(resourceGroupName, workspaceName, name); + if (inner != null) { + return new ServerlessEndpointStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, name, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointAuthKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String name) { + EndpointAuthKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, name); + if (inner != null) { + return new EndpointAuthKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointAuthKeys regenerateKeys(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body) { + EndpointAuthKeysInner inner = this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, name, body); + if (inner != null) { + return new EndpointAuthKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointAuthKeys regenerateKeys(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body, Context context) { + EndpointAuthKeysInner inner + = this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, name, body, context); + if (inner != null) { + return new EndpointAuthKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public ServerlessEndpoint getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "serverlessEndpoints"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverlessEndpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "serverlessEndpoints"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverlessEndpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "serverlessEndpoints"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverlessEndpoints'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String workspaceName = ResourceManagerUtils.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 = ResourceManagerUtils.getValueFromIdByName(id, "serverlessEndpoints"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverlessEndpoints'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, context); + } + + private ServerlessEndpointsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ServerlessEndpointImpl define(String name) { + return new ServerlessEndpointImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java index 122efdee34aef..87e01997be481 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java @@ -14,8 +14,8 @@ public final class SkuResourceImpl implements SkuResource { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - SkuResourceImpl( - SkuResourceInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + SkuResourceImpl(SkuResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/TriggerRunSubmissionDtoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/TriggerRunSubmissionDtoImpl.java new file mode 100644 index 0000000000000..a02b0eb62c653 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/TriggerRunSubmissionDtoImpl.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.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.TriggerRunSubmissionDtoInner; +import com.azure.resourcemanager.machinelearning.models.ScheduleType; +import com.azure.resourcemanager.machinelearning.models.TriggerRunSubmissionDto; + +public final class TriggerRunSubmissionDtoImpl implements TriggerRunSubmissionDto { + private TriggerRunSubmissionDtoInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + TriggerRunSubmissionDtoImpl(TriggerRunSubmissionDtoInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ScheduleType scheduleActionType() { + return this.innerModel().scheduleActionType(); + } + + public String submissionId() { + return this.innerModel().submissionId(); + } + + public TriggerRunSubmissionDtoInner 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/UpdateWorkspaceQuotasResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java index 908490a7694de..84cfd25ec4b6c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java @@ -15,8 +15,7 @@ public final class UpdateWorkspaceQuotasResultImpl implements UpdateWorkspaceQuo private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - UpdateWorkspaceQuotasResultImpl( - UpdateWorkspaceQuotasResultInner innerObject, + UpdateWorkspaceQuotasResultImpl(UpdateWorkspaceQuotasResultInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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..c6b7cd9effe5a 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 @@ -30,129 +30,105 @@ import com.azure.resourcemanager.machinelearning.models.ListUsagesResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in UsagesClient. */ +/** + * An instance of this class provides access to all the operations defined in UsagesClient. + */ public final class UsagesClientImpl implements UsagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final UsagesService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + 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 + * The interface defining all the services for AzureMachineLearningServicesUsages to be used by the proxy service * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureMachineLearning") public interface UsagesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location - * along with {@link PagedResponse} on successful completion of {@link Mono}. + * along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location - * along with {@link PagedResponse} on successful completion of {@link Mono}. + * along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -160,33 +136,21 @@ private Mono> listSinglePageAsync(String location, Con final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedFlux}. + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location) { @@ -195,30 +159,30 @@ private PagedFlux listAsync(String location) { /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedFlux}. + * paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(location, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location) { @@ -227,14 +191,14 @@ public PagedIterable list(String location) { /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, Context context) { @@ -243,14 +207,15 @@ public PagedIterable list(String location, Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Usages operation response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the List Usages operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -258,37 +223,28 @@ private Mono> listNextSinglePageAsync(String nextLink) return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Usages operation response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the List Usages operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -296,23 +252,13 @@ private Mono> listNextSinglePageAsync(String nextLink, return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java index b70b59b57e69a..fb42a38499969 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java @@ -19,20 +19,20 @@ public final class UsagesImpl implements Usages { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public UsagesImpl( - UsagesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + public UsagesImpl(UsagesClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String location) { PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); } public PagedIterable list(String location, Context context) { PagedIterable inner = this.serviceClient().list(location, context); - return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); } private UsagesClient serviceClient() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java index 92771d638a0b9..21844b218b84e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java @@ -15,8 +15,7 @@ public final class VirtualMachineSizeListResultImpl implements VirtualMachineSiz private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - VirtualMachineSizeListResultImpl( - VirtualMachineSizeListResultInner innerObject, + VirtualMachineSizeListResultImpl(VirtualMachineSizeListResultInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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..68968ce905937 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 @@ -25,130 +25,110 @@ import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in VirtualMachineSizesClient. */ +/** + * An instance of this class provides access to all the operations defined in VirtualMachineSizesClient. + */ public final class VirtualMachineSizesClientImpl implements VirtualMachineSizesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final VirtualMachineSizesService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of VirtualMachineSizesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - VirtualMachineSizesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(VirtualMachineSizesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface VirtualMachineSizesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("location") String location, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); } /** * Returns supported VM Sizes in a location. - * + * * @param location The location upon which virtual-machine-sizes is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List Virtual Machine size operation response along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), location, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns supported VM Sizes in a location. - * + * * @param location The location upon which virtual-machine-sizes is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List Virtual Machine size operation response along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context); + return service.list(this.client.getEndpoint(), location, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); } /** * Returns supported VM Sizes in a location. - * + * * @param location The location upon which virtual-machine-sizes is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -162,7 +142,7 @@ private Mono listAsync(String location) { /** * Returns supported VM Sizes in a location. - * + * * @param location The location upon which virtual-machine-sizes is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,7 +157,7 @@ public Response listWithResponse(String locat /** * Returns supported VM Sizes in a location. - * + * * @param location The location upon which virtual-machine-sizes is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java index eeec5b0fbd763..78ee3bbf2913b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java @@ -20,8 +20,7 @@ public final class VirtualMachineSizesImpl implements VirtualMachineSizes { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public VirtualMachineSizesImpl( - VirtualMachineSizesClient innerClient, + public VirtualMachineSizesImpl(VirtualMachineSizesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,10 +29,7 @@ public VirtualMachineSizesImpl( public Response listWithResponse(String location, Context context) { Response inner = this.serviceClient().listWithResponse(location, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new VirtualMachineSizeListResultImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java index 9ff113b0e7ac1..77ee569994931 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java @@ -4,25 +4,21 @@ 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.WorkspaceConnectionPropertiesV2BasicResourceInner; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter; public final class WorkspaceConnectionPropertiesV2BasicResourceImpl - implements WorkspaceConnectionPropertiesV2BasicResource, WorkspaceConnectionPropertiesV2BasicResource.Definition { + implements WorkspaceConnectionPropertiesV2BasicResource, WorkspaceConnectionPropertiesV2BasicResource.Definition, + WorkspaceConnectionPropertiesV2BasicResource.Update { private WorkspaceConnectionPropertiesV2BasicResourceInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - WorkspaceConnectionPropertiesV2BasicResourceImpl( - WorkspaceConnectionPropertiesV2BasicResourceInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - public String id() { return this.innerModel().id(); } @@ -43,6 +39,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkspaceConnectionPropertiesV2BasicResourceInner innerModel() { return this.innerObject; } @@ -57,62 +57,108 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String connectionName; - public WorkspaceConnectionPropertiesV2BasicResourceImpl withExistingWorkspace( - String resourceGroupName, String workspaceName) { + private WorkspaceConnectionUpdateParameter updateBody; + + public WorkspaceConnectionPropertiesV2BasicResourceImpl withExistingWorkspace(String resourceGroupName, + String workspaceName) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; return this; } public WorkspaceConnectionPropertiesV2BasicResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaceConnections() + .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), Context.NONE) + .getValue(); return this; } public WorkspaceConnectionPropertiesV2BasicResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaceConnections() + .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), context) + .getValue(); return this; } - WorkspaceConnectionPropertiesV2BasicResourceImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + WorkspaceConnectionPropertiesV2BasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = new WorkspaceConnectionPropertiesV2BasicResourceInner(); this.serviceManager = serviceManager; this.connectionName = name; } + public WorkspaceConnectionPropertiesV2BasicResourceImpl update() { + this.updateBody = new WorkspaceConnectionUpdateParameter(); + return this; + } + + public WorkspaceConnectionPropertiesV2BasicResource apply() { + this.innerObject = serviceManager.serviceClient().getWorkspaceConnections() + .updateWithResponse(resourceGroupName, workspaceName, connectionName, updateBody, Context.NONE).getValue(); + return this; + } + + public WorkspaceConnectionPropertiesV2BasicResource apply(Context context) { + this.innerObject = serviceManager.serviceClient().getWorkspaceConnections() + .updateWithResponse(resourceGroupName, workspaceName, connectionName, updateBody, context).getValue(); + return this; + } + + WorkspaceConnectionPropertiesV2BasicResourceImpl(WorkspaceConnectionPropertiesV2BasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.connectionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connections"); + } + public WorkspaceConnectionPropertiesV2BasicResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE) - .getValue(); + String localAoaiModelsToDeploy = null; + this.innerObject = serviceManager.serviceClient().getWorkspaceConnections() + .getWithResponse(resourceGroupName, workspaceName, connectionName, localAoaiModelsToDeploy, Context.NONE) + .getValue(); return this; } public WorkspaceConnectionPropertiesV2BasicResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, context) - .getValue(); + String localAoaiModelsToDeploy = null; + this.innerObject = serviceManager.serviceClient().getWorkspaceConnections() + .getWithResponse(resourceGroupName, workspaceName, connectionName, localAoaiModelsToDeploy, context) + .getValue(); return this; } + public Response listSecretsWithResponse(String aoaiModelsToDeploy, + Context context) { + return serviceManager.workspaceConnections().listSecretsWithResponse(resourceGroupName, workspaceName, + connectionName, aoaiModelsToDeploy, context); + } + + public WorkspaceConnectionPropertiesV2BasicResource listSecrets() { + return serviceManager.workspaceConnections().listSecrets(resourceGroupName, workspaceName, connectionName); + } + + public void testConnection() { + serviceManager.workspaceConnections().testConnection(resourceGroupName, workspaceName, connectionName); + } + + public void testConnection(WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + serviceManager.workspaceConnections().testConnection(resourceGroupName, workspaceName, connectionName, body, + context); + } + public WorkspaceConnectionPropertiesV2BasicResourceImpl withProperties(WorkspaceConnectionPropertiesV2 properties) { - this.innerModel().withProperties(properties); - return this; + if (isInCreateMode()) { + this.innerModel().withProperties(properties); + return this; + } else { + this.updateBody.withProperties(properties); + 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/WorkspaceConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java index 2b07717ee35e0..c7a829cae2b16 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 @@ -12,7 +12,9 @@ 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; @@ -26,146 +28,389 @@ 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.WorkspaceConnectionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter; +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 WorkspaceConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. + */ public final class WorkspaceConnectionsClientImpl implements WorkspaceConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkspaceConnectionsService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of WorkspaceConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - WorkspaceConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy - .create(WorkspaceConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + WorkspaceConnectionsClientImpl(AzureMachineLearningServicesImpl client) { + this.service = RestProxy.create(WorkspaceConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * 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}") @ServiceInterface(name = "AzureMachineLearning") public interface WorkspaceConnectionsService { - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, + Mono> list( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("target") String target, @QueryParam("category") String category, + @QueryParam("api-version") String apiVersion, @QueryParam("includeAll") Boolean includeAll, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @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}/connections/{connectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("connectionName") String connectionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("aoaiModelsToDeploy") String aoaiModelsToDeploy, @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}/connections/{connectionName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkspaceConnectionUpdateParameter body, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> create(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("target") String target, - @QueryParam("category") String category, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/listsecrets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSecrets( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, + @QueryParam("aoaiModelsToDeploy") String aoaiModelsToDeploy, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/testconnection") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> testConnection(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * The create operation. - * + * Lists all the available machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param target Target of the workspace connection. + * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String target, String category, Boolean includeAll) { if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + .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, target, category, this.client.getApiVersion(), includeAll, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the available machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param target Target of the workspace connection. + * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String target, String category, Boolean includeAll, + 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, target, + category, this.client.getApiVersion(), includeAll, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists all the available machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param target Target of the workspace connection. + * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String target, String category, Boolean includeAll) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, includeAll), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the available machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName) { + final String target = null; + final String category = null; + final Boolean includeAll = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, includeAll), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the available machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param target Target of the workspace connection. + * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String target, String category, Boolean includeAll, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, includeAll, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists all the available machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName) { + final String target = null; + final String category = null; + final Boolean includeAll = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category, includeAll)); + } + + /** + * Lists all the available machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param target Target of the workspace connection. + * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, String target, String category, Boolean includeAll, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category, includeAll, context)); + } + + /** + * Delete machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 connectionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + .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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName 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, connectionName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 connectionName, 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 @@ -177,36 +422,110 @@ private Mono> create if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 connectionName) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, + Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + } + + /** + * Delete machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 connectionName) { + deleteWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE); + } + + /** + * Lists machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, String aoaiModelsToDeploy) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - parameters, - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, aoaiModelsToDeploy, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * The create operation. - * + * Lists machine learning workspaces connections by name. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -214,23 +533,16 @@ private Mono> create * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters, + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, String aoaiModelsToDeploy, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -242,55 +554,38 @@ private Mono> create if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - parameters, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + connectionName, aoaiModelsToDeploy, this.client.getApiVersion(), accept, context); } /** - * The create operation. - * + * Lists machine learning workspaces connections by name. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 createAsync( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters) + private Mono getAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final String aoaiModelsToDeploy = null; + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, aoaiModelsToDeploy) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * The create operation. - * + * Lists machine learning workspaces connections by name. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -298,62 +593,54 @@ private Mono createAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters, context).block(); + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String aoaiModelsToDeploy, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, aoaiModelsToDeploy, context) + .block(); } /** - * The create operation. - * + * Lists machine learning workspaces connections by name. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 WorkspaceConnectionPropertiesV2BasicResourceInner create( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - return createWithResponse(resourceGroupName, workspaceName, connectionName, parameters, Context.NONE) + public WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName) { + final String aoaiModelsToDeploy = null; + return getWithResponse(resourceGroupName, workspaceName, connectionName, aoaiModelsToDeploy, Context.NONE) .getValue(); } /** - * The get operation. - * + * Update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body Parameters for workspace connection 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 response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName) { + private Mono> updateWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionUpdateParameter body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -365,29 +652,23 @@ private Mono> getWit if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } + if (body != null) { + body.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * The get operation. - * + * Update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body Parameters for workspace connection 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. @@ -395,19 +676,16 @@ private Mono> getWit * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, Context context) { + private Mono> updateWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionUpdateParameter body, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -419,25 +697,20 @@ private Mono> getWit if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } + if (body != null) { + body.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), body, accept, context); } /** - * The get operation. - * + * Update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -445,18 +718,20 @@ private Mono> getWit * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String connectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) + private Mono updateAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final WorkspaceConnectionUpdateParameter body = null; + return updateWithResponseAsync(resourceGroupName, workspaceName, connectionName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * The get operation. - * + * Update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body Parameters for workspace connection 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. @@ -464,16 +739,16 @@ private Mono getAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + public Response updateWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionUpdateParameter body, Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, connectionName, body, context).block(); } /** - * The get operation. - * + * Update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -481,36 +756,35 @@ public Response getWithRespon * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner get( - String resourceGroupName, String workspaceName, String connectionName) { - return getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); + public WorkspaceConnectionPropertiesV2BasicResourceInner update(String resourceGroupName, String workspaceName, + String connectionName) { + final WorkspaceConnectionUpdateParameter body = null; + return updateWithResponse(resourceGroupName, workspaceName, connectionName, body, Context.NONE).getValue(); } /** - * The delete operation. - * + * Create or update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName) { + private Mono> createWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -522,49 +796,40 @@ private Mono> deleteWithResponseAsync( if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } + if (body != null) { + body.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * The delete operation. - * + * Create or update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body The object for creating or updating a new workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, Context context) { + private Mono> createWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -576,96 +841,94 @@ private Mono> deleteWithResponseAsync( if (connectionName == null) { return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); } + if (body != null) { + body.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), body, accept, context); } /** - * The delete operation. - * + * Create or update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String connectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(ignored -> Mono.empty()); + private Mono createAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * The delete operation. - * + * Create or update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body The object for creating or updating a new workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + public Response createWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, body, context).block(); } /** - * The delete operation. - * + * Create or update machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 void delete(String resourceGroupName, String workspaceName, String connectionName) { - deleteWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE); + public WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return createWithResponse(resourceGroupName, workspaceName, connectionName, body, Context.NONE).getValue(); } /** - * The list operation. - * + * List all the secrets of a machine learning workspaces connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String target, String category) { + private Mono> listSecretsWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, String aoaiModelsToDeploy) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -674,60 +937,183 @@ private Mono> l if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + if (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName 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, - target, - category, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), aoaiModelsToDeploy, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * The list operation. - * + * List all the secrets of a machine learning workspaces connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String target, String category, Context context) { + private Mono> listSecretsWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, String aoaiModelsToDeploy, + 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 this.client.getEndpoint() is required and cannot be null.")); + .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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), aoaiModelsToDeploy, accept, context); + } + + /** + * List all the secrets of a machine learning workspaces connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 listSecretsAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final String aoaiModelsToDeploy = null; + return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName, aoaiModelsToDeploy) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all the secrets of a machine learning workspaces connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 listSecretsWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String aoaiModelsToDeploy, Context context) { + return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName, aoaiModelsToDeploy, + context).block(); + } + + /** + * List all the secrets of a machine learning workspaces connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String resourceGroupName, String workspaceName, + String connectionName) { + final String aoaiModelsToDeploy = null; + return listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, aoaiModelsToDeploy, + Context.NONE).getValue(); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> testConnectionWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner 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 this.client.getSubscriptionId() is required and cannot be null.")); + .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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.testConnection(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> testConnectionWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner 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 @@ -736,170 +1122,247 @@ private Mono> l if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } + if (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (body != null) { + body.validate(); + } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - target, - category, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. + return service.testConnection(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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 paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String target, String category) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginTestConnectionAsync(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body) { + Mono>> mono + = testConnectionWithResponseAsync(resourceGroupName, workspaceName, connectionName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * The list operation. - * + * Test machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName) { - final String target = null; - final String category = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginTestConnectionAsync(String resourceGroupName, String workspaceName, + String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + Mono>> mono + = testConnectionWithResponseAsync(resourceGroupName, workspaceName, connectionName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * The list operation. - * + * Test machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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 paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String target, String category, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginTestConnectionAsync(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = testConnectionWithResponseAsync(resourceGroupName, workspaceName, connectionName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * The list operation. - * + * Test machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName) { - final String target = null; - final String category = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginTestConnection(String resourceGroupName, String workspaceName, + String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return this.beginTestConnectionAsync(resourceGroupName, workspaceName, connectionName, body).getSyncPoller(); } /** - * The list operation. - * + * Test machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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 paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginTestConnection(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + return this.beginTestConnectionAsync(resourceGroupName, workspaceName, connectionName, body, context) + .getSyncPoller(); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono testConnectionAsync(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body) { + return beginTestConnectionAsync(resourceGroupName, workspaceName, connectionName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 testConnectionAsync(String resourceGroupName, String workspaceName, String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return beginTestConnectionAsync(resourceGroupName, workspaceName, connectionName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono testConnectionAsync(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + return beginTestConnectionAsync(resourceGroupName, workspaceName, connectionName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 testConnection(String resourceGroupName, String workspaceName, String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + testConnectionAsync(resourceGroupName, workspaceName, connectionName, body).block(); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + testConnectionAsync(resourceGroupName, workspaceName, connectionName, body, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink) { + private Mono> + listNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -907,29 +1370,19 @@ private Mono> l * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java index ba28d102dd9c4..046a62a585d06 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java @@ -21,32 +21,53 @@ public final class WorkspaceConnectionsImpl implements WorkspaceConnections { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public WorkspaceConnectionsImpl( - WorkspaceConnectionsClient innerClient, + public WorkspaceConnectionsImpl(WorkspaceConnectionsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, connectionName, context); + public PagedIterable list(String resourceGroupName, + String workspaceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, + String workspaceName, String target, String category, Boolean includeAll, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, target, category, includeAll, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); + } + + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName) { + this.serviceClient().delete(resourceGroupName, workspaceName, connectionName); + } + + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String aoaiModelsToDeploy, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, connectionName, aoaiModelsToDeploy, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public WorkspaceConnectionPropertiesV2BasicResource get( - String resourceGroupName, String workspaceName, String connectionName) { - WorkspaceConnectionPropertiesV2BasicResourceInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, connectionName); + public WorkspaceConnectionPropertiesV2BasicResource get(String resourceGroupName, String workspaceName, + String connectionName) { + WorkspaceConnectionPropertiesV2BasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, connectionName); if (inner != null) { return new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner, this.manager()); } else { @@ -54,131 +75,114 @@ public WorkspaceConnectionPropertiesV2BasicResource get( } } - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); + public Response listSecretsWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String aoaiModelsToDeploy, Context context) { + Response inner = this.serviceClient() + .listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, aoaiModelsToDeploy, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, connectionName); + public WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupName, String workspaceName, + String connectionName) { + WorkspaceConnectionPropertiesV2BasicResourceInner inner + = this.serviceClient().listSecrets(resourceGroupName, workspaceName, connectionName); + if (inner != null) { + return new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner, this.manager()); + } else { + return null; + } } - public PagedIterable list( - String resourceGroupName, String workspaceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName); - return Utils - .mapPage(inner, inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); + public void testConnection(String resourceGroupName, String workspaceName, String connectionName) { + this.serviceClient().testConnection(resourceGroupName, workspaceName, connectionName); } - public PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, target, category, context); - return Utils - .mapPage(inner, inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); + public void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + this.serviceClient().testConnection(resourceGroupName, workspaceName, connectionName, body, context); } public WorkspaceConnectionPropertiesV2BasicResource getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String connectionName = Utils.getValueFromIdByName(id, "connections"); + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); if (connectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); } - return this.getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); + String localAoaiModelsToDeploy = null; + return this + .getWithResponse(resourceGroupName, workspaceName, connectionName, localAoaiModelsToDeploy, Context.NONE) + .getValue(); } - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public Response getByIdWithResponse(String id, + String aoaiModelsToDeploy, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String connectionName = Utils.getValueFromIdByName(id, "connections"); + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); if (connectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); } - return this.getWithResponse(resourceGroupName, workspaceName, connectionName, context); + return this.getWithResponse(resourceGroupName, workspaceName, connectionName, aoaiModelsToDeploy, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String connectionName = Utils.getValueFromIdByName(id, "connections"); + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); if (connectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); } this.deleteWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - String connectionName = Utils.getValueFromIdByName(id, "connections"); + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); if (connectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); } return this.deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); } 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..ba59a4d7a990d 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 @@ -30,83 +30,77 @@ import com.azure.resourcemanager.machinelearning.models.ListAmlUserFeatureResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkspaceFeaturesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspaceFeaturesClient. + */ public final class WorkspaceFeaturesClientImpl implements WorkspaceFeaturesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkspaceFeaturesService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of WorkspaceFeaturesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - WorkspaceFeaturesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(WorkspaceFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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 + * 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") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists all enabled features for a 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 List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -117,32 +111,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all enabled features for a 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. @@ -150,22 +128,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -177,28 +151,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all enabled features for a 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. @@ -208,13 +169,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists all enabled features for a 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. @@ -225,14 +186,13 @@ private PagedFlux listAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all enabled features for a 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. @@ -247,7 +207,7 @@ public PagedIterable list(String resourceGroupName, String /** * Lists all enabled features for a 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. @@ -263,14 +223,15 @@ public PagedIterable list(String resourceGroupName, String /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -278,37 +239,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -316,23 +268,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java index 875e67abbaffb..fb9af118f3f32 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java @@ -19,8 +19,7 @@ public final class WorkspaceFeaturesImpl implements WorkspaceFeatures { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public WorkspaceFeaturesImpl( - WorkspaceFeaturesClient innerClient, + public WorkspaceFeaturesImpl(WorkspaceFeaturesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public WorkspaceFeaturesImpl( public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new AmlUserFeatureImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AmlUserFeatureImpl(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 AmlUserFeatureImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AmlUserFeatureImpl(inner1, this.manager())); } private WorkspaceFeaturesClient serviceClient() { 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..140bec88d2257 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,26 +8,32 @@ 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; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResult; import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; +import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; +import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; 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.PublicNetworkAccessType; +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; import com.azure.resourcemanager.machinelearning.models.Workspace; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; +import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; import java.util.Collections; import java.util.List; import java.util.Map; @@ -54,10 +60,18 @@ public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public String kind() { + return this.innerModel().kind(); + } + public String location() { return this.innerModel().location(); } + public Sku sku() { + return this.innerModel().sku(); + } + public Map tags() { Map inner = this.innerModel().tags(); if (inner != null) { @@ -67,94 +81,104 @@ public Map tags() { } } - public Sku sku() { - return this.innerModel().sku(); - } - public SystemData systemData() { return this.innerModel().systemData(); } - public String workspaceId() { - return this.innerModel().workspaceId(); - } - - public String description() { - return this.innerModel().description(); + public Boolean allowPublicAccessWhenBehindVnet() { + return this.innerModel().allowPublicAccessWhenBehindVnet(); } - public String friendlyName() { - return this.innerModel().friendlyName(); + public String applicationInsights() { + return this.innerModel().applicationInsights(); } - public String keyVault() { - return this.innerModel().keyVault(); + public List associatedWorkspaces() { + List inner = this.innerModel().associatedWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public String applicationInsights() { - return this.innerModel().applicationInsights(); + public List containerRegistries() { + List inner = this.innerModel().containerRegistries(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } public String containerRegistry() { return this.innerModel().containerRegistry(); } - public String storageAccount() { - return this.innerModel().storageAccount(); + public String description() { + return this.innerModel().description(); } public String discoveryUrl() { return this.innerModel().discoveryUrl(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public Boolean enableDataIsolation() { + return this.innerModel().enableDataIsolation(); + } + + public Boolean enableSoftwareBillOfMaterials() { + return this.innerModel().enableSoftwareBillOfMaterials(); } public EncryptionProperty encryption() { return this.innerModel().encryption(); } - public Boolean hbiWorkspace() { - return this.innerModel().hbiWorkspace(); + public List existingWorkspaces() { + List inner = this.innerModel().existingWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public String serviceProvisionedResourceGroup() { - return this.innerModel().serviceProvisionedResourceGroup(); + public FeatureStoreSettings featureStoreSettings() { + return this.innerModel().featureStoreSettings(); } - public Integer privateLinkCount() { - return this.innerModel().privateLinkCount(); + public String friendlyName() { + return this.innerModel().friendlyName(); } - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); + public Boolean hbiWorkspace() { + return this.innerModel().hbiWorkspace(); } - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerModel().allowPublicAccessWhenBehindVnet(); + public String hubResourceId() { + return this.innerModel().hubResourceId(); } - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); + public String imageBuildCompute() { + return this.innerModel().imageBuildCompute(); } - public List privateEndpointConnections() { - List inner = this.innerModel().privateEndpointConnections(); + public List ipAllowlist() { + List inner = this.innerModel().ipAllowlist(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner); } else { return Collections.emptyList(); } } - public List sharedPrivateLinkResources() { - List inner = this.innerModel().sharedPrivateLinkResources(); + public String keyVault() { + return this.innerModel().keyVault(); + } + + public List keyVaults() { + List inner = this.innerModel().keyVaults(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -162,6 +186,19 @@ public List sharedPrivateLinkResources() { } } + public ManagedNetworkSettings managedNetwork() { + ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public String mlFlowTrackingUri() { + return this.innerModel().mlFlowTrackingUri(); + } + public NotebookResourceInfo notebookInfo() { NotebookResourceInfoInner inner = this.innerModel().notebookInfo(); if (inner != null) { @@ -171,30 +208,94 @@ public NotebookResourceInfo notebookInfo() { } } + public String primaryUserAssignedIdentity() { + return this.innerModel().primaryUserAssignedIdentity(); + } + + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Integer privateLinkCount() { + return this.innerModel().privateLinkCount(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PublicNetworkAccessType publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { return this.innerModel().serviceManagedResourcesSettings(); } - public String primaryUserAssignedIdentity() { - return this.innerModel().primaryUserAssignedIdentity(); + public String serviceProvisionedResourceGroup() { + return this.innerModel().serviceProvisionedResourceGroup(); } - public String tenantId() { - return this.innerModel().tenantId(); + public List sharedPrivateLinkResources() { + List inner = this.innerModel().sharedPrivateLinkResources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); + } + + public String storageAccount() { + return this.innerModel().storageAccount(); + } + + public List storageAccounts() { + List inner = this.innerModel().storageAccounts(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } public Boolean storageHnsEnabled() { return this.innerModel().storageHnsEnabled(); } - public String mlFlowTrackingUri() { - return this.innerModel().mlFlowTrackingUri(); + public String systemDatastoresAuthMode() { + return this.innerModel().systemDatastoresAuthMode(); + } + + public String tenantId() { + return this.innerModel().tenantId(); } public Boolean v1LegacyMode() { return this.innerModel().v1LegacyMode(); } + public WorkspaceHubConfig workspaceHubConfig() { + return this.innerModel().workspaceHubConfig(); + } + + public String workspaceId() { + return this.innerModel().workspaceId(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -219,7 +320,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String workspaceName; - private WorkspaceUpdateParameters updateParameters; + private WorkspaceUpdateParametersInner updateBody; public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -227,20 +328,14 @@ public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { } public Workspace create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkspaces().createOrUpdate(resourceGroupName, + workspaceName, this.innerModel(), Context.NONE); return this; } public Workspace create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkspaces().createOrUpdate(resourceGroupName, + workspaceName, this.innerModel(), context); return this; } @@ -251,53 +346,39 @@ public Workspace create(Context context) { } public WorkspaceImpl update() { - this.updateParameters = new WorkspaceUpdateParameters(); + this.updateBody = new WorkspaceUpdateParametersInner(); return this; } public Workspace apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .update(resourceGroupName, workspaceName, updateParameters, Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkspaces().update(resourceGroupName, workspaceName, + updateBody, Context.NONE); return this; } public Workspace apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .update(resourceGroupName, workspaceName, updateParameters, context); + this.innerObject = serviceManager.serviceClient().getWorkspaces().update(resourceGroupName, workspaceName, + updateBody, context); return this; } - WorkspaceImpl( - WorkspaceInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + WorkspaceImpl(WorkspaceInner 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.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); } public Workspace refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); return this; } public Workspace refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context).getValue(); return this; } @@ -305,8 +386,8 @@ public DiagnoseResponseResult diagnose() { return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName); } - public DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters, Context context) { - return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName, parameters, context); + public DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters body, Context context) { + return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName, body, context); } public Response listKeysWithResponse(Context context) { @@ -317,48 +398,46 @@ public ListWorkspaceKeysResult listKeys() { return serviceManager.workspaces().listKeys(resourceGroupName, workspaceName); } - public void resyncKeys() { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(Context context) { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName, context); - } - public Response listNotebookAccessTokenWithResponse(Context context) { - return serviceManager - .workspaces() - .listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); + return serviceManager.workspaces().listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, + context); } public NotebookAccessTokenResult listNotebookAccessToken() { return serviceManager.workspaces().listNotebookAccessToken(resourceGroupName, workspaceName); } - public NotebookResourceInfo prepareNotebook() { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName); + public Response listNotebookKeysWithResponse(Context context) { + return serviceManager.workspaces().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); } - public NotebookResourceInfo prepareNotebook(Context context) { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName, context); + public ListNotebookKeysResult listNotebookKeys() { + return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); } public Response listStorageAccountKeysWithResponse(Context context) { - return serviceManager - .workspaces() - .listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); + return serviceManager.workspaces().listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, + context); } public ListStorageAccountKeysResult listStorageAccountKeys() { return serviceManager.workspaces().listStorageAccountKeys(resourceGroupName, workspaceName); } - public Response listNotebookKeysWithResponse(Context context) { - return serviceManager.workspaces().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); + public NotebookResourceInfo prepareNotebook() { + return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName); } - public ListNotebookKeysResult listNotebookKeys() { - return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); + public NotebookResourceInfo prepareNotebook(Context context) { + return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName, context); + } + + public void resyncKeys() { + serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName); + } + + public void resyncKeys(Context context) { + serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName, context); } public WorkspaceImpl withRegion(Region location) { @@ -376,7 +455,7 @@ public WorkspaceImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateParameters.withTags(tags); + this.updateBody.withTags(tags); return this; } } @@ -386,79 +465,124 @@ public WorkspaceImpl withIdentity(ManagedServiceIdentity identity) { this.innerModel().withIdentity(identity); return this; } else { - this.updateParameters.withIdentity(identity); + this.updateBody.withIdentity(identity); return this; } } + public WorkspaceImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + public WorkspaceImpl withSku(Sku sku) { if (isInCreateMode()) { this.innerModel().withSku(sku); return this; } else { - this.updateParameters.withSku(sku); + this.updateBody.withSku(sku); return this; } } - public WorkspaceImpl withDescription(String description) { + public WorkspaceImpl withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { + this.innerModel().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); + return this; + } + + public WorkspaceImpl withApplicationInsights(String applicationInsights) { if (isInCreateMode()) { - this.innerModel().withDescription(description); + this.innerModel().withApplicationInsights(applicationInsights); return this; } else { - this.updateParameters.withDescription(description); + this.updateBody.withApplicationInsights(applicationInsights); return this; } } - public WorkspaceImpl withFriendlyName(String friendlyName) { + public WorkspaceImpl withAssociatedWorkspaces(List associatedWorkspaces) { + this.innerModel().withAssociatedWorkspaces(associatedWorkspaces); + return this; + } + + public WorkspaceImpl withContainerRegistries(List containerRegistries) { + this.innerModel().withContainerRegistries(containerRegistries); + return this; + } + + public WorkspaceImpl withContainerRegistry(String containerRegistry) { if (isInCreateMode()) { - this.innerModel().withFriendlyName(friendlyName); + this.innerModel().withContainerRegistry(containerRegistry); return this; } else { - this.updateParameters.withFriendlyName(friendlyName); + this.updateBody.withContainerRegistry(containerRegistry); return this; } } - public WorkspaceImpl withKeyVault(String keyVault) { - this.innerModel().withKeyVault(keyVault); + public WorkspaceImpl withDescription(String description) { + if (isInCreateMode()) { + this.innerModel().withDescription(description); + return this; + } else { + this.updateBody.withDescription(description); + return this; + } + } + + public WorkspaceImpl withDiscoveryUrl(String discoveryUrl) { + this.innerModel().withDiscoveryUrl(discoveryUrl); return this; } - public WorkspaceImpl withApplicationInsights(String applicationInsights) { + public WorkspaceImpl withEnableDataIsolation(Boolean enableDataIsolation) { if (isInCreateMode()) { - this.innerModel().withApplicationInsights(applicationInsights); + this.innerModel().withEnableDataIsolation(enableDataIsolation); return this; } else { - this.updateParameters.withApplicationInsights(applicationInsights); + this.updateBody.withEnableDataIsolation(enableDataIsolation); return this; } } - public WorkspaceImpl withContainerRegistry(String containerRegistry) { + public WorkspaceImpl withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { if (isInCreateMode()) { - this.innerModel().withContainerRegistry(containerRegistry); + this.innerModel().withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); return this; } else { - this.updateParameters.withContainerRegistry(containerRegistry); + this.updateBody.withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); return this; } } - public WorkspaceImpl withStorageAccount(String storageAccount) { - this.innerModel().withStorageAccount(storageAccount); + public WorkspaceImpl withEncryption(EncryptionProperty encryption) { + this.innerModel().withEncryption(encryption); return this; } - public WorkspaceImpl withDiscoveryUrl(String discoveryUrl) { - this.innerModel().withDiscoveryUrl(discoveryUrl); + public WorkspaceImpl withExistingWorkspaces(List existingWorkspaces) { + this.innerModel().withExistingWorkspaces(existingWorkspaces); return this; } - public WorkspaceImpl withEncryption(EncryptionProperty encryption) { - this.innerModel().withEncryption(encryption); - return this; + public WorkspaceImpl withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + if (isInCreateMode()) { + this.innerModel().withFeatureStoreSettings(featureStoreSettings); + return this; + } else { + this.updateBody.withFeatureStoreSettings(featureStoreSettings); + return this; + } + } + + public WorkspaceImpl withFriendlyName(String friendlyName) { + if (isInCreateMode()) { + this.innerModel().withFriendlyName(friendlyName); + return this; + } else { + this.updateBody.withFriendlyName(friendlyName); + return this; + } } public WorkspaceImpl withHbiWorkspace(Boolean hbiWorkspace) { @@ -466,27 +590,88 @@ public WorkspaceImpl withHbiWorkspace(Boolean hbiWorkspace) { return this; } + public WorkspaceImpl withHubResourceId(String hubResourceId) { + this.innerModel().withHubResourceId(hubResourceId); + return this; + } + public WorkspaceImpl withImageBuildCompute(String imageBuildCompute) { if (isInCreateMode()) { this.innerModel().withImageBuildCompute(imageBuildCompute); return this; } else { - this.updateParameters.withImageBuildCompute(imageBuildCompute); + this.updateBody.withImageBuildCompute(imageBuildCompute); return this; } } - public WorkspaceImpl withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.innerModel().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); + public WorkspaceImpl withIpAllowlist(List ipAllowlist) { + if (isInCreateMode()) { + this.innerModel().withIpAllowlist(ipAllowlist); + return this; + } else { + this.updateBody.withIpAllowlist(ipAllowlist); + return this; + } + } + + public WorkspaceImpl withKeyVault(String keyVault) { + this.innerModel().withKeyVault(keyVault); + return this; + } + + public WorkspaceImpl withKeyVaults(List keyVaults) { + this.innerModel().withKeyVaults(keyVaults); return this; } - public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public WorkspaceImpl withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + if (isInCreateMode()) { + this.innerModel().withManagedNetwork(managedNetwork); + return this; + } else { + this.updateBody.withManagedNetwork(managedNetwork); + return this; + } + } + + public WorkspaceImpl withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + if (isInCreateMode()) { + this.innerModel().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + return this; + } else { + this.updateBody.withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + return this; + } + } + + public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { if (isInCreateMode()) { this.innerModel().withPublicNetworkAccess(publicNetworkAccess); return this; } else { - this.updateParameters.withPublicNetworkAccess(publicNetworkAccess); + this.updateBody.withPublicNetworkAccess(publicNetworkAccess); + return this; + } + } + + public WorkspaceImpl withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + if (isInCreateMode()) { + this.innerModel().withServerlessComputeSettings(serverlessComputeSettings); + return this; + } else { + this.updateBody.withServerlessComputeSettings(serverlessComputeSettings); + return this; + } + } + + public WorkspaceImpl + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + if (isInCreateMode()) { + this.innerModel().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + return this; + } else { + this.updateBody.withServiceManagedResourcesSettings(serviceManagedResourcesSettings); return this; } } @@ -496,29 +681,48 @@ public WorkspaceImpl withSharedPrivateLinkResources(List storageAccounts) { + this.innerModel().withStorageAccounts(storageAccounts); + return this; + } + + public WorkspaceImpl withSystemDatastoresAuthMode(String systemDatastoresAuthMode) { + this.innerModel().withSystemDatastoresAuthMode(systemDatastoresAuthMode); + return this; + } + + public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { if (isInCreateMode()) { - this.innerModel().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + this.innerModel().withV1LegacyMode(v1LegacyMode); return this; } else { - this.updateParameters.withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + this.updateBody.withV1LegacyMode(v1LegacyMode); return this; } } - public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { - this.innerModel().withV1LegacyMode(v1LegacyMode); + public WorkspaceImpl withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig) { + this.innerModel().withWorkspaceHubConfig(workspaceHubConfig); + return this; + } + + public WorkspaceImpl withEncryption(EncryptionUpdateProperties encryption) { + this.updateBody.withEncryption(encryption); return this; } 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..e664e934e3983 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,16 +4,21 @@ 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.FeatureStoreSettings; +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.PublicNetworkAccessType; +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.WorkspaceHubConfig; import com.azure.resourcemanager.machinelearning.models.WorkspaceProperties; import java.util.Collections; import java.util.List; @@ -24,93 +29,106 @@ public final class WorkspacePropertiesImpl implements WorkspaceProperties { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - WorkspacePropertiesImpl( - WorkspacePropertiesInner innerObject, + WorkspacePropertiesImpl(WorkspacePropertiesInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public String workspaceId() { - return this.innerModel().workspaceId(); - } - - public String description() { - return this.innerModel().description(); + public Boolean allowPublicAccessWhenBehindVnet() { + return this.innerModel().allowPublicAccessWhenBehindVnet(); } - public String friendlyName() { - return this.innerModel().friendlyName(); + public String applicationInsights() { + return this.innerModel().applicationInsights(); } - public String keyVault() { - return this.innerModel().keyVault(); + public List associatedWorkspaces() { + List inner = this.innerModel().associatedWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public String applicationInsights() { - return this.innerModel().applicationInsights(); + public List containerRegistries() { + List inner = this.innerModel().containerRegistries(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } public String containerRegistry() { return this.innerModel().containerRegistry(); } - public String storageAccount() { - return this.innerModel().storageAccount(); + public String description() { + return this.innerModel().description(); } public String discoveryUrl() { return this.innerModel().discoveryUrl(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public Boolean enableDataIsolation() { + return this.innerModel().enableDataIsolation(); + } + + public Boolean enableSoftwareBillOfMaterials() { + return this.innerModel().enableSoftwareBillOfMaterials(); } public EncryptionProperty encryption() { return this.innerModel().encryption(); } - public Boolean hbiWorkspace() { - return this.innerModel().hbiWorkspace(); + public List existingWorkspaces() { + List inner = this.innerModel().existingWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public String serviceProvisionedResourceGroup() { - return this.innerModel().serviceProvisionedResourceGroup(); + public FeatureStoreSettings featureStoreSettings() { + return this.innerModel().featureStoreSettings(); } - public Integer privateLinkCount() { - return this.innerModel().privateLinkCount(); + public String friendlyName() { + return this.innerModel().friendlyName(); } - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); + public Boolean hbiWorkspace() { + return this.innerModel().hbiWorkspace(); } - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerModel().allowPublicAccessWhenBehindVnet(); + public String hubResourceId() { + return this.innerModel().hubResourceId(); } - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); + public String imageBuildCompute() { + return this.innerModel().imageBuildCompute(); } - public List privateEndpointConnections() { - List inner = this.innerModel().privateEndpointConnections(); + public List ipAllowlist() { + List inner = this.innerModel().ipAllowlist(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner); } else { return Collections.emptyList(); } } - public List sharedPrivateLinkResources() { - List inner = this.innerModel().sharedPrivateLinkResources(); + public String keyVault() { + return this.innerModel().keyVault(); + } + + public List keyVaults() { + List inner = this.innerModel().keyVaults(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -118,6 +136,19 @@ public List sharedPrivateLinkResources() { } } + public ManagedNetworkSettings managedNetwork() { + ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public String mlFlowTrackingUri() { + return this.innerModel().mlFlowTrackingUri(); + } + public NotebookResourceInfo notebookInfo() { NotebookResourceInfoInner inner = this.innerModel().notebookInfo(); if (inner != null) { @@ -127,30 +158,94 @@ public NotebookResourceInfo notebookInfo() { } } + public String primaryUserAssignedIdentity() { + return this.innerModel().primaryUserAssignedIdentity(); + } + + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())).collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Integer privateLinkCount() { + return this.innerModel().privateLinkCount(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public PublicNetworkAccessType publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { return this.innerModel().serviceManagedResourcesSettings(); } - public String primaryUserAssignedIdentity() { - return this.innerModel().primaryUserAssignedIdentity(); + public String serviceProvisionedResourceGroup() { + return this.innerModel().serviceProvisionedResourceGroup(); } - public String tenantId() { - return this.innerModel().tenantId(); + public List sharedPrivateLinkResources() { + List inner = this.innerModel().sharedPrivateLinkResources(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); + } + + public String storageAccount() { + return this.innerModel().storageAccount(); + } + + public List storageAccounts() { + List inner = this.innerModel().storageAccounts(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } public Boolean storageHnsEnabled() { return this.innerModel().storageHnsEnabled(); } - public String mlFlowTrackingUri() { - return this.innerModel().mlFlowTrackingUri(); + public String systemDatastoresAuthMode() { + return this.innerModel().systemDatastoresAuthMode(); + } + + public String tenantId() { + return this.innerModel().tenantId(); } public Boolean v1LegacyMode() { return this.innerModel().v1LegacyMode(); } + public WorkspaceHubConfig workspaceHubConfig() { + return this.innerModel().workspaceHubConfig(); + } + + public String workspaceId() { + return this.innerModel().workspaceId(); + } + public WorkspacePropertiesInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java new file mode 100644 index 0000000000000..3382f62cedcd8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java @@ -0,0 +1,115 @@ +// Copyright (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.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner; +import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; +import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; +import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; +import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; +import com.azure.resourcemanager.machinelearning.models.WorkspacePropertiesUpdateParameters; +import java.util.Collections; +import java.util.List; + +public final class WorkspacePropertiesUpdateParametersImpl implements WorkspacePropertiesUpdateParameters { + private WorkspacePropertiesUpdateParametersInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + WorkspacePropertiesUpdateParametersImpl(WorkspacePropertiesUpdateParametersInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String applicationInsights() { + return this.innerModel().applicationInsights(); + } + + public String containerRegistry() { + return this.innerModel().containerRegistry(); + } + + public String description() { + return this.innerModel().description(); + } + + public Boolean enableDataIsolation() { + return this.innerModel().enableDataIsolation(); + } + + public Boolean enableSoftwareBillOfMaterials() { + return this.innerModel().enableSoftwareBillOfMaterials(); + } + + public EncryptionUpdateProperties encryption() { + return this.innerModel().encryption(); + } + + public FeatureStoreSettings featureStoreSettings() { + return this.innerModel().featureStoreSettings(); + } + + public String friendlyName() { + return this.innerModel().friendlyName(); + } + + public String imageBuildCompute() { + return this.innerModel().imageBuildCompute(); + } + + public List ipAllowlist() { + List inner = this.innerModel().ipAllowlist(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ManagedNetworkSettings managedNetwork() { + ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public String primaryUserAssignedIdentity() { + return this.innerModel().primaryUserAssignedIdentity(); + } + + public PublicNetworkAccessType publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerModel().serviceManagedResourcesSettings(); + } + + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); + } + + public Boolean v1LegacyMode() { + return this.innerModel().v1LegacyMode(); + } + + public WorkspacePropertiesUpdateParametersInner 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/WorkspaceUpdateParametersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.java new file mode 100644 index 0000000000000..c6e3883acaed6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.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.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; +import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; +import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; +import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class WorkspaceUpdateParametersImpl implements WorkspaceUpdateParameters { + private WorkspaceUpdateParametersInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + WorkspaceUpdateParametersImpl(WorkspaceUpdateParametersInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String applicationInsights() { + return this.innerModel().applicationInsights(); + } + + public String containerRegistry() { + return this.innerModel().containerRegistry(); + } + + public String description() { + return this.innerModel().description(); + } + + public Boolean enableDataIsolation() { + return this.innerModel().enableDataIsolation(); + } + + public Boolean enableSoftwareBillOfMaterials() { + return this.innerModel().enableSoftwareBillOfMaterials(); + } + + public EncryptionUpdateProperties encryption() { + return this.innerModel().encryption(); + } + + public FeatureStoreSettings featureStoreSettings() { + return this.innerModel().featureStoreSettings(); + } + + public String friendlyName() { + return this.innerModel().friendlyName(); + } + + public String imageBuildCompute() { + return this.innerModel().imageBuildCompute(); + } + + public List ipAllowlist() { + List inner = this.innerModel().ipAllowlist(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ManagedNetworkSettings managedNetwork() { + ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public String primaryUserAssignedIdentity() { + return this.innerModel().primaryUserAssignedIdentity(); + } + + public PublicNetworkAccessType publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerModel().serviceManagedResourcesSettings(); + } + + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); + } + + public Boolean v1LegacyMode() { + return this.innerModel().v1LegacyMode(); + } + + public WorkspaceUpdateParametersInner 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/WorkspacesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java index 31d06417842a9..cb6ac1cc85a90 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 @@ -42,705 +42,537 @@ import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; import com.azure.resourcemanager.machinelearning.models.WorkspaceListResult; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; 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 WorkspacesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspacesClient. + */ public final class WorkspacesClientImpl implements WorkspacesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkspacesService service; - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningServicesImpl client; /** * Initializes an instance of WorkspacesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ - WorkspacesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + 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}") @ServiceInterface(name = "AzureMachineLearning") public interface WorkspacesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @QueryParam("kind") String kind, @QueryParam("$skip") String skip, + @QueryParam("aiCapabilities") String aiCapabilities, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @QueryParam("kind") String kind, @QueryParam("$skip") String skip, + @QueryParam("aiCapabilities") String aiCapabilities, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @QueryParam("forceToPurge") Boolean forceToPurge, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceUpdateParameters parameters, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkspaceUpdateParametersInner body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") WorkspaceInner body, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> diagnose( - @HostParam("$host") String endpoint, + Mono>> diagnose(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DiagnoseWorkspaceParameters parameters, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") DiagnoseWorkspaceParameters body, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> listKeys(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resyncKeys( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> listNotebookAccessToken(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> listNotebookKeys(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookAccessToken( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> listStorageAccountKeys(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> prepareNotebook( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + Mono> listOutboundNetworkDependenciesEndpoints( + @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"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listStorageAccountKeys( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono>> prepareNotebook(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookKeys( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono>> resyncKeys(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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}/outboundNetworkDependenciesEndpoints") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpoints( - @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. + * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName) { + private Mono> listSinglePageAsync(String kind, String skip, String aiCapabilities) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), kind, skip, aiCapabilities, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. + * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> listSinglePageAsync(String kind, String skip, String aiCapabilities, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - 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.")); + 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 - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), kind, skip, + aiCapabilities, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace on successful completion of {@link Mono}. + * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String kind, String skip, String aiCapabilities) { + return new PagedFlux<>(() -> listSinglePageAsync(kind, skip, aiCapabilities), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * Lists all the available machine learning workspaces under the specified 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 the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String kind = null; + final String skip = null; + final String aiCapabilities = null; + return new PagedFlux<>(() -> listSinglePageAsync(kind, skip, aiCapabilities), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. + * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String kind, String skip, String aiCapabilities, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(kind, skip, aiCapabilities, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * Lists all the available machine learning workspaces under the specified 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 the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String kind = null; + final String skip = null; + final String aiCapabilities = null; + return new PagedIterable<>(listAsync(kind, skip, aiCapabilities)); + } + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String kind, String skip, String aiCapabilities, Context context) { + return new PagedIterable<>(listAsync(kind, skip, aiCapabilities, context)); } /** - * Creates or updates a workspace with the specified parameters. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. + * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String kind, String skip, String aiCapabilities) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - parameters, - accept, - context)) + context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), kind, skip, aiCapabilities, 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())); } /** - * Creates or updates a workspace with the specified parameters. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. + * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String kind, String skip, String aiCapabilities, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - parameters, - accept, - context); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), kind, skip, aiCapabilities, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating 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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkspaceInner.class, - WorkspaceInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating 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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), WorkspaceInner.class, WorkspaceInner.class, context); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating 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 an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. + * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String kind, String skip, + String aiCapabilities) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, kind, skip, aiCapabilities), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Creates or updates a workspace with the specified parameters. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating 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 an object that represents a machine learning workspace on successful completion of {@link Mono}. + * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String kind = null; + final String skip = null; + final String aiCapabilities = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, kind, skip, aiCapabilities), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Creates or updates a workspace with the specified parameters. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 an object that represents a machine learning workspace on successful completion of {@link Mono}. + * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String kind, String skip, + String aiCapabilities, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, kind, skip, aiCapabilities, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** - * Creates or updates a workspace with the specified parameters. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating 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 an object that represents a machine learning workspace. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String kind = null; + final String skip = null; + final String aiCapabilities = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, kind, skip, aiCapabilities)); } /** - * Creates or updates a workspace with the specified parameters. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 an object that represents a machine learning workspace. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String kind, String skip, + String aiCapabilities, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, kind, skip, aiCapabilities, 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 workspaceName Azure Machine Learning Workspace Name. + * @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( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -751,25 +583,17 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), forceToPurge, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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 workspaceName Azure Machine Learning Workspace Name. + * @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. @@ -777,19 +601,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + Boolean forceToPurge, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -800,22 +620,34 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), 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 workspaceName Azure Machine Learning Workspace Name. + * @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. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -823,18 +655,18 @@ private Mono>> deleteWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + final Boolean forceToPurge = null; + 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. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @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. @@ -842,20 +674,20 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + Boolean forceToPurge, Context context) { context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + 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 workspaceName Azure Machine Learning Workspace 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. @@ -863,14 +695,16 @@ 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(); } /** * 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 workspaceName Azure Machine Learning Workspace Name. + * @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. @@ -878,16 +712,33 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(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 Azure Machine Learning Workspace Name. + * @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); } /** * 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 workspaceName Azure Machine Learning Workspace 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. @@ -895,14 +746,17 @@ 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); } /** * 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 workspaceName Azure Machine Learning Workspace Name. + * @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,67 +764,186 @@ 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) - .last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, Boolean forceToPurge, + Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * 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 workspaceName Azure Machine Learning Workspace 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 workspaceName) { - deleteAsync(resourceGroupName, workspaceName).block(); + final Boolean forceToPurge = null; + deleteAsync(resourceGroupName, workspaceName, forceToPurge).block(); } /** * 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 workspaceName Azure Machine Learning Workspace Name. + * @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(); } /** - * Updates a machine learning workspace with the specified parameters. - * + * Gets the properties of the specified 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 parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. + * @return the properties of the specified machine learning workspace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { + private Mono> getByResourceGroupWithResponseAsync(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 this.client.getEndpoint() is required and cannot be null.")); + .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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the properties of the specified machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 properties of the specified machine learning workspace along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(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 this.client.getSubscriptionId() is required and cannot be null.")); + .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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets the properties of the specified machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 properties of the specified machine learning workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the properties of the specified machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 properties of the specified machine learning workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); + } + + /** + * Gets the properties of the specified machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 properties of the specified machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + /** + * Updates a machine learning workspace with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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 an object that represents a machine learning workspace along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner 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 @@ -979,55 +952,41 @@ private Mono>> updateWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { - parameters.validate(); + body.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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 an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1036,56 +995,42 @@ private Mono>> updateWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); } else { - parameters.validate(); + body.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), body, accept, context); } /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkspaceInner.class, - WorkspaceInner.class, - this.client.getContext()); + private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, WorkspaceUpdateParametersInner body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); } /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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. @@ -1093,40 +1038,38 @@ private PollerFlux, WorkspaceInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context) { + private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, WorkspaceUpdateParametersInner body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), WorkspaceInner.class, WorkspaceInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkspaceInner.class, WorkspaceInner.class, context); } /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); + public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, + String workspaceName, WorkspaceUpdateParametersInner body) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, body).getSyncPoller(); } /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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. @@ -1134,36 +1077,35 @@ public SyncPoller, WorkspaceInner> beginUpdate( * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); + public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, + String workspaceName, WorkspaceUpdateParametersInner body, Context context) { + return this.beginUpdateAsync(resourceGroupName, workspaceName, body, context).getSyncPoller(); } /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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 an object that represents a machine learning workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters) - .last() + private Mono updateAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body) { + return beginUpdateAsync(resourceGroupName, workspaceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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. @@ -1171,35 +1113,34 @@ private Mono updateAsync( * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, parameters).block(); + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParametersInner body) { + return updateAsync(resourceGroupName, workspaceName, body).block(); } /** * Updates a machine learning workspace with the specified parameters. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating 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. @@ -1207,229 +1148,263 @@ public WorkspaceInner update(String resourceGroupName, String workspaceName, Wor * @return an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - return updateAsync(resourceGroupName, workspaceName, parameters, context).block(); + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParametersInner body, + Context context) { + return updateAsync(resourceGroupName, workspaceName, body, context).block(); } /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Creates or updates a workspace with the specified parameters. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return an object that represents a machine learning workspace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String skip) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, WorkspaceInner body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .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) { + 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 - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Creates or updates a workspace with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 an object that represents 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, WorkspaceInner 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) { + 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, this.client.getApiVersion(), body, accept, context); + } + + /** + * Creates or updates a workspace with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 an object that represents a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String workspaceName, WorkspaceInner body) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); + } + + /** + * Creates or updates a workspace with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 an object that represents a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, + String workspaceName, WorkspaceInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkspaceInner.class, WorkspaceInner.class, context); + } + + /** + * Creates or updates a workspace with the specified parameters. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, body).getSyncPoller(); } /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Creates or updates a workspace with the specified parameters. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. + * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, WorkspaceInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, body, context).getSyncPoller(); } /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Creates or updates a workspace with the specified parameters. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. + * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String skip = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + WorkspaceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Creates or updates a workspace with the specified parameters. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. + * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, skip, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + WorkspaceInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Creates or updates a workspace with the specified parameters. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return an object that represents a machine learning workspace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skip = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, body).block(); } /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Creates or updates a workspace with the specified parameters. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return an object that represents a machine learning workspace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner body, + Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, body, context).block(); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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>> diagnoseWithResponseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { + private Mono>> diagnoseWithResponseAsync(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1438,32 +1413,22 @@ private Mono>> diagnoseWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (parameters != null) { - parameters.validate(); + if (body != null) { + body.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .diagnose( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - parameters, - accept, - context)) + .withContext(context -> service.diagnose(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1471,19 +1436,15 @@ private Mono>> diagnoseWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> diagnoseWithResponseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { + private Mono>> diagnoseWithResponseAsync(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1492,79 +1453,61 @@ private Mono>> diagnoseWithResponseAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - if (parameters != null) { - parameters.validate(); + if (body != null) { + body.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .diagnose( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - parameters, - accept, - context); + return service.diagnose(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), body, accept, context); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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, DiagnoseResponseResultInner> beginDiagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DiagnoseResponseResultInner.class, - DiagnoseResponseResultInner.class, - this.client.getContext()); + private PollerFlux, DiagnoseResponseResultInner> + beginDiagnoseAsync(String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body) { + Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, + this.client.getContext()); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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, DiagnoseResponseResultInner> beginDiagnoseAsync( - String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DiagnoseResponseResultInner.class, - DiagnoseResponseResultInner.class, - this.client.getContext()); + private PollerFlux, DiagnoseResponseResultInner> + beginDiagnoseAsync(String resourceGroupName, String workspaceName) { + final DiagnoseWorkspaceParameters body = null; + Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, + this.client.getContext()); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1573,43 +1516,38 @@ private PollerFlux, DiagnoseResponseResu */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiagnoseResponseResultInner> beginDiagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { + String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DiagnoseResponseResultInner.class, - DiagnoseResponseResultInner.class, - context); + Mono>> mono + = diagnoseWithResponseAsync(resourceGroupName, workspaceName, body, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, + context); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return this.beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); + public SyncPoller, DiagnoseResponseResultInner> + beginDiagnose(String resourceGroupName, String workspaceName) { + final DiagnoseWorkspaceParameters body = null; + return this.beginDiagnoseAsync(resourceGroupName, workspaceName, body).getSyncPoller(); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1618,34 +1556,33 @@ public SyncPoller, DiagnoseResponseResul */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - return this.beginDiagnoseAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); + String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body, Context context) { + return this.beginDiagnoseAsync(resourceGroupName, workspaceName, body, context).getSyncPoller(); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 diagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters) - .last() + private Mono diagnoseAsync(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body) { + return beginDiagnoseAsync(resourceGroupName, workspaceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1653,18 +1590,17 @@ private Mono diagnoseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono diagnoseAsync(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters) - .last() + final DiagnoseWorkspaceParameters body = null; + return beginDiagnoseAsync(resourceGroupName, workspaceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1672,18 +1608,17 @@ private Mono diagnoseAsync(String resourceGroupName * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono diagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters, context) - .last() + private Mono diagnoseAsync(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body, Context context) { + return beginDiagnoseAsync(resourceGroupName, workspaceName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1691,16 +1626,16 @@ private Mono diagnoseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return diagnoseAsync(resourceGroupName, workspaceName, parameters).block(); + final DiagnoseWorkspaceParameters body = null; + return diagnoseAsync(resourceGroupName, workspaceName, body).block(); } /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1708,36 +1643,32 @@ public DiagnoseResponseResultInner diagnose(String resourceGroupName, String wor * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnoseResponseResultInner diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - return diagnoseAsync(resourceGroupName, workspaceName, parameters, context).block(); + public DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body, Context context) { + return diagnoseAsync(resourceGroupName, workspaceName, body, context).block(); } /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName) { + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1748,26 +1679,17 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1775,19 +1697,15 @@ private Mono> listKeysWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> listKeysWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1798,23 +1716,16 @@ private Mono> listKeysWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); + return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, context); } /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1829,9 +1740,9 @@ private Mono listKeysAsync(String resourceGroupNam /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1839,17 +1750,17 @@ private Mono listKeysAsync(String resourceGroupNam * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + Context context) { return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1861,30 +1772,26 @@ public ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String wo } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Get Azure Machine Learning Workspace notebook access token. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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}. + * @return azure Machine Learning Workspace notebook access token along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync( - String resourceGroupName, String workspaceName) { + private Mono> + listNotebookAccessTokenWithResponseAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1896,45 +1803,33 @@ private Mono>> resyncKeysWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .resyncKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + context -> service.listNotebookAccessToken(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Get Azure Machine Learning Workspace notebook access token. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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}. + * @return azure Machine Learning Workspace notebook access token along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> + listNotebookAccessTokenWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1945,355 +1840,317 @@ private Mono>> resyncKeysWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .resyncKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); + return service.listNotebookAccessToken(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Get Azure Machine Learning Workspace notebook access token. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. + * @return azure Machine Learning Workspace notebook access token on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listNotebookAccessTokenAsync(String resourceGroupName, + String workspaceName) { + return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Get Azure Machine Learning Workspace notebook access token. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. + * @return azure Machine Learning Workspace notebook access token along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncKeysAsync( - String resourceGroupName, String workspaceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listNotebookAccessTokenWithResponse(String resourceGroupName, + String workspaceName, Context context) { + return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Get Azure Machine Learning Workspace notebook access token. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. + * @return azure Machine Learning Workspace notebook access token. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName) { - return this.beginResyncKeysAsync(resourceGroupName, workspaceName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName) { + return listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncKeys( - String resourceGroupName, String workspaceName, Context context) { - return this.beginResyncKeysAsync(resourceGroupName, workspaceName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNotebookKeysWithResponseAsync(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.listNotebookKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName) { - return beginResyncKeysAsync(resourceGroupName, workspaceName) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listNotebookKeysWithResponseAsync(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.listNotebookKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, context); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName, Context context) { - return beginResyncKeysAsync(resourceGroupName, workspaceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono listNotebookKeysAsync(String resourceGroupName, String workspaceName) { + return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncKeys(String resourceGroupName, String workspaceName) { - resyncKeysAsync(resourceGroupName, workspaceName).block(); + public Response listNotebookKeysWithResponse(String resourceGroupName, + String workspaceName, Context context) { + return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { - resyncKeysAsync(resourceGroupName, workspaceName, context).block(); + public ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName) { + return listNotebookKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. + * Lists keys of Azure Machine Learning Workspace's storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skip) { + private Mono> + listStorageAccountKeysWithResponseAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + .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.getApiVersion(), - this.client.getSubscriptionId(), - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listStorageAccountKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. + * Lists keys of Azure Machine Learning Workspace's storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skip, Context context) { + private Mono> + listStorageAccountKeysWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + .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.getApiVersion(), - this.client.getSubscriptionId(), - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listStorageAccountKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context); } /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. + * Lists keys of Azure Machine Learning Workspace's storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(skip), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified 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 the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. + * @return the response body on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(skip), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listStorageAccountKeysAsync(String resourceGroupName, + String workspaceName) { + return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. + * Lists keys of Azure Machine Learning Workspace's storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(skip, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available machine learning workspaces under the specified 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 the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skip = null; - return new PagedIterable<>(listAsync(skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listStorageAccountKeysWithResponse(String resourceGroupName, + String workspaceName, Context context) { + return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); } - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + /** + * Lists keys of Azure Machine Learning Workspace's storage account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skip, Context context) { - return new PagedIterable<>(listAsync(skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName) { + return listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** - * return notebook access token and refresh token. - * + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookAccessTokenWithResponseAsync( - String resourceGroupName, String workspaceName) { + private Mono> + listOutboundNetworkDependenciesEndpointsWithResponseAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2304,25 +2161,17 @@ private Mono> listNotebookAccessTokenWi } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listNotebookAccessToken( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * return notebook access token and refresh token. - * + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2330,19 +2179,15 @@ private Mono> listNotebookAccessTokenWi * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookAccessTokenWithResponseAsync( + private Mono> listOutboundNetworkDependenciesEndpointsWithResponseAsync( 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2353,39 +2198,33 @@ private Mono> listNotebookAccessTokenWi } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNotebookAccessToken( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); + return service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, this.client.getApiVersion(), accept, + context); } /** - * return notebook access token and refresh token. - * + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listNotebookAccessTokenAsync( - String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName) + private Mono listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, + String workspaceName) { + return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * return notebook access token and refresh token. - * + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2393,50 +2232,49 @@ private Mono listNotebookAccessTokenAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookAccessTokenWithResponse( + public Response listOutboundNetworkDependenciesEndpointsWithResponse( String resourceGroupName, String workspaceName, Context context) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); + return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName, context) + .block(); } /** - * return notebook access token and refresh token. - * + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + public ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String workspaceName) { + return listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, Context.NONE) + .getValue(); } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareNotebookWithResponseAsync( - String resourceGroupName, String workspaceName) { + private Mono>> prepareNotebookWithResponseAsync(String resourceGroupName, + String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2447,25 +2285,16 @@ private Mono>> prepareNotebookWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .prepareNotebook( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + .withContext(context -> service.prepareNotebook(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2473,19 +2302,15 @@ private Mono>> prepareNotebookWithResponseAsync( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareNotebookWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono>> prepareNotebookWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2496,46 +2321,34 @@ private Mono>> prepareNotebookWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .prepareNotebook( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); + return service.prepareNotebook(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, context); } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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, NotebookResourceInfoInner> beginPrepareNotebookAsync( - String resourceGroupName, String workspaceName) { + private PollerFlux, NotebookResourceInfoInner> + beginPrepareNotebookAsync(String resourceGroupName, String workspaceName) { Mono>> mono = prepareNotebookWithResponseAsync(resourceGroupName, workspaceName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NotebookResourceInfoInner.class, - NotebookResourceInfoInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, + this.client.getContext()); } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2543,42 +2356,36 @@ private PollerFlux, NotebookResourceInfoIn * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NotebookResourceInfoInner> beginPrepareNotebookAsync( - String resourceGroupName, String workspaceName, Context context) { + private PollerFlux, NotebookResourceInfoInner> + beginPrepareNotebookAsync(String resourceGroupName, String workspaceName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - prepareNotebookWithResponseAsync(resourceGroupName, workspaceName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NotebookResourceInfoInner.class, - NotebookResourceInfoInner.class, - context); + Mono>> mono + = prepareNotebookWithResponseAsync(resourceGroupName, workspaceName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, context); } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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, NotebookResourceInfoInner> beginPrepareNotebook( - String resourceGroupName, String workspaceName) { + public SyncPoller, NotebookResourceInfoInner> + beginPrepareNotebook(String resourceGroupName, String workspaceName) { return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName).getSyncPoller(); } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2586,16 +2393,16 @@ public SyncPoller, NotebookResourceInfoInn * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( - String resourceGroupName, String workspaceName, Context context) { + public SyncPoller, NotebookResourceInfoInner> + beginPrepareNotebook(String resourceGroupName, String workspaceName, Context context) { return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).getSyncPoller(); } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2603,16 +2410,15 @@ public SyncPoller, NotebookResourceInfoInn */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono prepareNotebookAsync(String resourceGroupName, String workspaceName) { - return beginPrepareNotebookAsync(resourceGroupName, workspaceName) - .last() + return beginPrepareNotebookAsync(resourceGroupName, workspaceName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2620,18 +2426,17 @@ private Mono prepareNotebookAsync(String resourceGrou * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono prepareNotebookAsync( - String resourceGroupName, String workspaceName, Context context) { - return beginPrepareNotebookAsync(resourceGroupName, workspaceName, context) - .last() + private Mono prepareNotebookAsync(String resourceGroupName, String workspaceName, + Context context) { + return beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2643,10 +2448,10 @@ public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, Strin } /** - * Prepare a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2659,29 +2464,26 @@ public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, Strin } /** - * List storage account keys of a workspace. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listStorageAccountKeysWithResponseAsync( - String resourceGroupName, String workspaceName) { + private Mono>> resyncKeysWithResponseAsync(String resourceGroupName, + String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2692,45 +2494,33 @@ private Mono> listStorageAccountKeys } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listStorageAccountKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + .withContext(context -> service.resyncKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List storage account keys of a workspace. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listStorageAccountKeysWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono>> resyncKeysWithResponseAsync(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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2741,505 +2531,266 @@ private Mono> listStorageAccountKeys } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listStorageAccountKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * List storage account keys of a 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 response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listStorageAccountKeysAsync( - String resourceGroupName, String workspaceName) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return service.resyncKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, context); } /** - * List storage account keys of a 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 the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listStorageAccountKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * List storage account keys of a 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 response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName) { - return listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * List keys of a notebook. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync( - 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 - .listNotebookKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName) { + Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * List keys of a notebook. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync( - 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"; + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName, + Context context) { context = this.client.mergeContext(context); - return service - .listNotebookKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); + Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * List keys of a notebook. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listNotebookKeysAsync(String resourceGroupName, String workspaceName) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName) { + return this.beginResyncKeysAsync(resourceGroupName, workspaceName).getSyncPoller(); } /** - * List keys of a notebook. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * List keys of a notebook. - * - * @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 response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName) { - return listNotebookKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, + Context context) { + return this.beginResyncKeysAsync(resourceGroupName, workspaceName, context).getSyncPoller(); } /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutboundNetworkDependenciesEndpointsWithResponseAsync( - 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 - .listOutboundNetworkDependenciesEndpoints( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono resyncKeysAsync(String resourceGroupName, String workspaceName) { + return beginResyncKeysAsync(resourceGroupName, workspaceName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutboundNetworkDependenciesEndpointsWithResponseAsync( - 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 - .listOutboundNetworkDependenciesEndpoints( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context); + private Mono resyncKeysAsync(String resourceGroupName, String workspaceName, Context context) { + return beginResyncKeysAsync(resourceGroupName, workspaceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listOutboundNetworkDependenciesEndpointsAsync( - String resourceGroupName, String workspaceName) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void resyncKeys(String resourceGroupName, String workspaceName) { + resyncKeysAsync(resourceGroupName, workspaceName).block(); } /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName, context) - .block(); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints( - String resourceGroupName, String workspaceName) { - return listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); + public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { + resyncKeysAsync(resourceGroupName, workspaceName, context).block(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + 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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.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. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/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..184130684af6c 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 @@ -36,21 +36,48 @@ public final class WorkspacesImpl implements Workspaces { private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - public WorkspacesImpl( - WorkspacesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + public WorkspacesImpl(WorkspacesClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public PagedIterable list(String kind, String skip, String aiCapabilities, Context context) { + PagedIterable inner = this.serviceClient().list(kind, skip, aiCapabilities, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, String kind, String skip, + String aiCapabilities, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, kind, skip, aiCapabilities, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public void delete(String resourceGroupName, String workspaceName) { + this.serviceClient().delete(resourceGroupName, workspaceName); + } + + public void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, forceToPurge, context); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkspaceImpl(inner.getValue(), this.manager())); } else { return null; @@ -66,25 +93,6 @@ public Workspace getByResourceGroup(String resourceGroupName, String workspaceNa } } - public void deleteByResourceGroup(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 PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, skip, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - public DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName) { DiagnoseResponseResultInner inner = this.serviceClient().diagnose(resourceGroupName, workspaceName); if (inner != null) { @@ -94,10 +102,10 @@ public DiagnoseResponseResult diagnose(String resourceGroupName, String workspac } } - public DiagnoseResponseResult diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - DiagnoseResponseResultInner inner = - this.serviceClient().diagnose(resourceGroupName, workspaceName, parameters, context); + public DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body, Context context) { + DiagnoseResponseResultInner inner + = this.serviceClient().diagnose(resourceGroupName, workspaceName, body, context); if (inner != null) { return new DiagnoseResponseResultImpl(inner, this.manager()); } else { @@ -105,15 +113,12 @@ public DiagnoseResponseResult diagnose( } } - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ListWorkspaceKeysResultImpl(inner.getValue(), this.manager())); } else { return null; @@ -129,33 +134,12 @@ public ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspa } } - public void resyncKeys(String resourceGroupName, String workspaceName) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable list(String skip, Context context) { - PagedIterable inner = this.serviceClient().list(skip, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public Response listNotebookAccessTokenWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); + public Response listNotebookAccessTokenWithResponse(String resourceGroupName, + String workspaceName, Context context) { + Response inner + = this.serviceClient().listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new NotebookAccessTokenResultImpl(inner.getValue(), this.manager())); } else { return null; @@ -163,8 +147,8 @@ public Response listNotebookAccessTokenWithResponse( } public NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName) { - NotebookAccessTokenResultInner inner = - this.serviceClient().listNotebookAccessToken(resourceGroupName, workspaceName); + NotebookAccessTokenResultInner inner + = this.serviceClient().listNotebookAccessToken(resourceGroupName, workspaceName); if (inner != null) { return new NotebookAccessTokenResultImpl(inner, this.manager()); } else { @@ -172,34 +156,33 @@ public NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupNam } } - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName) { - NotebookResourceInfoInner inner = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName); + public Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ListNotebookKeysResultImpl(inner.getValue(), this.manager())); } else { return null; } } - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context) { - NotebookResourceInfoInner inner = - this.serviceClient().prepareNotebook(resourceGroupName, workspaceName, context); + public ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName) { + ListNotebookKeysResultInner inner = this.serviceClient().listNotebookKeys(resourceGroupName, workspaceName); if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); + return new ListNotebookKeysResultImpl(inner, this.manager()); } else { return null; } } - public Response listStorageAccountKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); + public Response listStorageAccountKeysWithResponse(String resourceGroupName, + String workspaceName, Context context) { + Response inner + = this.serviceClient().listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ListStorageAccountKeysResultImpl(inner.getValue(), this.manager())); } else { return null; @@ -207,8 +190,8 @@ public Response listStorageAccountKeysWithResponse } public ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName) { - ListStorageAccountKeysResultInner inner = - this.serviceClient().listStorageAccountKeys(resourceGroupName, workspaceName); + ListStorageAccountKeysResultInner inner + = this.serviceClient().listStorageAccountKeys(resourceGroupName, workspaceName); if (inner != null) { return new ListStorageAccountKeysResultImpl(inner, this.manager()); } else { @@ -216,132 +199,111 @@ public ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupN } } - public Response listNotebookKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); + public Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, + String workspaceName, Context context) { + Response inner = this.serviceClient() + .listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ListNotebookKeysResultImpl(inner.getValue(), this.manager())); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExternalFqdnResponseImpl(inner.getValue(), this.manager())); } else { return null; } } - public ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName) { - ListNotebookKeysResultInner inner = this.serviceClient().listNotebookKeys(resourceGroupName, workspaceName); + public ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String workspaceName) { + ExternalFqdnResponseInner inner + = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, workspaceName); if (inner != null) { - return new ListNotebookKeysResultImpl(inner, this.manager()); + return new ExternalFqdnResponseImpl(inner, this.manager()); } else { return null; } } - public Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this - .serviceClient() - .listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, context); + public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName) { + NotebookResourceInfoInner inner = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ExternalFqdnResponseImpl(inner.getValue(), this.manager())); + return new NotebookResourceInfoImpl(inner, this.manager()); } else { return null; } } - public ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints( - String resourceGroupName, String workspaceName) { - ExternalFqdnResponseInner inner = - this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, workspaceName); + public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context) { + NotebookResourceInfoInner inner + = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName, context); if (inner != null) { - return new ExternalFqdnResponseImpl(inner, this.manager()); + return new NotebookResourceInfoImpl(inner, this.manager()); } else { return null; } } + public void resyncKeys(String resourceGroupName, String workspaceName) { + this.serviceClient().resyncKeys(resourceGroupName, workspaceName); + } + + public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { + this.serviceClient().resyncKeys(resourceGroupName, workspaceName, context); + } + public Workspace getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(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) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + public void deleteByIdWithResponse(String id, Boolean forceToPurge, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String workspaceName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(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..493a1fefe775c 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 - * Azure Machine Learning Workspace resources. + * 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/AadAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java new file mode 100644 index 0000000000000..6b236f02d1cdc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.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.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * This connection type covers the AAD auth for any applicable Azure service. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("AAD") +@Fluent +public final class AadAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /** + * Creates an instance of AadAuthTypeWorkspaceConnectionProperties class. + */ + public AadAuthTypeWorkspaceConnectionProperties() { + } + + /** + * {@inheritDoc} + */ + @Override + public AadAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AadAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AadAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AadAuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AadAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AadAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + 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/AccessKeyAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java new file mode 100644 index 0000000000000..8cde22d39b8b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,119 @@ +// Copyright (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; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The AccessKeyAuthTypeWorkspaceConnectionProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("AccessKey") +@Fluent +public final class AccessKeyAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * The credentials property. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionAccessKey credentials; + + /** + * Creates an instance of AccessKeyAuthTypeWorkspaceConnectionProperties class. + */ + public AccessKeyAuthTypeWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: The credentials property. + * + * @return the credentials value. + */ + public WorkspaceConnectionAccessKey credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials property. + * + * @param credentials the credentials value to set. + * @return the AccessKeyAuthTypeWorkspaceConnectionProperties object itself. + */ + public AccessKeyAuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceConnectionAccessKey credentials) { + this.credentials = credentials; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccessKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() != null) { + credentials().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java new file mode 100644 index 0000000000000..3d8375fbdd014 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.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.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; + +/** + * An immutable client-side representation of AccountApiKeys. + */ +public interface AccountApiKeys { + /** + * Gets the key1 property: The key1 property. + * + * @return the key1 value. + */ + String key1(); + + /** + * Gets the key2 property: The key2 property. + * + * @return the key2 value. + */ + String key2(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner object. + * + * @return the inner object. + */ + AccountApiKeysInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java new file mode 100644 index 0000000000000..1ba94bbe3d7a3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,120 @@ +// Copyright (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; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * This connection type covers the account key connection for Azure storage. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("AccountKey") +@Fluent +public final class AccountKeyAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * The credentials property. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionSharedAccessSignature credentials; + + /** + * Creates an instance of AccountKeyAuthTypeWorkspaceConnectionProperties class. + */ + public AccountKeyAuthTypeWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: The credentials property. + * + * @return the credentials value. + */ + public WorkspaceConnectionSharedAccessSignature credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials property. + * + * @param credentials the credentials value to set. + * @return the AccountKeyAuthTypeWorkspaceConnectionProperties object itself. + */ + public AccountKeyAuthTypeWorkspaceConnectionProperties + withCredentials(WorkspaceConnectionSharedAccessSignature credentials) { + this.credentials = credentials; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountKeyAuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountKeyAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AccountKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() != null) { + credentials().validate(); + } + } +} 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..f8a1d55de52fc 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Account key datastore credentials configuration. */ +/** + * Account key datastore credentials configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") @JsonTypeName("AccountKey") @Fluent @@ -18,16 +20,18 @@ 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. */ + /** + * Creates an instance of AccountKeyDatastoreCredentials class. + */ public AccountKeyDatastoreCredentials() { } /** * Get the secrets property: [Required] Storage account secrets. - * + * * @return the secrets value. */ public AccountKeyDatastoreSecrets secrets() { @@ -36,7 +40,7 @@ public AccountKeyDatastoreSecrets secrets() { /** * Set the secrets property: [Required] Storage account secrets. - * + * * @param secrets the secrets value to set. * @return the AccountKeyDatastoreCredentials object itself. */ @@ -47,17 +51,15 @@ public AccountKeyDatastoreCredentials withSecrets(AccountKeyDatastoreSecrets sec /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (secrets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secrets in model AccountKeyDatastoreCredentials")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property secrets in model AccountKeyDatastoreCredentials")); } else { secrets().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java index 8f18b266e3a95..fd1c9f99b1885 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Datastore account key secrets. */ +/** + * Datastore account key secrets. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") @JsonTypeName("AccountKey") @Fluent @@ -21,13 +23,15 @@ public final class AccountKeyDatastoreSecrets extends DatastoreSecretsInner { @JsonProperty(value = "key") private String key; - /** Creates an instance of AccountKeyDatastoreSecrets class. */ + /** + * Creates an instance of AccountKeyDatastoreSecrets class. + */ public AccountKeyDatastoreSecrets() { } /** * Get the key property: Storage account key. - * + * * @return the key value. */ public String key() { @@ -36,7 +40,7 @@ public String key() { /** * Set the key property: Storage account key. - * + * * @param key the key value to set. * @return the AccountKeyDatastoreSecrets object itself. */ @@ -47,7 +51,7 @@ public AccountKeyDatastoreSecrets withKey(String key) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountModel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountModel.java new file mode 100644 index 0000000000000..e7f6381bbf67d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountModel.java @@ -0,0 +1,122 @@ +// Copyright (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.AccountModelInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of AccountModel. + */ +public interface AccountModel { + /** + * Gets the format property: Deployment model format. + * + * @return the format value. + */ + String format(); + + /** + * Gets the name property: Deployment model name. + * + * @return the name value. + */ + String name(); + + /** + * Gets the version property: Optional. Deployment model version. If version is not specified, a default version + * will be assigned. The default version is different for different models and might change when there is new + * version available for a model. Default version for a model could be found from list models API. + * + * @return the version value. + */ + String version(); + + /** + * Gets the source property: Optional. Deployment model source ARM resource ID. + * + * @return the source value. + */ + String source(); + + /** + * Gets the callRateLimit property: The call rate limit Cognitive Services account. + * + * @return the callRateLimit value. + */ + CallRateLimit callRateLimit(); + + /** + * Gets the baseModel property: Base Model Identifier. + * + * @return the baseModel value. + */ + DeploymentModel baseModel(); + + /** + * Gets the isDefaultVersion property: If the model is default version. + * + * @return the isDefaultVersion value. + */ + Boolean isDefaultVersion(); + + /** + * Gets the skus property: The list of Model Sku. + * + * @return the skus value. + */ + List skus(); + + /** + * Gets the maxCapacity property: The max capacity. + * + * @return the maxCapacity value. + */ + Integer maxCapacity(); + + /** + * Gets the capabilities property: The capabilities. + * + * @return the capabilities value. + */ + Map capabilities(); + + /** + * Gets the finetuneCapabilities property: The capabilities for finetune models. + * + * @return the finetuneCapabilities value. + */ + Map finetuneCapabilities(); + + /** + * Gets the deprecation property: Cognitive Services account ModelDeprecationInfo. + * + * @return the deprecation value. + */ + ModelDeprecationInfo deprecation(); + + /** + * Gets the lifecycleStatus property: Model lifecycle status. + * + * @return the lifecycleStatus value. + */ + ModelLifecycleStatus lifecycleStatus(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.AccountModelInner object. + * + * @return the inner object. + */ + AccountModelInner innerModel(); +} 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..db7a477ae6bc4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.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.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..b369896cb59d7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.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; + +/** + * 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/ActualCapacityInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.java new file mode 100644 index 0000000000000..f8ab565eb0fd9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ActualCapacityInfo model. + */ +@Fluent +public final class ActualCapacityInfo { + /* + * Gets or sets the total number of instances for the group. + */ + @JsonProperty(value = "allocated") + private Integer allocated; + + /* + * Gets or sets the number of instances which failed to successfully complete assignment. + */ + @JsonProperty(value = "assignmentFailed") + private Integer assignmentFailed; + + /* + * Gets or sets the number of instances which successfully completed assignment. + */ + @JsonProperty(value = "assignmentSuccess") + private Integer assignmentSuccess; + + /** + * Creates an instance of ActualCapacityInfo class. + */ + public ActualCapacityInfo() { + } + + /** + * Get the allocated property: Gets or sets the total number of instances for the group. + * + * @return the allocated value. + */ + public Integer allocated() { + return this.allocated; + } + + /** + * Set the allocated property: Gets or sets the total number of instances for the group. + * + * @param allocated the allocated value to set. + * @return the ActualCapacityInfo object itself. + */ + public ActualCapacityInfo withAllocated(Integer allocated) { + this.allocated = allocated; + return this; + } + + /** + * Get the assignmentFailed property: Gets or sets the number of instances which failed to successfully complete + * assignment. + * + * @return the assignmentFailed value. + */ + public Integer assignmentFailed() { + return this.assignmentFailed; + } + + /** + * Set the assignmentFailed property: Gets or sets the number of instances which failed to successfully complete + * assignment. + * + * @param assignmentFailed the assignmentFailed value to set. + * @return the ActualCapacityInfo object itself. + */ + public ActualCapacityInfo withAssignmentFailed(Integer assignmentFailed) { + this.assignmentFailed = assignmentFailed; + return this; + } + + /** + * Get the assignmentSuccess property: Gets or sets the number of instances which successfully completed + * assignment. + * + * @return the assignmentSuccess value. + */ + public Integer assignmentSuccess() { + return this.assignmentSuccess; + } + + /** + * Set the assignmentSuccess property: Gets or sets the number of instances which successfully completed + * assignment. + * + * @param assignmentSuccess the assignmentSuccess value to set. + * @return the ActualCapacityInfo object itself. + */ + public ActualCapacityInfo withAssignmentSuccess(Integer assignmentSuccess) { + this.assignmentSuccess = assignmentSuccess; + 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/Aks.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java index e1f8238bd92c1..95713380f5767 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A Machine Learning compute based on AKS. */ +/** + * A Machine Learning compute based on AKS. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("AKS") @Fluent @@ -20,13 +22,15 @@ public final class Aks extends Compute { @JsonProperty(value = "properties") private AksSchemaProperties properties; - /** Creates an instance of Aks class. */ + /** + * Creates an instance of Aks class. + */ public Aks() { } /** * Get the properties property: AKS properties. - * + * * @return the properties value. */ public AksSchemaProperties properties() { @@ -35,7 +39,7 @@ public AksSchemaProperties properties() { /** * Set the properties property: AKS properties. - * + * * @param properties the properties value to set. * @return the Aks object itself. */ @@ -44,28 +48,36 @@ public Aks withProperties(AksSchemaProperties properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Aks withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Aks withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Aks withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Aks withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -74,7 +86,7 @@ public Aks withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java index 048c5141075ba..b14a3ea11c585 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Secrets related to a Machine Learning compute based on AKS. */ +/** + * Secrets related to a Machine Learning compute based on AKS. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("AKS") @Fluent @@ -33,14 +35,16 @@ public final class AksComputeSecrets extends ComputeSecretsInner { @JsonProperty(value = "imagePullSecretName") private String imagePullSecretName; - /** Creates an instance of AksComputeSecrets class. */ + /** + * Creates an instance of AksComputeSecrets class. + */ public AksComputeSecrets() { } /** * Get the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. - * + * * @return the userKubeConfig value. */ public String userKubeConfig() { @@ -50,7 +54,7 @@ public String userKubeConfig() { /** * Set the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. - * + * * @param userKubeConfig the userKubeConfig value to set. * @return the AksComputeSecrets object itself. */ @@ -62,7 +66,7 @@ public AksComputeSecrets withUserKubeConfig(String userKubeConfig) { /** * Get the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. - * + * * @return the adminKubeConfig value. */ public String adminKubeConfig() { @@ -72,7 +76,7 @@ public String adminKubeConfig() { /** * Set the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. - * + * * @param adminKubeConfig the adminKubeConfig value to set. * @return the AksComputeSecrets object itself. */ @@ -83,7 +87,7 @@ public AksComputeSecrets withAdminKubeConfig(String adminKubeConfig) { /** * Get the imagePullSecretName property: Image registry pull secret. - * + * * @return the imagePullSecretName value. */ public String imagePullSecretName() { @@ -92,7 +96,7 @@ public String imagePullSecretName() { /** * Set the imagePullSecretName property: Image registry pull secret. - * + * * @param imagePullSecretName the imagePullSecretName value to set. * @return the AksComputeSecrets object itself. */ @@ -103,7 +107,7 @@ public AksComputeSecrets withImagePullSecretName(String imagePullSecretName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java index caf711390f87d..d89643b43b114 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of AksComputeSecrets. */ +/** + * Properties of AksComputeSecrets. + */ @Fluent public class AksComputeSecretsProperties { /* @@ -28,14 +30,16 @@ public class AksComputeSecretsProperties { @JsonProperty(value = "imagePullSecretName") private String imagePullSecretName; - /** Creates an instance of AksComputeSecretsProperties class. */ + /** + * Creates an instance of AksComputeSecretsProperties class. + */ public AksComputeSecretsProperties() { } /** * Get the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. - * + * * @return the userKubeConfig value. */ public String userKubeConfig() { @@ -45,7 +49,7 @@ public String userKubeConfig() { /** * Set the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. - * + * * @param userKubeConfig the userKubeConfig value to set. * @return the AksComputeSecretsProperties object itself. */ @@ -57,7 +61,7 @@ public AksComputeSecretsProperties withUserKubeConfig(String userKubeConfig) { /** * Get the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. - * + * * @return the adminKubeConfig value. */ public String adminKubeConfig() { @@ -67,7 +71,7 @@ public String adminKubeConfig() { /** * Set the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. - * + * * @param adminKubeConfig the adminKubeConfig value to set. * @return the AksComputeSecretsProperties object itself. */ @@ -78,7 +82,7 @@ public AksComputeSecretsProperties withAdminKubeConfig(String adminKubeConfig) { /** * Get the imagePullSecretName property: Image registry pull secret. - * + * * @return the imagePullSecretName value. */ public String imagePullSecretName() { @@ -87,7 +91,7 @@ public String imagePullSecretName() { /** * Set the imagePullSecretName property: Image registry pull secret. - * + * * @param imagePullSecretName the imagePullSecretName value to set. * @return the AksComputeSecretsProperties object itself. */ @@ -98,7 +102,7 @@ public AksComputeSecretsProperties withImagePullSecretName(String imagePullSecre /** * 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/AksNetworkingConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java index a66653a00d7d9..00a61a611e65f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Advance configuration for AKS networking. */ +/** + * Advance configuration for AKS networking. + */ @Fluent public final class AksNetworkingConfiguration { /* @@ -37,13 +39,15 @@ public final class AksNetworkingConfiguration { @JsonProperty(value = "dockerBridgeCidr") private String dockerBridgeCidr; - /** Creates an instance of AksNetworkingConfiguration class. */ + /** + * Creates an instance of AksNetworkingConfiguration class. + */ public AksNetworkingConfiguration() { } /** * Get the subnetId property: Virtual network subnet resource ID the compute nodes belong to. - * + * * @return the subnetId value. */ public String subnetId() { @@ -52,7 +56,7 @@ public String subnetId() { /** * Set the subnetId property: Virtual network subnet resource ID the compute nodes belong to. - * + * * @param subnetId the subnetId value to set. * @return the AksNetworkingConfiguration object itself. */ @@ -64,7 +68,7 @@ public AksNetworkingConfiguration withSubnetId(String subnetId) { /** * Get the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not * overlap with any Subnet IP ranges. - * + * * @return the serviceCidr value. */ public String serviceCidr() { @@ -74,7 +78,7 @@ public String serviceCidr() { /** * Set the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not * overlap with any Subnet IP ranges. - * + * * @param serviceCidr the serviceCidr value to set. * @return the AksNetworkingConfiguration object itself. */ @@ -86,7 +90,7 @@ public AksNetworkingConfiguration withServiceCidr(String serviceCidr) { /** * Get the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the * Kubernetes service address range specified in serviceCidr. - * + * * @return the dnsServiceIp value. */ public String dnsServiceIp() { @@ -96,7 +100,7 @@ public String dnsServiceIp() { /** * Set the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the * Kubernetes service address range specified in serviceCidr. - * + * * @param dnsServiceIp the dnsServiceIp value to set. * @return the AksNetworkingConfiguration object itself. */ @@ -108,7 +112,7 @@ public AksNetworkingConfiguration withDnsServiceIp(String dnsServiceIp) { /** * Get the dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not * overlap with any Subnet IP ranges or the Kubernetes service address range. - * + * * @return the dockerBridgeCidr value. */ public String dockerBridgeCidr() { @@ -118,7 +122,7 @@ public String dockerBridgeCidr() { /** * Set the dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not * overlap with any Subnet IP ranges or the Kubernetes service address range. - * + * * @param dockerBridgeCidr the dockerBridgeCidr value to set. * @return the AksNetworkingConfiguration object itself. */ @@ -129,7 +133,7 @@ public AksNetworkingConfiguration withDockerBridgeCidr(String dockerBridgeCidr) /** * 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/AksSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java index 892c30daeece9..4611313efeea9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The AksSchema model. */ +/** + * The AksSchema model. + */ @Fluent public class AksSchema { /* @@ -16,13 +18,15 @@ public class AksSchema { @JsonProperty(value = "properties") private AksSchemaProperties properties; - /** Creates an instance of AksSchema class. */ + /** + * Creates an instance of AksSchema class. + */ public AksSchema() { } /** * Get the properties property: AKS properties. - * + * * @return the properties value. */ public AksSchemaProperties properties() { @@ -31,7 +35,7 @@ public AksSchemaProperties properties() { /** * Set the properties property: AKS properties. - * + * * @param properties the properties value to set. * @return the AksSchema object itself. */ @@ -42,7 +46,7 @@ public AksSchema withProperties(AksSchemaProperties properties) { /** * 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/AksSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java index abef14024d16d..dd8536999fab1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** AKS properties. */ +/** + * AKS properties. + */ @Fluent public final class AksSchemaProperties { /* @@ -65,13 +67,15 @@ public final class AksSchemaProperties { @JsonProperty(value = "loadBalancerSubnet") private String loadBalancerSubnet; - /** Creates an instance of AksSchemaProperties class. */ + /** + * Creates an instance of AksSchemaProperties class. + */ public AksSchemaProperties() { } /** * Get the clusterFqdn property: Cluster full qualified domain name. - * + * * @return the clusterFqdn value. */ public String clusterFqdn() { @@ -80,7 +84,7 @@ public String clusterFqdn() { /** * Set the clusterFqdn property: Cluster full qualified domain name. - * + * * @param clusterFqdn the clusterFqdn value to set. * @return the AksSchemaProperties object itself. */ @@ -91,7 +95,7 @@ public AksSchemaProperties withClusterFqdn(String clusterFqdn) { /** * Get the systemServices property: System services. - * + * * @return the systemServices value. */ public List systemServices() { @@ -100,7 +104,7 @@ public List systemServices() { /** * Get the agentCount property: Number of agents. - * + * * @return the agentCount value. */ public Integer agentCount() { @@ -109,7 +113,7 @@ public Integer agentCount() { /** * Set the agentCount property: Number of agents. - * + * * @param agentCount the agentCount value to set. * @return the AksSchemaProperties object itself. */ @@ -120,7 +124,7 @@ public AksSchemaProperties withAgentCount(Integer agentCount) { /** * Get the agentVmSize property: Agent virtual machine size. - * + * * @return the agentVmSize value. */ public String agentVmSize() { @@ -129,7 +133,7 @@ public String agentVmSize() { /** * Set the agentVmSize property: Agent virtual machine size. - * + * * @param agentVmSize the agentVmSize value to set. * @return the AksSchemaProperties object itself. */ @@ -140,7 +144,7 @@ public AksSchemaProperties withAgentVmSize(String agentVmSize) { /** * Get the clusterPurpose property: Intended usage of the cluster. - * + * * @return the clusterPurpose value. */ public ClusterPurpose clusterPurpose() { @@ -149,7 +153,7 @@ public ClusterPurpose clusterPurpose() { /** * Set the clusterPurpose property: Intended usage of the cluster. - * + * * @param clusterPurpose the clusterPurpose value to set. * @return the AksSchemaProperties object itself. */ @@ -160,7 +164,7 @@ public AksSchemaProperties withClusterPurpose(ClusterPurpose clusterPurpose) { /** * Get the sslConfiguration property: SSL configuration. - * + * * @return the sslConfiguration value. */ public SslConfiguration sslConfiguration() { @@ -169,7 +173,7 @@ public SslConfiguration sslConfiguration() { /** * Set the sslConfiguration property: SSL configuration. - * + * * @param sslConfiguration the sslConfiguration value to set. * @return the AksSchemaProperties object itself. */ @@ -180,7 +184,7 @@ public AksSchemaProperties withSslConfiguration(SslConfiguration sslConfiguratio /** * Get the aksNetworkingConfiguration property: AKS networking configuration for vnet. - * + * * @return the aksNetworkingConfiguration value. */ public AksNetworkingConfiguration aksNetworkingConfiguration() { @@ -189,7 +193,7 @@ public AksNetworkingConfiguration aksNetworkingConfiguration() { /** * Set the aksNetworkingConfiguration property: AKS networking configuration for vnet. - * + * * @param aksNetworkingConfiguration the aksNetworkingConfiguration value to set. * @return the AksSchemaProperties object itself. */ @@ -200,7 +204,7 @@ public AksSchemaProperties withAksNetworkingConfiguration(AksNetworkingConfigura /** * Get the loadBalancerType property: Load Balancer Type. - * + * * @return the loadBalancerType value. */ public LoadBalancerType loadBalancerType() { @@ -209,7 +213,7 @@ public LoadBalancerType loadBalancerType() { /** * Set the loadBalancerType property: Load Balancer Type. - * + * * @param loadBalancerType the loadBalancerType value to set. * @return the AksSchemaProperties object itself. */ @@ -220,7 +224,7 @@ public AksSchemaProperties withLoadBalancerType(LoadBalancerType loadBalancerTyp /** * Get the loadBalancerSubnet property: Load Balancer Subnet. - * + * * @return the loadBalancerSubnet value. */ public String loadBalancerSubnet() { @@ -229,7 +233,7 @@ public String loadBalancerSubnet() { /** * Set the loadBalancerSubnet property: Load Balancer Subnet. - * + * * @param loadBalancerSubnet the loadBalancerSubnet value to set. * @return the AksSchemaProperties object itself. */ @@ -240,7 +244,7 @@ public AksSchemaProperties withLoadBalancerSubnet(String loadBalancerSubnet) { /** * 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/AllFeatures.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java new file mode 100644 index 0000000000000..e5178948221fe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.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.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..83f7780fcfae3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.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.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/AllocationState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java index d3450dd2ccfb9..e4bd28cce845e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java @@ -10,22 +10,26 @@ /** * Allocation state. - * - *

Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There - * are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is - * created and when no operations are being performed on the compute to change the number of compute nodes. resizing - - * Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. + * + * Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are + * no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created + * and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates + * that the compute is resizing; that is, compute nodes are being added to or removed from the compute. */ public final class AllocationState extends ExpandableStringEnum { - /** Static value Steady for AllocationState. */ + /** + * Static value Steady for AllocationState. + */ public static final AllocationState STEADY = fromString("Steady"); - /** Static value Resizing for AllocationState. */ + /** + * Static value Resizing for AllocationState. + */ public static final AllocationState RESIZING = fromString("Resizing"); /** * Creates a new instance of AllocationState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +38,7 @@ public AllocationState() { /** * Creates or finds a AllocationState from its string representation. - * + * * @param name a name to look for. * @return the corresponding AllocationState. */ @@ -45,7 +49,7 @@ public static AllocationState fromString(String name) { /** * Gets known AllocationState values. - * + * * @return known AllocationState values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java index e066172a41ae2..1f66713cbb037 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** An Azure Machine Learning compute. */ +/** + * An Azure Machine Learning compute. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("AmlCompute") @Fluent @@ -20,13 +22,15 @@ public final class AmlCompute extends Compute { @JsonProperty(value = "properties") private AmlComputeProperties properties; - /** Creates an instance of AmlCompute class. */ + /** + * Creates an instance of AmlCompute class. + */ public AmlCompute() { } /** * Get the properties property: Properties of AmlCompute. - * + * * @return the properties value. */ public AmlComputeProperties properties() { @@ -35,7 +39,7 @@ public AmlComputeProperties properties() { /** * Set the properties property: Properties of AmlCompute. - * + * * @param properties the properties value to set. * @return the AmlCompute object itself. */ @@ -44,28 +48,36 @@ public AmlCompute withProperties(AmlComputeProperties properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmlCompute withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmlCompute withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmlCompute withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AmlCompute withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -74,7 +86,7 @@ public AmlCompute withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java index fb5d1b5c24bb8..f91440d272cdd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java @@ -7,12 +7,14 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Compute node information related to a AmlCompute. */ +/** + * Compute node information related to a AmlCompute. + */ @Immutable public final class AmlComputeNodeInformation { /* * Node ID. - * + * * ID of the compute node. */ @JsonProperty(value = "nodeId", access = JsonProperty.Access.WRITE_ONLY) @@ -20,7 +22,7 @@ public final class AmlComputeNodeInformation { /* * Private IP address. - * + * * Private IP address of the compute node. */ @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY) @@ -28,7 +30,7 @@ public final class AmlComputeNodeInformation { /* * Public IP address. - * + * * Public IP address of the compute node. */ @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) @@ -36,7 +38,7 @@ public final class AmlComputeNodeInformation { /* * Port. - * + * * SSH port number of the node. */ @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) @@ -50,21 +52,23 @@ public final class AmlComputeNodeInformation { /* * Run ID. - * + * * ID of the Experiment running on the node, if any else null. */ @JsonProperty(value = "runId", access = JsonProperty.Access.WRITE_ONLY) private String runId; - /** Creates an instance of AmlComputeNodeInformation class. */ + /** + * Creates an instance of AmlComputeNodeInformation class. + */ public AmlComputeNodeInformation() { } /** * Get the nodeId property: Node ID. - * - *

ID of the compute node. - * + * + * ID of the compute node. + * * @return the nodeId value. */ public String nodeId() { @@ -73,9 +77,9 @@ public String nodeId() { /** * Get the privateIpAddress property: Private IP address. - * - *

Private IP address of the compute node. - * + * + * Private IP address of the compute node. + * * @return the privateIpAddress value. */ public String privateIpAddress() { @@ -84,9 +88,9 @@ public String privateIpAddress() { /** * Get the publicIpAddress property: Public IP address. - * - *

Public IP address of the compute node. - * + * + * Public IP address of the compute node. + * * @return the publicIpAddress value. */ public String publicIpAddress() { @@ -95,9 +99,9 @@ public String publicIpAddress() { /** * Get the port property: Port. - * - *

SSH port number of the node. - * + * + * SSH port number of the node. + * * @return the port value. */ public Integer port() { @@ -105,9 +109,9 @@ public Integer port() { } /** - * Get the nodeState property: State of the compute node. Values are idle, running, preparing, unusable, leaving and - * preempted. - * + * Get the nodeState property: State of the compute node. Values are idle, running, preparing, unusable, leaving + * and preempted. + * * @return the nodeState value. */ public NodeState nodeState() { @@ -116,9 +120,9 @@ public NodeState nodeState() { /** * Get the runId property: Run ID. - * - *

ID of the Experiment running on the node, if any else null. - * + * + * ID of the Experiment running on the node, if any else null. + * * @return the runId value. */ public String runId() { @@ -127,7 +131,7 @@ public String runId() { /** * 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/AmlComputeNodesInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java index 66e875ffc3cbe..bd7ef5a70736b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Result of AmlCompute Nodes. */ +/** + * Result of AmlCompute Nodes. + */ @Immutable public final class AmlComputeNodesInformation { /* @@ -23,13 +25,15 @@ public final class AmlComputeNodesInformation { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AmlComputeNodesInformation class. */ + /** + * Creates an instance of AmlComputeNodesInformation class. + */ public AmlComputeNodesInformation() { } /** * Get the nodes property: The collection of returned AmlCompute nodes details. - * + * * @return the nodes value. */ public List nodes() { @@ -38,7 +42,7 @@ public List nodes() { /** * Get the nextLink property: The continuation token. - * + * * @return the nextLink value. */ public String nextLink() { @@ -47,7 +51,7 @@ public String nextLink() { /** * 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/AmlComputeProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java index 7168c72acc8d3..da09e1bd7009e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java @@ -10,7 +10,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** AML Compute properties. */ +/** + * AML Compute properties. + */ @Fluent public final class AmlComputeProperties { /* @@ -63,7 +65,7 @@ public final class AmlComputeProperties { /* * Close remote Login Access Port - * + * * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on * all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. * NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else @@ -75,7 +77,7 @@ public final class AmlComputeProperties { /* * Allocation state. - * + * * Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There * are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is * created and when no operations are being performed on the compute to change the number of compute nodes. @@ -87,7 +89,7 @@ public final class AmlComputeProperties { /* * Allocation state transition time. - * + * * The time at which the compute entered its current allocation state. */ @JsonProperty(value = "allocationStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) @@ -95,7 +97,7 @@ public final class AmlComputeProperties { /* * Errors. - * + * * Collection of errors encountered by various compute nodes during node setup. */ @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) @@ -103,7 +105,7 @@ public final class AmlComputeProperties { /* * Current node count. - * + * * The number of compute nodes currently assigned to the compute. */ @JsonProperty(value = "currentNodeCount", access = JsonProperty.Access.WRITE_ONLY) @@ -111,7 +113,7 @@ public final class AmlComputeProperties { /* * Target node count. - * + * * The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes * the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes * the target node count for the previous resize operation. @@ -127,7 +129,7 @@ public final class AmlComputeProperties { /* * Enable node public IP. - * + * * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - * Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will * have a private endpoint and no public IPs. @@ -141,13 +143,15 @@ public final class AmlComputeProperties { @JsonProperty(value = "propertyBag") private Object propertyBag; - /** Creates an instance of AmlComputeProperties class. */ + /** + * Creates an instance of AmlComputeProperties class. + */ public AmlComputeProperties() { } /** * Get the osType property: Compute OS Type. - * + * * @return the osType value. */ public OsType osType() { @@ -156,7 +160,7 @@ public OsType osType() { /** * Set the osType property: Compute OS Type. - * + * * @param osType the osType value to set. * @return the AmlComputeProperties object itself. */ @@ -167,7 +171,7 @@ public AmlComputeProperties withOsType(OsType osType) { /** * Get the vmSize property: Virtual Machine Size. - * + * * @return the vmSize value. */ public String vmSize() { @@ -176,7 +180,7 @@ public String vmSize() { /** * Set the vmSize property: Virtual Machine Size. - * + * * @param vmSize the vmSize value to set. * @return the AmlComputeProperties object itself. */ @@ -187,7 +191,7 @@ public AmlComputeProperties withVmSize(String vmSize) { /** * Get the vmPriority property: Virtual Machine priority. - * + * * @return the vmPriority value. */ public VmPriority vmPriority() { @@ -196,7 +200,7 @@ public VmPriority vmPriority() { /** * Set the vmPriority property: Virtual Machine priority. - * + * * @param vmPriority the vmPriority value to set. * @return the AmlComputeProperties object itself. */ @@ -207,7 +211,7 @@ public AmlComputeProperties withVmPriority(VmPriority vmPriority) { /** * Get the virtualMachineImage property: Virtual Machine image for AML Compute - windows only. - * + * * @return the virtualMachineImage value. */ public VirtualMachineImage virtualMachineImage() { @@ -216,7 +220,7 @@ public VirtualMachineImage virtualMachineImage() { /** * Set the virtualMachineImage property: Virtual Machine image for AML Compute - windows only. - * + * * @param virtualMachineImage the virtualMachineImage value to set. * @return the AmlComputeProperties object itself. */ @@ -227,7 +231,7 @@ public AmlComputeProperties withVirtualMachineImage(VirtualMachineImage virtualM /** * Get the isolatedNetwork property: Network is isolated or not. - * + * * @return the isolatedNetwork value. */ public Boolean isolatedNetwork() { @@ -236,7 +240,7 @@ public Boolean isolatedNetwork() { /** * Set the isolatedNetwork property: Network is isolated or not. - * + * * @param isolatedNetwork the isolatedNetwork value to set. * @return the AmlComputeProperties object itself. */ @@ -247,7 +251,7 @@ public AmlComputeProperties withIsolatedNetwork(Boolean isolatedNetwork) { /** * Get the scaleSettings property: Scale settings for AML Compute. - * + * * @return the scaleSettings value. */ public ScaleSettings scaleSettings() { @@ -256,7 +260,7 @@ public ScaleSettings scaleSettings() { /** * Set the scaleSettings property: Scale settings for AML Compute. - * + * * @param scaleSettings the scaleSettings value to set. * @return the AmlComputeProperties object itself. */ @@ -268,7 +272,7 @@ public AmlComputeProperties withScaleSettings(ScaleSettings scaleSettings) { /** * Get the userAccountCredentials property: Credentials for an administrator user account that will be created on * each compute node. - * + * * @return the userAccountCredentials value. */ public UserAccountCredentials userAccountCredentials() { @@ -278,7 +282,7 @@ public UserAccountCredentials userAccountCredentials() { /** * Set the userAccountCredentials property: Credentials for an administrator user account that will be created on * each compute node. - * + * * @param userAccountCredentials the userAccountCredentials value to set. * @return the AmlComputeProperties object itself. */ @@ -289,7 +293,7 @@ public AmlComputeProperties withUserAccountCredentials(UserAccountCredentials us /** * Get the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * + * * @return the subnet value. */ public ResourceId subnet() { @@ -298,7 +302,7 @@ public ResourceId subnet() { /** * Set the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * + * * @param subnet the subnet value to set. * @return the AmlComputeProperties object itself. */ @@ -309,13 +313,13 @@ public AmlComputeProperties withSubnet(ResourceId subnet) { /** * Get the remoteLoginPortPublicAccess property: Close remote Login Access Port - * - *

State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on + * + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on * all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. * NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else * is open all public nodes. It can be default only during cluster creation time, after creation it will be either * enabled or disabled. - * + * * @return the remoteLoginPortPublicAccess value. */ public RemoteLoginPortPublicAccess remoteLoginPortPublicAccess() { @@ -324,31 +328,31 @@ public RemoteLoginPortPublicAccess remoteLoginPortPublicAccess() { /** * Set the remoteLoginPortPublicAccess property: Close remote Login Access Port - * - *

State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on + * + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on * all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. * NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else * is open all public nodes. It can be default only during cluster creation time, after creation it will be either * enabled or disabled. - * + * * @param remoteLoginPortPublicAccess the remoteLoginPortPublicAccess value to set. * @return the AmlComputeProperties object itself. */ - public AmlComputeProperties withRemoteLoginPortPublicAccess( - RemoteLoginPortPublicAccess remoteLoginPortPublicAccess) { + public AmlComputeProperties + withRemoteLoginPortPublicAccess(RemoteLoginPortPublicAccess remoteLoginPortPublicAccess) { this.remoteLoginPortPublicAccess = remoteLoginPortPublicAccess; return this; } /** * Get the allocationState property: Allocation state. - * - *

Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. - * There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when - * it is created and when no operations are being performed on the compute to change the number of compute nodes. + * + * Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There + * are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is + * created and when no operations are being performed on the compute to change the number of compute nodes. * resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the * compute. - * + * * @return the allocationState value. */ public AllocationState allocationState() { @@ -357,9 +361,9 @@ public AllocationState allocationState() { /** * Get the allocationStateTransitionTime property: Allocation state transition time. - * - *

The time at which the compute entered its current allocation state. - * + * + * The time at which the compute entered its current allocation state. + * * @return the allocationStateTransitionTime value. */ public OffsetDateTime allocationStateTransitionTime() { @@ -368,9 +372,9 @@ public OffsetDateTime allocationStateTransitionTime() { /** * Get the errors property: Errors. - * - *

Collection of errors encountered by various compute nodes during node setup. - * + * + * Collection of errors encountered by various compute nodes during node setup. + * * @return the errors value. */ public List errors() { @@ -379,9 +383,9 @@ public List errors() { /** * Get the currentNodeCount property: Current node count. - * - *

The number of compute nodes currently assigned to the compute. - * + * + * The number of compute nodes currently assigned to the compute. + * * @return the currentNodeCount value. */ public Integer currentNodeCount() { @@ -390,11 +394,11 @@ public Integer currentNodeCount() { /** * Get the targetNodeCount property: Target node count. - * - *

The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes + * + * The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes * the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes * the target node count for the previous resize operation. - * + * * @return the targetNodeCount value. */ public Integer targetNodeCount() { @@ -403,7 +407,7 @@ public Integer targetNodeCount() { /** * Get the nodeStateCounts property: Counts of various node states on the compute. - * + * * @return the nodeStateCounts value. */ public NodeStateCounts nodeStateCounts() { @@ -412,11 +416,11 @@ public NodeStateCounts nodeStateCounts() { /** * Get the enableNodePublicIp property: Enable node public IP. - * - *

Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - + * + * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - * Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will * have a private endpoint and no public IPs. - * + * * @return the enableNodePublicIp value. */ public Boolean enableNodePublicIp() { @@ -425,11 +429,11 @@ public Boolean enableNodePublicIp() { /** * Set the enableNodePublicIp property: Enable node public IP. - * - *

Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - + * + * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - * Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will * have a private endpoint and no public IPs. - * + * * @param enableNodePublicIp the enableNodePublicIp value to set. * @return the AmlComputeProperties object itself. */ @@ -440,7 +444,7 @@ public AmlComputeProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { /** * Get the propertyBag property: A property bag containing additional properties. - * + * * @return the propertyBag value. */ public Object propertyBag() { @@ -449,7 +453,7 @@ public Object propertyBag() { /** * Set the propertyBag property: A property bag containing additional properties. - * + * * @param propertyBag the propertyBag value to set. * @return the AmlComputeProperties object itself. */ @@ -460,7 +464,7 @@ public AmlComputeProperties withPropertyBag(Object propertyBag) { /** * 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/AmlComputeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java index d1c4ec002badb..df824f22f793d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties(top level) of AmlCompute. */ +/** + * Properties(top level) of AmlCompute. + */ @Fluent public class AmlComputeSchema { /* @@ -16,13 +18,15 @@ public class AmlComputeSchema { @JsonProperty(value = "properties") private AmlComputeProperties properties; - /** Creates an instance of AmlComputeSchema class. */ + /** + * Creates an instance of AmlComputeSchema class. + */ public AmlComputeSchema() { } /** * Get the properties property: Properties of AmlCompute. - * + * * @return the properties value. */ public AmlComputeProperties properties() { @@ -31,7 +35,7 @@ public AmlComputeProperties properties() { /** * Set the properties property: Properties of AmlCompute. - * + * * @param properties the properties value to set. * @return the AmlComputeSchema object itself. */ @@ -42,7 +46,7 @@ public AmlComputeSchema withProperties(AmlComputeProperties properties) { /** * 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/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/AmlToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java index 03fbe387d4c74..149a6c9ff9a65 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** AML Token identity configuration. */ +/** + * AML Token identity configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "identityType") @JsonTypeName("AMLToken") @Immutable public final class AmlToken extends IdentityConfiguration { - /** Creates an instance of AmlToken class. */ + /** + * Creates an instance of AmlToken class. + */ public AmlToken() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..1e761da9dd472 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.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.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/AmlUserFeature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java index 8fa6accfeb214..e1d9a199d6989 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -/** An immutable client-side representation of AmlUserFeature. */ +/** + * An immutable client-side representation of AmlUserFeature. + */ public interface AmlUserFeature { /** * Gets the id property: Specifies the feature ID. - * + * * @return the id value. */ String id(); /** * Gets the displayName property: Specifies the feature name. - * + * * @return the displayName value. */ String displayName(); /** * Gets the description property: Describes the feature for user experience. - * + * * @return the description value. */ String description(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner object. - * + * * @return the inner object. */ AmlUserFeatureInner innerModel(); 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..6ff3aae2900cf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.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.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/ApiKeyAuthWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java new file mode 100644 index 0000000000000..8531c73393aed --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java @@ -0,0 +1,138 @@ +// Copyright (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; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * This connection type covers the generic ApiKey auth connection categories, for examples: + * AzureOpenAI: + * Category:= AzureOpenAI + * AuthType:= ApiKey (as type discriminator) + * Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + * Target:= {ApiBase} + * + * CognitiveService: + * Category:= CognitiveService + * AuthType:= ApiKey (as type discriminator) + * Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + * Target:= ServiceRegion={serviceRegion} + * + * CognitiveSearch: + * Category:= CognitiveSearch + * AuthType:= ApiKey (as type discriminator) + * Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + * Target:= {Endpoint} + * + * Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("ApiKey") +@Fluent +public final class ApiKeyAuthWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * Api key object for workspace connection credential. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionApiKey credentials; + + /** + * Creates an instance of ApiKeyAuthWorkspaceConnectionProperties class. + */ + public ApiKeyAuthWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: Api key object for workspace connection credential. + * + * @return the credentials value. + */ + public WorkspaceConnectionApiKey credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Api key object for workspace connection credential. + * + * @param credentials the credentials value to set. + * @return the ApiKeyAuthWorkspaceConnectionProperties object itself. + */ + public ApiKeyAuthWorkspaceConnectionProperties withCredentials(WorkspaceConnectionApiKey credentials) { + this.credentials = credentials; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ApiKeyAuthWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ApiKeyAuthWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ApiKeyAuthWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ApiKeyAuthWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ApiKeyAuthWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ApiKeyAuthWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() != null) { + credentials().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java index a653e0e150962..a9dc373fc58cd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java @@ -10,21 +10,25 @@ /** * Sharing policy for applications on this compute instance - * - *

Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the + * + * Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the * creator can access applications on this compute instance. When Shared, any workspace user can access applications on * this instance depending on his/her assigned role. */ public final class ApplicationSharingPolicy extends ExpandableStringEnum { - /** Static value Personal for ApplicationSharingPolicy. */ + /** + * Static value Personal for ApplicationSharingPolicy. + */ public static final ApplicationSharingPolicy PERSONAL = fromString("Personal"); - /** Static value Shared for ApplicationSharingPolicy. */ + /** + * Static value Shared for ApplicationSharingPolicy. + */ public static final ApplicationSharingPolicy SHARED = fromString("Shared"); /** * Creates a new instance of ApplicationSharingPolicy value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +37,7 @@ public ApplicationSharingPolicy() { /** * Creates or finds a ApplicationSharingPolicy from its string representation. - * + * * @param name a name to look for. * @return the corresponding ApplicationSharingPolicy. */ @@ -44,7 +48,7 @@ public static ApplicationSharingPolicy fromString(String name) { /** * Gets known ApplicationSharingPolicy values. - * + * * @return known ApplicationSharingPolicy values. */ public static Collection values() { 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..564fff54d4ec1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/AssetBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java index 603e689cf5fa1..79a9feb7e9b82 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java @@ -8,28 +8,61 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The AssetBase model. */ +/** + * The AssetBase model. + */ @Fluent public class AssetBase extends ResourceBase { /* - * If the name version are system generated (anonymous registration). + * Specifies the lifecycle setting of managed data asset. + */ + @JsonProperty(value = "autoDeleteSetting") + private AutoDeleteSetting autoDeleteSetting; + + /* + * If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage + * is provided it will be used to populate IsAnonymous */ @JsonProperty(value = "isAnonymous") private Boolean isAnonymous; /* - * Is the asset archived? + * Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate + * IsArchived */ @JsonProperty(value = "isArchived") private Boolean isArchived; - /** Creates an instance of AssetBase class. */ + /** + * Creates an instance of AssetBase class. + */ public AssetBase() { } /** - * Get the isAnonymous property: If the name version are system generated (anonymous registration). - * + * Get the autoDeleteSetting property: Specifies the lifecycle setting of managed data asset. + * + * @return the autoDeleteSetting value. + */ + public AutoDeleteSetting autoDeleteSetting() { + return this.autoDeleteSetting; + } + + /** + * Set the autoDeleteSetting property: Specifies the lifecycle setting of managed data asset. + * + * @param autoDeleteSetting the autoDeleteSetting value to set. + * @return the AssetBase object itself. + */ + public AssetBase withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + this.autoDeleteSetting = autoDeleteSetting; + return this; + } + + /** + * Get the isAnonymous property: If the name version are system generated (anonymous registration). For types where + * Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + * * @return the isAnonymous value. */ public Boolean isAnonymous() { @@ -37,8 +70,9 @@ public Boolean isAnonymous() { } /** - * Set the isAnonymous property: If the name version are system generated (anonymous registration). - * + * Set the isAnonymous property: If the name version are system generated (anonymous registration). For types where + * Stage is defined, when Stage is provided it will be used to populate IsAnonymous. + * * @param isAnonymous the isAnonymous value to set. * @return the AssetBase object itself. */ @@ -48,8 +82,9 @@ public AssetBase withIsAnonymous(Boolean isAnonymous) { } /** - * Get the isArchived property: Is the asset archived?. - * + * Get the isArchived property: Is the asset archived? For types where Stage is defined, when Stage is provided it + * will be used to populate IsArchived. + * * @return the isArchived value. */ public Boolean isArchived() { @@ -57,8 +92,9 @@ public Boolean isArchived() { } /** - * Set the isArchived property: Is the asset archived?. - * + * Set the isArchived property: Is the asset archived? For types where Stage is defined, when Stage is provided it + * will be used to populate IsArchived. + * * @param isArchived the isArchived value to set. * @return the AssetBase object itself. */ @@ -67,21 +103,27 @@ public AssetBase withIsArchived(Boolean isArchived) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AssetBase withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AssetBase withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AssetBase withTags(Map tags) { super.withTags(tags); @@ -90,11 +132,14 @@ public AssetBase withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (autoDeleteSetting() != null) { + autoDeleteSetting().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java index 6c5d657f3ba67..a3adba85bfd5a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The AssetContainer model. */ +/** + * The AssetContainer model. + */ @Fluent public class AssetContainer extends ResourceBase { /* @@ -29,13 +31,15 @@ public class AssetContainer extends ResourceBase { @JsonProperty(value = "nextVersion", access = JsonProperty.Access.WRITE_ONLY) private String nextVersion; - /** Creates an instance of AssetContainer class. */ + /** + * Creates an instance of AssetContainer class. + */ public AssetContainer() { } /** * Get the isArchived property: Is the asset archived?. - * + * * @return the isArchived value. */ public Boolean isArchived() { @@ -44,7 +48,7 @@ public Boolean isArchived() { /** * Set the isArchived property: Is the asset archived?. - * + * * @param isArchived the isArchived value to set. * @return the AssetContainer object itself. */ @@ -55,7 +59,7 @@ public AssetContainer withIsArchived(Boolean isArchived) { /** * Get the latestVersion property: The latest version inside this container. - * + * * @return the latestVersion value. */ public String latestVersion() { @@ -64,28 +68,34 @@ public String latestVersion() { /** * Get the nextVersion property: The next auto incremental version. - * + * * @return the nextVersion value. */ public String nextVersion() { return this.nextVersion; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AssetContainer withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AssetContainer withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AssetContainer withTags(Map tags) { super.withTags(tags); @@ -94,7 +104,7 @@ public AssetContainer withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java index afeecb043691b..cd906901f8da0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Asset input type. */ +/** + * Asset input type. + */ @Fluent public class AssetJobInput { /* @@ -17,19 +19,27 @@ public class AssetJobInput { @JsonProperty(value = "mode") private InputDeliveryMode mode; + /* + * Input Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * [Required] Input Asset URI. */ @JsonProperty(value = "uri", required = true) private String uri; - /** Creates an instance of AssetJobInput class. */ + /** + * Creates an instance of AssetJobInput class. + */ public AssetJobInput() { } /** * Get the mode property: Input Asset Delivery Mode. - * + * * @return the mode value. */ public InputDeliveryMode mode() { @@ -38,7 +48,7 @@ public InputDeliveryMode mode() { /** * Set the mode property: Input Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the AssetJobInput object itself. */ @@ -47,9 +57,29 @@ public AssetJobInput withMode(InputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Input Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Input Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the AssetJobInput object itself. + */ + public AssetJobInput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: [Required] Input Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -58,7 +88,7 @@ public String uri() { /** * Set the uri property: [Required] Input Asset URI. - * + * * @param uri the uri value to set. * @return the AssetJobInput object itself. */ @@ -69,14 +99,13 @@ public AssetJobInput withUri(String uri) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (uri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model AssetJobInput")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property uri in model AssetJobInput")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java index e6c3f9463eab9..098ec4be44a44 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java @@ -7,28 +7,116 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Asset output type. */ +/** + * Asset output type. + */ @Fluent public class AssetJobOutput { + /* + * Output Asset Name. + */ + @JsonProperty(value = "assetName") + private String assetName; + + /* + * Output Asset Version. + */ + @JsonProperty(value = "assetVersion") + private String assetVersion; + + /* + * Auto delete setting of output data asset. + */ + @JsonProperty(value = "autoDeleteSetting") + private AutoDeleteSetting autoDeleteSetting; + /* * Output Asset Delivery Mode. */ @JsonProperty(value = "mode") private OutputDeliveryMode mode; + /* + * Output Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * Output Asset URI. */ @JsonProperty(value = "uri") private String uri; - /** Creates an instance of AssetJobOutput class. */ + /** + * Creates an instance of AssetJobOutput class. + */ public AssetJobOutput() { } + /** + * Get the assetName property: Output Asset Name. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Output Asset Name. + * + * @param assetName the assetName value to set. + * @return the AssetJobOutput object itself. + */ + public AssetJobOutput withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the assetVersion property: Output Asset Version. + * + * @return the assetVersion value. + */ + public String assetVersion() { + return this.assetVersion; + } + + /** + * Set the assetVersion property: Output Asset Version. + * + * @param assetVersion the assetVersion value to set. + * @return the AssetJobOutput object itself. + */ + public AssetJobOutput withAssetVersion(String assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @return the autoDeleteSetting value. + */ + public AutoDeleteSetting autoDeleteSetting() { + return this.autoDeleteSetting; + } + + /** + * Set the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @param autoDeleteSetting the autoDeleteSetting value to set. + * @return the AssetJobOutput object itself. + */ + public AssetJobOutput withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + this.autoDeleteSetting = autoDeleteSetting; + return this; + } + /** * Get the mode property: Output Asset Delivery Mode. - * + * * @return the mode value. */ public OutputDeliveryMode mode() { @@ -37,7 +125,7 @@ public OutputDeliveryMode mode() { /** * Set the mode property: Output Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the AssetJobOutput object itself. */ @@ -46,9 +134,29 @@ public AssetJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Output Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Output Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the AssetJobOutput object itself. + */ + public AssetJobOutput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: Output Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -57,7 +165,7 @@ public String uri() { /** * Set the uri property: Output Asset URI. - * + * * @param uri the uri value to set. * @return the AssetJobOutput object itself. */ @@ -68,9 +176,12 @@ public AssetJobOutput withUri(String uri) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (autoDeleteSetting() != null) { + autoDeleteSetting().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..124f0e540376c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java @@ -0,0 +1,73 @@ +// Copyright (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/AssetReferenceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java index e19aef73ced20..810138f88520c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base definition for asset references. */ +/** + * Base definition for asset references. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -17,19 +19,20 @@ defaultImpl = AssetReferenceBase.class) @JsonTypeName("AssetReferenceBase") @JsonSubTypes({ - @JsonSubTypes.Type(name = "DataPath", value = DataPathAssetReference.class), @JsonSubTypes.Type(name = "Id", value = IdAssetReference.class), - @JsonSubTypes.Type(name = "OutputPath", value = OutputPathAssetReference.class) -}) + @JsonSubTypes.Type(name = "DataPath", value = DataPathAssetReference.class), + @JsonSubTypes.Type(name = "OutputPath", value = OutputPathAssetReference.class) }) @Immutable public class AssetReferenceBase { - /** Creates an instance of AssetReferenceBase class. */ + /** + * Creates an instance of AssetReferenceBase class. + */ public AssetReferenceBase() { } /** * 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/AssignedUser.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java index 722668be41094..c8ae16fe52cf1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** A user that can be assigned to a compute instance. */ +/** + * A user that can be assigned to a compute instance. + */ @Fluent public final class AssignedUser { /* @@ -23,13 +25,15 @@ public final class AssignedUser { @JsonProperty(value = "tenantId", required = true) private String tenantId; - /** Creates an instance of AssignedUser class. */ + /** + * Creates an instance of AssignedUser class. + */ public AssignedUser() { } /** * Get the objectId property: User’s AAD Object Id. - * + * * @return the objectId value. */ public String objectId() { @@ -38,7 +42,7 @@ public String objectId() { /** * Set the objectId property: User’s AAD Object Id. - * + * * @param objectId the objectId value to set. * @return the AssignedUser object itself. */ @@ -49,7 +53,7 @@ public AssignedUser withObjectId(String objectId) { /** * Get the tenantId property: User’s AAD Tenant Id. - * + * * @return the tenantId value. */ public String tenantId() { @@ -58,7 +62,7 @@ public String tenantId() { /** * Set the tenantId property: User’s AAD Tenant Id. - * + * * @param tenantId the tenantId value to set. * @return the AssignedUser object itself. */ @@ -69,19 +73,17 @@ public AssignedUser withTenantId(String tenantId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (objectId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property objectId in model AssignedUser")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property objectId in model AssignedUser")); } if (tenantId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tenantId in model AssignedUser")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property tenantId in model AssignedUser")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.java new file mode 100644 index 0000000000000..08d1840dde00c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.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; + +/** + * Enum to determine endpoint authentication mode. + */ +public final class AuthMode extends ExpandableStringEnum { + /** + * Static value AAD for AuthMode. + */ + public static final AuthMode AAD = fromString("AAD"); + + /** + * Creates a new instance of AuthMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AuthMode() { + } + + /** + * Creates or finds a AuthMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AuthMode. + */ + @JsonCreator + public static AuthMode fromString(String name) { + return fromString(name, AuthMode.class); + } + + /** + * Gets known AuthMode values. + * + * @return known AuthMode values. + */ + public static Collection values() { + return values(AuthMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoDeleteCondition.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoDeleteCondition.java new file mode 100644 index 0000000000000..f98145576553b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoDeleteCondition.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 AutoDeleteCondition. + */ +public final class AutoDeleteCondition extends ExpandableStringEnum { + /** + * Static value CreatedGreaterThan for AutoDeleteCondition. + */ + public static final AutoDeleteCondition CREATED_GREATER_THAN = fromString("CreatedGreaterThan"); + + /** + * Static value LastAccessedGreaterThan for AutoDeleteCondition. + */ + public static final AutoDeleteCondition LAST_ACCESSED_GREATER_THAN = fromString("LastAccessedGreaterThan"); + + /** + * Creates a new instance of AutoDeleteCondition value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AutoDeleteCondition() { + } + + /** + * Creates or finds a AutoDeleteCondition from its string representation. + * + * @param name a name to look for. + * @return the corresponding AutoDeleteCondition. + */ + @JsonCreator + public static AutoDeleteCondition fromString(String name) { + return fromString(name, AutoDeleteCondition.class); + } + + /** + * Gets known AutoDeleteCondition values. + * + * @return known AutoDeleteCondition values. + */ + public static Collection values() { + return values(AutoDeleteCondition.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoDeleteSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoDeleteSetting.java new file mode 100644 index 0000000000000..aecc2c3028997 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoDeleteSetting.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The AutoDeleteSetting model. + */ +@Fluent +public final class AutoDeleteSetting { + /* + * When to check if an asset is expired + */ + @JsonProperty(value = "condition") + private AutoDeleteCondition condition; + + /* + * Expiration condition value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Creates an instance of AutoDeleteSetting class. + */ + public AutoDeleteSetting() { + } + + /** + * Get the condition property: When to check if an asset is expired. + * + * @return the condition value. + */ + public AutoDeleteCondition condition() { + return this.condition; + } + + /** + * Set the condition property: When to check if an asset is expired. + * + * @param condition the condition value to set. + * @return the AutoDeleteSetting object itself. + */ + public AutoDeleteSetting withCondition(AutoDeleteCondition condition) { + this.condition = condition; + return this; + } + + /** + * Get the value property: Expiration condition value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Expiration condition value. + * + * @param value the value value to set. + * @return the AutoDeleteSetting object itself. + */ + public AutoDeleteSetting withValue(String 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/AutoForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java index bafe88b21f84a..c216179c6a906 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Forecast horizon determined automatically by system. */ +/** + * Forecast horizon determined automatically by system. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Auto") @Immutable public final class AutoForecastHorizon extends ForecastHorizon { - /** Creates an instance of AutoForecastHorizon class. */ + /** + * Creates an instance of AutoForecastHorizon class. + */ public AutoForecastHorizon() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..d716bd6e31817 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 @@ -13,8 +13,9 @@ import java.util.Map; /** - * AutoMLJob class. Use this class for executing AutoML tasks like Classification/Regression etc. See TaskType enum for - * all the tasks supported. + * AutoMLJob class. + * Use this class for executing AutoML tasks like Classification/Regression etc. + * See TaskType enum for all the tasks supported. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") @JsonTypeName("AutoML") @@ -42,6 +43,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. */ @@ -54,15 +61,17 @@ public final class AutoMLJob extends JobBaseProperties { @JsonProperty(value = "taskDetails", required = true) private AutoMLVertical taskDetails; - /** Creates an instance of AutoMLJob class. */ + /** + * Creates an instance of AutoMLJob class. + */ public AutoMLJob() { } /** - * Get the environmentId property: The ARM resource ID of the Environment specification for the job. This is - * optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment - * version when running the job. - * + * Get the environmentId property: The ARM resource ID of the Environment specification for the job. + * This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated + * environment version when running the job. + * * @return the environmentId value. */ public String environmentId() { @@ -70,10 +79,10 @@ public String environmentId() { } /** - * Set the environmentId property: The ARM resource ID of the Environment specification for the job. This is - * optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment - * version when running the job. - * + * Set the environmentId property: The ARM resource ID of the Environment specification for the job. + * This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated + * environment version when running the job. + * * @param environmentId the environmentId value to set. * @return the AutoMLJob object itself. */ @@ -84,7 +93,7 @@ public AutoMLJob withEnvironmentId(String environmentId) { /** * Get the environmentVariables property: Environment variables included in the job. - * + * * @return the environmentVariables value. */ public Map environmentVariables() { @@ -93,7 +102,7 @@ public Map environmentVariables() { /** * Set the environmentVariables property: Environment variables included in the job. - * + * * @param environmentVariables the environmentVariables value to set. * @return the AutoMLJob object itself. */ @@ -104,7 +113,7 @@ public AutoMLJob withEnvironmentVariables(Map environmentVariabl /** * Get the outputs property: Mapping of output data bindings used in the job. - * + * * @return the outputs value. */ public Map outputs() { @@ -113,7 +122,7 @@ public Map outputs() { /** * Set the outputs property: Mapping of output data bindings used in the job. - * + * * @param outputs the outputs value to set. * @return the AutoMLJob object itself. */ @@ -122,9 +131,29 @@ 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. - * + * * @return the resources value. */ public JobResourceConfiguration resources() { @@ -133,7 +162,7 @@ public JobResourceConfiguration resources() { /** * Set the resources property: Compute Resource configuration for the job. - * + * * @param resources the resources value to set. * @return the AutoMLJob object itself. */ @@ -144,7 +173,7 @@ public AutoMLJob withResources(JobResourceConfiguration resources) { /** * Get the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. - * + * * @return the taskDetails value. */ public AutoMLVertical taskDetails() { @@ -153,7 +182,7 @@ public AutoMLVertical taskDetails() { /** * Set the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. - * + * * @param taskDetails the taskDetails value to set. * @return the AutoMLJob object itself. */ @@ -162,70 +191,108 @@ public AutoMLJob withTaskDetails(AutoMLVertical taskDetails) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutoMLJob withComponentId(String componentId) { super.withComponentId(componentId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutoMLJob withComputeId(String computeId) { super.withComputeId(computeId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutoMLJob withDisplayName(String displayName) { super.withDisplayName(displayName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutoMLJob withExperimentName(String experimentName) { super.withExperimentName(experimentName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutoMLJob withIdentity(IdentityConfiguration identity) { super.withIdentity(identity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutoMLJob withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public AutoMLJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutoMLJob withSecretsConfiguration(Map secretsConfiguration) { + super.withSecretsConfiguration(secretsConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ @Override public AutoMLJob withServices(Map services) { super.withServices(services); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutoMLJob withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutoMLJob withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AutoMLJob withTags(Map tags) { super.withTags(tags); @@ -234,29 +301,28 @@ public AutoMLJob withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (outputs() != null) { - outputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + outputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (queueSettings() != null) { + queueSettings().validate(); } if (resources() != null) { resources().validate(); } if (taskDetails() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property taskDetails in model AutoMLJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property taskDetails in model AutoMLJob")); } else { taskDetails().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java index 827fdba1ef48a..89ea089aec1a6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java @@ -11,7 +11,10 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** AutoML vertical class. Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical. */ +/** + * AutoML vertical class. + * Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -28,8 +31,7 @@ @JsonSubTypes.Type(name = "Regression", value = Regression.class), @JsonSubTypes.Type(name = "TextClassification", value = TextClassification.class), @JsonSubTypes.Type(name = "TextClassificationMultilabel", value = TextClassificationMultilabel.class), - @JsonSubTypes.Type(name = "TextNER", value = TextNer.class) -}) + @JsonSubTypes.Type(name = "TextNER", value = TextNer.class) }) @Fluent public class AutoMLVertical { /* @@ -51,13 +53,15 @@ public class AutoMLVertical { @JsonProperty(value = "trainingData", required = true) private MLTableJobInput trainingData; - /** Creates an instance of AutoMLVertical class. */ + /** + * Creates an instance of AutoMLVertical class. + */ public AutoMLVertical() { } /** * Get the logVerbosity property: Log verbosity for the job. - * + * * @return the logVerbosity value. */ public LogVerbosity logVerbosity() { @@ -66,7 +70,7 @@ public LogVerbosity logVerbosity() { /** * Set the logVerbosity property: Log verbosity for the job. - * + * * @param logVerbosity the logVerbosity value to set. * @return the AutoMLVertical object itself. */ @@ -76,9 +80,9 @@ public AutoMLVertical withLogVerbosity(LogVerbosity logVerbosity) { } /** - * Get the targetColumnName property: Target column name: This is prediction values column. Also known as label - * column name in context of classification tasks. - * + * Get the targetColumnName property: Target column name: This is prediction values column. + * Also known as label column name in context of classification tasks. + * * @return the targetColumnName value. */ public String targetColumnName() { @@ -86,9 +90,9 @@ public String targetColumnName() { } /** - * Set the targetColumnName property: Target column name: This is prediction values column. Also known as label - * column name in context of classification tasks. - * + * Set the targetColumnName property: Target column name: This is prediction values column. + * Also known as label column name in context of classification tasks. + * * @param targetColumnName the targetColumnName value to set. * @return the AutoMLVertical object itself. */ @@ -99,7 +103,7 @@ public AutoMLVertical withTargetColumnName(String targetColumnName) { /** * Get the trainingData property: [Required] Training data input. - * + * * @return the trainingData value. */ public MLTableJobInput trainingData() { @@ -108,7 +112,7 @@ public MLTableJobInput trainingData() { /** * Set the trainingData property: [Required] Training data input. - * + * * @param trainingData the trainingData value to set. * @return the AutoMLVertical object itself. */ @@ -119,14 +123,13 @@ public AutoMLVertical withTrainingData(MLTableJobInput trainingData) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (trainingData() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property trainingData in model AutoMLVertical")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property trainingData in model AutoMLVertical")); } else { trainingData().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java index 28b2d6e001514..5b77370473fb4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** N-Cross validations determined automatically. */ +/** + * N-Cross validations determined automatically. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Auto") @Immutable public final class AutoNCrossValidations extends NCrossValidations { - /** Creates an instance of AutoNCrossValidations class. */ + /** + * Creates an instance of AutoNCrossValidations class. + */ public AutoNCrossValidations() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java index 668bfa415df05..22807d78fbdd5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Auto pause properties. */ +/** + * Auto pause properties. + */ @Fluent public final class AutoPauseProperties { /* @@ -22,13 +24,15 @@ public final class AutoPauseProperties { @JsonProperty(value = "enabled") private Boolean enabled; - /** Creates an instance of AutoPauseProperties class. */ + /** + * Creates an instance of AutoPauseProperties class. + */ public AutoPauseProperties() { } /** * Get the delayInMinutes property: The delayInMinutes property. - * + * * @return the delayInMinutes value. */ public Integer delayInMinutes() { @@ -37,7 +41,7 @@ public Integer delayInMinutes() { /** * Set the delayInMinutes property: The delayInMinutes property. - * + * * @param delayInMinutes the delayInMinutes value to set. * @return the AutoPauseProperties object itself. */ @@ -48,7 +52,7 @@ public AutoPauseProperties withDelayInMinutes(Integer delayInMinutes) { /** * Get the enabled property: The enabled property. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -57,7 +61,7 @@ public Boolean enabled() { /** * Set the enabled property: The enabled property. - * + * * @param enabled the enabled value to set. * @return the AutoPauseProperties object itself. */ @@ -68,7 +72,7 @@ public AutoPauseProperties withEnabled(Boolean enabled) { /** * 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/AutoRebuildSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java index d22d8e77ba60f..e7e9ef9cd5b5b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** AutoRebuild setting for the derived image. */ +/** + * AutoRebuild setting for the derived image. + */ public final class AutoRebuildSetting extends ExpandableStringEnum { - /** Static value Disabled for AutoRebuildSetting. */ + /** + * Static value Disabled for AutoRebuildSetting. + */ public static final AutoRebuildSetting DISABLED = fromString("Disabled"); - /** Static value OnBaseImageUpdate for AutoRebuildSetting. */ + /** + * Static value OnBaseImageUpdate for AutoRebuildSetting. + */ public static final AutoRebuildSetting ON_BASE_IMAGE_UPDATE = fromString("OnBaseImageUpdate"); /** * Creates a new instance of AutoRebuildSetting value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AutoRebuildSetting() { /** * Creates or finds a AutoRebuildSetting from its string representation. - * + * * @param name a name to look for. * @return the corresponding AutoRebuildSetting. */ @@ -38,7 +44,7 @@ public static AutoRebuildSetting fromString(String name) { /** * Gets known AutoRebuildSetting values. - * + * * @return known AutoRebuildSetting values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java index 46ef9432e5a7c..1863bef23bfd5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Auto scale properties. */ +/** + * Auto scale properties. + */ @Fluent public final class AutoScaleProperties { /* @@ -28,13 +30,15 @@ public final class AutoScaleProperties { @JsonProperty(value = "maxNodeCount") private Integer maxNodeCount; - /** Creates an instance of AutoScaleProperties class. */ + /** + * Creates an instance of AutoScaleProperties class. + */ public AutoScaleProperties() { } /** * Get the minNodeCount property: The minNodeCount property. - * + * * @return the minNodeCount value. */ public Integer minNodeCount() { @@ -43,7 +47,7 @@ public Integer minNodeCount() { /** * Set the minNodeCount property: The minNodeCount property. - * + * * @param minNodeCount the minNodeCount value to set. * @return the AutoScaleProperties object itself. */ @@ -54,7 +58,7 @@ public AutoScaleProperties withMinNodeCount(Integer minNodeCount) { /** * Get the enabled property: The enabled property. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -63,7 +67,7 @@ public Boolean enabled() { /** * Set the enabled property: The enabled property. - * + * * @param enabled the enabled value to set. * @return the AutoScaleProperties object itself. */ @@ -74,7 +78,7 @@ public AutoScaleProperties withEnabled(Boolean enabled) { /** * Get the maxNodeCount property: The maxNodeCount property. - * + * * @return the maxNodeCount value. */ public Integer maxNodeCount() { @@ -83,7 +87,7 @@ public Integer maxNodeCount() { /** * Set the maxNodeCount property: The maxNodeCount property. - * + * * @param maxNodeCount the maxNodeCount value to set. * @return the AutoScaleProperties object itself. */ @@ -94,7 +98,7 @@ public AutoScaleProperties withMaxNodeCount(Integer maxNodeCount) { /** * 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/AutoSeasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java index 6b224b5c8fa5a..713ae1db855bb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The AutoSeasonality model. */ +/** + * The AutoSeasonality model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Auto") @Immutable public final class AutoSeasonality extends Seasonality { - /** Creates an instance of AutoSeasonality class. */ + /** + * Creates an instance of AutoSeasonality class. + */ public AutoSeasonality() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java index ac77cc101f2ef..32fa192f1039b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The AutoTargetLags model. */ +/** + * The AutoTargetLags model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Auto") @Immutable public final class AutoTargetLags extends TargetLags { - /** Creates an instance of AutoTargetLags class. */ + /** + * Creates an instance of AutoTargetLags class. + */ public AutoTargetLags() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java index b628ecb4c4c5c..af19095f7a68d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Target lags rolling window determined automatically. */ +/** + * Target lags rolling window determined automatically. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Auto") @Immutable public final class AutoTargetRollingWindowSize extends TargetRollingWindowSize { - /** Creates an instance of AutoTargetRollingWindowSize class. */ + /** + * Creates an instance of AutoTargetRollingWindowSize class. + */ public AutoTargetRollingWindowSize() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutologgerSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutologgerSettings.java new file mode 100644 index 0000000000000..faaf9a4418a3c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutologgerSettings.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings for Autologger. + */ +@Fluent +public final class AutologgerSettings { + /* + * [Required] Indicates whether mlflow autologger is enabled. + */ + @JsonProperty(value = "mlflowAutologger", required = true) + private MLFlowAutologgerState mlflowAutologger; + + /** + * Creates an instance of AutologgerSettings class. + */ + public AutologgerSettings() { + } + + /** + * Get the mlflowAutologger property: [Required] Indicates whether mlflow autologger is enabled. + * + * @return the mlflowAutologger value. + */ + public MLFlowAutologgerState mlflowAutologger() { + return this.mlflowAutologger; + } + + /** + * Set the mlflowAutologger property: [Required] Indicates whether mlflow autologger is enabled. + * + * @param mlflowAutologger the mlflowAutologger value to set. + * @return the AutologgerSettings object itself. + */ + public AutologgerSettings withMlflowAutologger(MLFlowAutologgerState mlflowAutologger) { + this.mlflowAutologger = mlflowAutologger; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (mlflowAutologger() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property mlflowAutologger in model AutologgerSettings")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AutologgerSettings.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java index 64daa7358c787..23fba5e72e251 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Auto save settings. */ +/** + * Auto save settings. + */ public final class Autosave extends ExpandableStringEnum { - /** Static value None for Autosave. */ + /** + * Static value None for Autosave. + */ public static final Autosave NONE = fromString("None"); - /** Static value Local for Autosave. */ + /** + * Static value Local for Autosave. + */ public static final Autosave LOCAL = fromString("Local"); - /** Static value Remote for Autosave. */ + /** + * Static value Remote for Autosave. + */ public static final Autosave REMOTE = fromString("Remote"); /** * Creates a new instance of Autosave value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public Autosave() { /** * Creates or finds a Autosave from its string representation. - * + * * @param name a name to look for. * @return the corresponding Autosave. */ @@ -41,7 +49,7 @@ public static Autosave fromString(String name) { /** * Gets known Autosave values. - * + * * @return known Autosave values. */ public static Collection values() { 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..f75853d26b82b 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Azure Blob datastore configuration. */ +/** + * Azure Blob datastore configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") @JsonTypeName("AzureBlob") @Fluent @@ -45,13 +47,27 @@ public final class AzureBlobDatastore extends DatastoreProperties { @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - /** Creates an instance of AzureBlobDatastore class. */ + /* + * 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() { } /** * Get the accountName property: Storage account name. - * + * * @return the accountName value. */ public String accountName() { @@ -60,7 +76,7 @@ public String accountName() { /** * Set the accountName property: Storage account name. - * + * * @param accountName the accountName value to set. * @return the AzureBlobDatastore object itself. */ @@ -71,7 +87,7 @@ public AzureBlobDatastore withAccountName(String accountName) { /** * Get the containerName property: Storage account container name. - * + * * @return the containerName value. */ public String containerName() { @@ -80,7 +96,7 @@ public String containerName() { /** * Set the containerName property: Storage account container name. - * + * * @param containerName the containerName value to set. * @return the AzureBlobDatastore object itself. */ @@ -91,7 +107,7 @@ public AzureBlobDatastore withContainerName(String containerName) { /** * Get the endpoint property: Azure cloud endpoint for the storage account. - * + * * @return the endpoint value. */ public String endpoint() { @@ -100,7 +116,7 @@ public String endpoint() { /** * Set the endpoint property: Azure cloud endpoint for the storage account. - * + * * @param endpoint the endpoint value to set. * @return the AzureBlobDatastore object itself. */ @@ -111,7 +127,7 @@ public AzureBlobDatastore withEndpoint(String endpoint) { /** * Get the protocol property: Protocol used to communicate with the storage account. - * + * * @return the protocol value. */ public String protocol() { @@ -120,7 +136,7 @@ public String protocol() { /** * Set the protocol property: Protocol used to communicate with the storage account. - * + * * @param protocol the protocol value to set. * @return the AzureBlobDatastore object itself. */ @@ -132,7 +148,7 @@ public AzureBlobDatastore withProtocol(String protocol) { /** * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. - * + * * @return the serviceDataAccessAuthIdentity value. */ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { @@ -142,38 +158,95 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { /** * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. - * + * * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. * @return the AzureBlobDatastore object itself. */ - public AzureBlobDatastore withServiceDataAccessAuthIdentity( - ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { + public AzureBlobDatastore + withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; return this; } - /** {@inheritDoc} */ + /** + * 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) { super.withCredentials(credentials); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public AzureBlobDatastore withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ @Override public AzureBlobDatastore withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBlobDatastore withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureBlobDatastore withTags(Map tags) { super.withTags(tags); @@ -182,7 +255,7 @@ public AzureBlobDatastore withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..ba26d6c0d8b84 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Azure Data Lake Gen1 datastore configuration. */ +/** + * Azure Data Lake Gen1 datastore configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") @JsonTypeName("AzureDataLakeGen1") @Fluent @@ -28,14 +30,28 @@ public final class AzureDataLakeGen1Datastore extends DatastoreProperties { @JsonProperty(value = "storeName", required = true) private String storeName; - /** Creates an instance of AzureDataLakeGen1Datastore class. */ + /* + * 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() { } /** * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. - * + * * @return the serviceDataAccessAuthIdentity value. */ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { @@ -45,19 +61,19 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { /** * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. - * + * * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. * @return the AzureDataLakeGen1Datastore object itself. */ - public AzureDataLakeGen1Datastore withServiceDataAccessAuthIdentity( - ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { + public AzureDataLakeGen1Datastore + withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; return this; } /** * Get the storeName property: [Required] Azure Data Lake store name. - * + * * @return the storeName value. */ public String storeName() { @@ -66,7 +82,7 @@ public String storeName() { /** * Set the storeName property: [Required] Azure Data Lake store name. - * + * * @param storeName the storeName value to set. * @return the AzureDataLakeGen1Datastore object itself. */ @@ -75,28 +91,85 @@ public AzureDataLakeGen1Datastore withStoreName(String storeName) { return this; } - /** {@inheritDoc} */ + /** + * 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) { super.withCredentials(credentials); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public AzureDataLakeGen1Datastore withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ @Override public AzureDataLakeGen1Datastore withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureDataLakeGen1Datastore withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureDataLakeGen1Datastore withTags(Map tags) { super.withTags(tags); @@ -105,17 +178,15 @@ public AzureDataLakeGen1Datastore withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (storeName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storeName in model AzureDataLakeGen1Datastore")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property storeName in model AzureDataLakeGen1Datastore")); } } 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..7b00e43a1595d 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Azure Data Lake Gen2 datastore configuration. */ +/** + * Azure Data Lake Gen2 datastore configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") @JsonTypeName("AzureDataLakeGen2") @Fluent @@ -46,13 +48,27 @@ public final class AzureDataLakeGen2Datastore extends DatastoreProperties { @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - /** Creates an instance of AzureDataLakeGen2Datastore class. */ + /* + * 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() { } /** * Get the accountName property: [Required] Storage account name. - * + * * @return the accountName value. */ public String accountName() { @@ -61,7 +77,7 @@ public String accountName() { /** * Set the accountName property: [Required] Storage account name. - * + * * @param accountName the accountName value to set. * @return the AzureDataLakeGen2Datastore object itself. */ @@ -72,7 +88,7 @@ public AzureDataLakeGen2Datastore withAccountName(String accountName) { /** * Get the endpoint property: Azure cloud endpoint for the storage account. - * + * * @return the endpoint value. */ public String endpoint() { @@ -81,7 +97,7 @@ public String endpoint() { /** * Set the endpoint property: Azure cloud endpoint for the storage account. - * + * * @param endpoint the endpoint value to set. * @return the AzureDataLakeGen2Datastore object itself. */ @@ -92,7 +108,7 @@ public AzureDataLakeGen2Datastore withEndpoint(String endpoint) { /** * Get the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. - * + * * @return the filesystem value. */ public String filesystem() { @@ -101,7 +117,7 @@ public String filesystem() { /** * Set the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. - * + * * @param filesystem the filesystem value to set. * @return the AzureDataLakeGen2Datastore object itself. */ @@ -112,7 +128,7 @@ public AzureDataLakeGen2Datastore withFilesystem(String filesystem) { /** * Get the protocol property: Protocol used to communicate with the storage account. - * + * * @return the protocol value. */ public String protocol() { @@ -121,7 +137,7 @@ public String protocol() { /** * Set the protocol property: Protocol used to communicate with the storage account. - * + * * @param protocol the protocol value to set. * @return the AzureDataLakeGen2Datastore object itself. */ @@ -133,7 +149,7 @@ public AzureDataLakeGen2Datastore withProtocol(String protocol) { /** * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. - * + * * @return the serviceDataAccessAuthIdentity value. */ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { @@ -143,38 +159,95 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { /** * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. - * + * * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. * @return the AzureDataLakeGen2Datastore object itself. */ - public AzureDataLakeGen2Datastore withServiceDataAccessAuthIdentity( - ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { + public AzureDataLakeGen2Datastore + withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; return this; } - /** {@inheritDoc} */ + /** + * 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) { super.withCredentials(credentials); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public AzureDataLakeGen2Datastore withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ @Override public AzureDataLakeGen2Datastore withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureDataLakeGen2Datastore withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureDataLakeGen2Datastore withTags(Map tags) { super.withTags(tags); @@ -183,23 +256,19 @@ public AzureDataLakeGen2Datastore withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (accountName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property accountName in model AzureDataLakeGen2Datastore")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property accountName in model AzureDataLakeGen2Datastore")); } if (filesystem() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property filesystem in model AzureDataLakeGen2Datastore")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property filesystem in model AzureDataLakeGen2Datastore")); } } 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..6b93380e7c9f1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..8cb37659eae6f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..a0d7798d09d4a 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Azure File datastore configuration. */ +/** + * Azure File datastore configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") @JsonTypeName("AzureFile") @Fluent @@ -46,13 +48,27 @@ public final class AzureFileDatastore extends DatastoreProperties { @JsonProperty(value = "serviceDataAccessAuthIdentity") private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - /** Creates an instance of AzureFileDatastore class. */ + /* + * 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() { } /** * Get the accountName property: [Required] Storage account name. - * + * * @return the accountName value. */ public String accountName() { @@ -61,7 +77,7 @@ public String accountName() { /** * Set the accountName property: [Required] Storage account name. - * + * * @param accountName the accountName value to set. * @return the AzureFileDatastore object itself. */ @@ -72,7 +88,7 @@ public AzureFileDatastore withAccountName(String accountName) { /** * Get the endpoint property: Azure cloud endpoint for the storage account. - * + * * @return the endpoint value. */ public String endpoint() { @@ -81,7 +97,7 @@ public String endpoint() { /** * Set the endpoint property: Azure cloud endpoint for the storage account. - * + * * @param endpoint the endpoint value to set. * @return the AzureFileDatastore object itself. */ @@ -92,7 +108,7 @@ public AzureFileDatastore withEndpoint(String endpoint) { /** * Get the fileShareName property: [Required] The name of the Azure file share that the datastore points to. - * + * * @return the fileShareName value. */ public String fileShareName() { @@ -101,7 +117,7 @@ public String fileShareName() { /** * Set the fileShareName property: [Required] The name of the Azure file share that the datastore points to. - * + * * @param fileShareName the fileShareName value to set. * @return the AzureFileDatastore object itself. */ @@ -112,7 +128,7 @@ public AzureFileDatastore withFileShareName(String fileShareName) { /** * Get the protocol property: Protocol used to communicate with the storage account. - * + * * @return the protocol value. */ public String protocol() { @@ -121,7 +137,7 @@ public String protocol() { /** * Set the protocol property: Protocol used to communicate with the storage account. - * + * * @param protocol the protocol value to set. * @return the AzureFileDatastore object itself. */ @@ -133,7 +149,7 @@ public AzureFileDatastore withProtocol(String protocol) { /** * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. - * + * * @return the serviceDataAccessAuthIdentity value. */ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { @@ -143,38 +159,95 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { /** * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. - * + * * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. * @return the AzureFileDatastore object itself. */ - public AzureFileDatastore withServiceDataAccessAuthIdentity( - ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { + public AzureFileDatastore + withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; return this; } - /** {@inheritDoc} */ + /** + * 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) { super.withCredentials(credentials); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public AzureFileDatastore withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ @Override public AzureFileDatastore withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureFileDatastore withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AzureFileDatastore withTags(Map tags) { super.withTags(tags); @@ -183,22 +256,19 @@ public AzureFileDatastore withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (accountName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property accountName in model AzureFileDatastore")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property accountName in model AzureFileDatastore")); } if (fileShareName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property fileShareName in model AzureFileDatastore")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property fileShareName in model AzureFileDatastore")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureMLBatchInferencingServer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureMLBatchInferencingServer.java new file mode 100644 index 0000000000000..b8d1369f7b2e6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureMLBatchInferencingServer.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Azure ML batch inferencing server configurations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "serverType") +@JsonTypeName("AzureMLBatch") +@Fluent +public final class AzureMLBatchInferencingServer extends InferencingServer { + /* + * Code configuration for AML batch inferencing server. + */ + @JsonProperty(value = "codeConfiguration") + private CodeConfiguration codeConfiguration; + + /** + * Creates an instance of AzureMLBatchInferencingServer class. + */ + public AzureMLBatchInferencingServer() { + } + + /** + * Get the codeConfiguration property: Code configuration for AML batch inferencing server. + * + * @return the codeConfiguration value. + */ + public CodeConfiguration codeConfiguration() { + return this.codeConfiguration; + } + + /** + * Set the codeConfiguration property: Code configuration for AML batch inferencing server. + * + * @param codeConfiguration the codeConfiguration value to set. + * @return the AzureMLBatchInferencingServer object itself. + */ + public AzureMLBatchInferencingServer withCodeConfiguration(CodeConfiguration codeConfiguration) { + this.codeConfiguration = codeConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (codeConfiguration() != null) { + codeConfiguration().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureMLOnlineInferencingServer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureMLOnlineInferencingServer.java new file mode 100644 index 0000000000000..94721a2ebafa5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureMLOnlineInferencingServer.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Azure ML online inferencing configurations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "serverType") +@JsonTypeName("AzureMLOnline") +@Fluent +public final class AzureMLOnlineInferencingServer extends InferencingServer { + /* + * Code configuration for AML inferencing server. + */ + @JsonProperty(value = "codeConfiguration") + private CodeConfiguration codeConfiguration; + + /** + * Creates an instance of AzureMLOnlineInferencingServer class. + */ + public AzureMLOnlineInferencingServer() { + } + + /** + * Get the codeConfiguration property: Code configuration for AML inferencing server. + * + * @return the codeConfiguration value. + */ + public CodeConfiguration codeConfiguration() { + return this.codeConfiguration; + } + + /** + * Set the codeConfiguration property: Code configuration for AML inferencing server. + * + * @param codeConfiguration the codeConfiguration value to set. + * @return the AzureMLOnlineInferencingServer object itself. + */ + public AzureMLOnlineInferencingServer withCodeConfiguration(CodeConfiguration codeConfiguration) { + this.codeConfiguration = codeConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (codeConfiguration() != null) { + codeConfiguration().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java new file mode 100644 index 0000000000000..b4f793e3a22b2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java @@ -0,0 +1,99 @@ +// Copyright (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 AzureOpenAiFineTuning model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "modelProvider") +@JsonTypeName("AzureOpenAI") +@Fluent +public final class AzureOpenAiFineTuning extends FineTuningVertical { + /* + * HyperParameters for fine tuning Azure Open AI model. + */ + @JsonProperty(value = "hyperParameters") + private AzureOpenAiHyperParameters hyperParameters; + + /** + * Creates an instance of AzureOpenAiFineTuning class. + */ + public AzureOpenAiFineTuning() { + } + + /** + * Get the hyperParameters property: HyperParameters for fine tuning Azure Open AI model. + * + * @return the hyperParameters value. + */ + public AzureOpenAiHyperParameters hyperParameters() { + return this.hyperParameters; + } + + /** + * Set the hyperParameters property: HyperParameters for fine tuning Azure Open AI model. + * + * @param hyperParameters the hyperParameters value to set. + * @return the AzureOpenAiFineTuning object itself. + */ + public AzureOpenAiFineTuning withHyperParameters(AzureOpenAiHyperParameters hyperParameters) { + this.hyperParameters = hyperParameters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureOpenAiFineTuning withModel(MLFlowModelJobInput model) { + super.withModel(model); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureOpenAiFineTuning withTaskType(FineTuningTaskType taskType) { + super.withTaskType(taskType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureOpenAiFineTuning withTrainingData(JobInput trainingData) { + super.withTrainingData(trainingData); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureOpenAiFineTuning withValidationData(JobInput validationData) { + super.withValidationData(validationData); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (hyperParameters() != null) { + hyperParameters().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java new file mode 100644 index 0000000000000..11a171afe8d83 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Open AI hyperparameters for fine tuning. + */ +@Fluent +public final class AzureOpenAiHyperParameters { + /* + * Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, + * but with lower variance. + */ + @JsonProperty(value = "batchSize") + private Integer batchSize; + + /* + * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid over fitting. + */ + @JsonProperty(value = "learningRateMultiplier") + private Double learningRateMultiplier; + + /* + * The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. + */ + @JsonProperty(value = "nEpochs") + private Integer nEpochs; + + /** + * Creates an instance of AzureOpenAiHyperParameters class. + */ + public AzureOpenAiHyperParameters() { + } + + /** + * Get the batchSize property: Number of examples in each batch. A larger batch size means that model parameters + * are updated less frequently, but with lower variance. + * + * @return the batchSize value. + */ + public Integer batchSize() { + return this.batchSize; + } + + /** + * Set the batchSize property: Number of examples in each batch. A larger batch size means that model parameters + * are updated less frequently, but with lower variance. + * + * @param batchSize the batchSize value to set. + * @return the AzureOpenAiHyperParameters object itself. + */ + public AzureOpenAiHyperParameters withBatchSize(Integer batchSize) { + this.batchSize = batchSize; + return this; + } + + /** + * Get the learningRateMultiplier property: Scaling factor for the learning rate. A smaller learning rate may be + * useful to avoid over fitting. + * + * @return the learningRateMultiplier value. + */ + public Double learningRateMultiplier() { + return this.learningRateMultiplier; + } + + /** + * Set the learningRateMultiplier property: Scaling factor for the learning rate. A smaller learning rate may be + * useful to avoid over fitting. + * + * @param learningRateMultiplier the learningRateMultiplier value to set. + * @return the AzureOpenAiHyperParameters object itself. + */ + public AzureOpenAiHyperParameters withLearningRateMultiplier(Double learningRateMultiplier) { + this.learningRateMultiplier = learningRateMultiplier; + return this; + } + + /** + * Get the nEpochs property: The number of epochs to train the model for. An epoch refers to one full cycle through + * the training dataset. + * + * @return the nEpochs value. + */ + public Integer nEpochs() { + return this.nEpochs; + } + + /** + * Set the nEpochs property: The number of epochs to train the model for. An epoch refers to one full cycle through + * the training dataset. + * + * @param nEpochs the nEpochs value to set. + * @return the AzureOpenAiHyperParameters object itself. + */ + public AzureOpenAiHyperParameters withNEpochs(Integer nEpochs) { + this.nEpochs = nEpochs; + 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/BanditPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java index 2fa766d834d85..8e9f5b4bc163b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation. */ +/** + * Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "policyType") @JsonTypeName("Bandit") @Fluent @@ -26,13 +28,15 @@ public final class BanditPolicy extends EarlyTerminationPolicy { @JsonProperty(value = "slackFactor") private Float slackFactor; - /** Creates an instance of BanditPolicy class. */ + /** + * Creates an instance of BanditPolicy class. + */ public BanditPolicy() { } /** * Get the slackAmount property: Absolute distance allowed from the best performing run. - * + * * @return the slackAmount value. */ public Float slackAmount() { @@ -41,7 +45,7 @@ public Float slackAmount() { /** * Set the slackAmount property: Absolute distance allowed from the best performing run. - * + * * @param slackAmount the slackAmount value to set. * @return the BanditPolicy object itself. */ @@ -52,7 +56,7 @@ public BanditPolicy withSlackAmount(Float slackAmount) { /** * Get the slackFactor property: Ratio of the allowed distance from the best performing run. - * + * * @return the slackFactor value. */ public Float slackFactor() { @@ -61,7 +65,7 @@ public Float slackFactor() { /** * Set the slackFactor property: Ratio of the allowed distance from the best performing run. - * + * * @param slackFactor the slackFactor value to set. * @return the BanditPolicy object itself. */ @@ -70,14 +74,18 @@ public BanditPolicy withSlackFactor(Float slackFactor) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BanditPolicy withDelayEvaluation(Integer delayEvaluation) { super.withDelayEvaluation(delayEvaluation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { super.withEvaluationInterval(evaluationInterval); @@ -86,7 +94,7 @@ public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentId.java new file mode 100644 index 0000000000000..5b2c942830ee0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentId.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; + +/** + * Base environment type. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "baseEnvironmentSourceType") +@JsonTypeName("EnvironmentAsset") +@Fluent +public final class BaseEnvironmentId extends BaseEnvironmentSource { + /* + * [Required] Resource id accepting ArmId or AzureMlId. + */ + @JsonProperty(value = "resourceId", required = true) + private String resourceId; + + /** + * Creates an instance of BaseEnvironmentId class. + */ + public BaseEnvironmentId() { + } + + /** + * Get the resourceId property: [Required] Resource id accepting ArmId or AzureMlId. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: [Required] Resource id accepting ArmId or AzureMlId. + * + * @param resourceId the resourceId value to set. + * @return the BaseEnvironmentId object itself. + */ + public BaseEnvironmentId withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (resourceId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property resourceId in model BaseEnvironmentId")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BaseEnvironmentId.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentSource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentSource.java new file mode 100644 index 0000000000000..36c0697776341 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentSource.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 BaseEnvironmentSource model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "baseEnvironmentSourceType", + defaultImpl = BaseEnvironmentSource.class) +@JsonTypeName("BaseEnvironmentSource") +@JsonSubTypes({ @JsonSubTypes.Type(name = "EnvironmentAsset", value = BaseEnvironmentId.class) }) +@Immutable +public class BaseEnvironmentSource { + /** + * Creates an instance of BaseEnvironmentSource class. + */ + public BaseEnvironmentSource() { + } + + /** + * 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/BaseEnvironmentSourceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentSourceType.java new file mode 100644 index 0000000000000..8ede2b2299c00 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BaseEnvironmentSourceType.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; + +/** + * Base environment type. + */ +public final class BaseEnvironmentSourceType extends ExpandableStringEnum { + /** + * Static value EnvironmentAsset for BaseEnvironmentSourceType. + */ + public static final BaseEnvironmentSourceType ENVIRONMENT_ASSET = fromString("EnvironmentAsset"); + + /** + * Creates a new instance of BaseEnvironmentSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BaseEnvironmentSourceType() { + } + + /** + * Creates or finds a BaseEnvironmentSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding BaseEnvironmentSourceType. + */ + @JsonCreator + public static BaseEnvironmentSourceType fromString(String name) { + return fromString(name, BaseEnvironmentSourceType.class); + } + + /** + * Gets known BaseEnvironmentSourceType values. + * + * @return known BaseEnvironmentSourceType values. + */ + public static Collection values() { + return values(BaseEnvironmentSourceType.class); + } +} 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..8f626dc515f4c 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 @@ -10,46 +10,48 @@ import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; import java.util.Map; -/** An immutable client-side representation of BatchDeployment. */ +/** + * An immutable client-side representation of BatchDeployment. + */ public interface BatchDeployment { /** * 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(); @@ -57,78 +59,84 @@ public interface BatchDeployment { /** * 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 properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ BatchDeploymentProperties properties(); /** * 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 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.BatchDeploymentInner object. - * + * * @return the inner object. */ BatchDeploymentInner innerModel(); - /** The entirety of the BatchDeployment definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the BatchDeployment definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The BatchDeployment definition stages. */ + + /** + * The BatchDeployment definition stages. + */ interface DefinitionStages { - /** The first stage of the BatchDeployment definition. */ + /** + * The first stage of the BatchDeployment definition. + */ interface Blank extends WithLocation { } - /** The stage of the BatchDeployment definition allowing to specify location. */ + + /** + * The stage of the BatchDeployment 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. */ @@ -136,160 +144,188 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithParentResource withRegion(String location); } - /** The stage of the BatchDeployment definition allowing to specify parent resource. */ + + /** + * The stage of the BatchDeployment definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName, endpointName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. * @return the next definition stage. */ - WithProperties withExistingBatchEndpoint( - String resourceGroupName, String workspaceName, String endpointName); + WithProperties withExistingBatchEndpoint(String resourceGroupName, String workspaceName, + String endpointName); } - /** The stage of the BatchDeployment definition allowing to specify properties. */ + + /** + * The stage of the BatchDeployment 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(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. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithKind, - DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. - * + * * @return the created resource. */ BatchDeployment create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ BatchDeployment create(Context context); } - /** The stage of the BatchDeployment definition allowing to specify tags. */ + + /** + * The stage of the BatchDeployment 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 BatchDeployment definition allowing to specify identity. */ + + /** + * The stage of the BatchDeployment 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 BatchDeployment definition allowing to specify kind. */ + + /** + * The stage of the BatchDeployment 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. + * same type. * @return the next definition stage. */ WithCreate withKind(String kind); } - /** The stage of the BatchDeployment definition allowing to specify sku. */ + + /** + * The stage of the BatchDeployment 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); } } + /** * Begins update for the BatchDeployment resource. - * + * * @return the stage of resource update. */ BatchDeployment.Update update(); - /** The template for BatchDeployment update. */ + /** + * The template for BatchDeployment update. + */ interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ BatchDeployment apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ BatchDeployment apply(Context context); } - /** The BatchDeployment update stages. */ + + /** + * The BatchDeployment update stages. + */ interface UpdateStages { - /** The stage of the BatchDeployment update allowing to specify tags. */ + /** + * The stage of the BatchDeployment 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 BatchDeployment update allowing to specify properties. */ + + /** + * The stage of the BatchDeployment update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Additional attributes of the entity.. - * + * * @param properties Additional attributes of the entity. * @return the next definition stage. */ Update withProperties(PartialBatchDeployment properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ BatchDeployment refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java new file mode 100644 index 0000000000000..e736486c75abb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.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; + +/** + * Properties relevant to different deployment types. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "deploymentConfigurationType", + defaultImpl = BatchDeploymentConfiguration.class) +@JsonTypeName("BatchDeploymentConfiguration") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "PipelineComponent", value = BatchPipelineComponentDeploymentConfiguration.class) }) +@Immutable +public class BatchDeploymentConfiguration { + /** + * Creates an instance of BatchDeploymentConfiguration class. + */ + public BatchDeploymentConfiguration() { + } + + /** + * 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/BatchDeploymentConfigurationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java new file mode 100644 index 0000000000000..de8e2f50eb7fb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.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 enumerated property types for batch deployments. + */ +public final class BatchDeploymentConfigurationType extends ExpandableStringEnum { + /** + * Static value Model for BatchDeploymentConfigurationType. + */ + public static final BatchDeploymentConfigurationType MODEL = fromString("Model"); + + /** + * Static value PipelineComponent for BatchDeploymentConfigurationType. + */ + public static final BatchDeploymentConfigurationType PIPELINE_COMPONENT = fromString("PipelineComponent"); + + /** + * Creates a new instance of BatchDeploymentConfigurationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BatchDeploymentConfigurationType() { + } + + /** + * Creates or finds a BatchDeploymentConfigurationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding BatchDeploymentConfigurationType. + */ + @JsonCreator + public static BatchDeploymentConfigurationType fromString(String name) { + return fromString(name, BatchDeploymentConfigurationType.class); + } + + /** + * Gets known BatchDeploymentConfigurationType values. + * + * @return known BatchDeploymentConfigurationType values. + */ + public static Collection values() { + return values(BatchDeploymentConfigurationType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java index c9edec18e058e..3b49a25320cf1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Batch inference settings per deployment. */ +/** + * Batch inference settings per deployment. + */ @Fluent public final class BatchDeploymentProperties extends EndpointDeploymentPropertiesBase { /* @@ -17,6 +19,12 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie @JsonProperty(value = "compute") private String compute; + /* + * Properties relevant to different deployment types. + */ + @JsonProperty(value = "deploymentConfiguration") + private BatchDeploymentConfiguration deploymentConfiguration; + /* * Error threshold, if the error count for the entire input goes above this value, * the batch inference will be aborted. Range is [-1, int.MaxValue]. @@ -85,13 +93,15 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie @JsonProperty(value = "retrySettings") private BatchRetrySettings retrySettings; - /** Creates an instance of BatchDeploymentProperties class. */ + /** + * Creates an instance of BatchDeploymentProperties class. + */ public BatchDeploymentProperties() { } /** * Get the compute property: Compute target for batch inference operation. - * + * * @return the compute value. */ public String compute() { @@ -100,7 +110,7 @@ public String compute() { /** * Set the compute property: Compute target for batch inference operation. - * + * * @param compute the compute value to set. * @return the BatchDeploymentProperties object itself. */ @@ -109,12 +119,33 @@ public BatchDeploymentProperties withCompute(String compute) { return this; } + /** + * Get the deploymentConfiguration property: Properties relevant to different deployment types. + * + * @return the deploymentConfiguration value. + */ + public BatchDeploymentConfiguration deploymentConfiguration() { + return this.deploymentConfiguration; + } + + /** + * Set the deploymentConfiguration property: Properties relevant to different deployment types. + * + * @param deploymentConfiguration the deploymentConfiguration value to set. + * @return the BatchDeploymentProperties object itself. + */ + public BatchDeploymentProperties withDeploymentConfiguration(BatchDeploymentConfiguration deploymentConfiguration) { + this.deploymentConfiguration = deploymentConfiguration; + return this; + } + /** * Get the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. For FileDataset, this value is the count of - * file failures. For TabularDataset, this value is the count of record failures. If set to -1 (the lower bound), - * all failures during batch inference will be ignored. - * + * the batch inference will be aborted. Range is [-1, int.MaxValue]. + * For FileDataset, this value is the count of file failures. + * For TabularDataset, this value is the count of record failures. + * If set to -1 (the lower bound), all failures during batch inference will be ignored. + * * @return the errorThreshold value. */ public Integer errorThreshold() { @@ -123,10 +154,11 @@ public Integer errorThreshold() { /** * Set the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. For FileDataset, this value is the count of - * file failures. For TabularDataset, this value is the count of record failures. If set to -1 (the lower bound), - * all failures during batch inference will be ignored. - * + * the batch inference will be aborted. Range is [-1, int.MaxValue]. + * For FileDataset, this value is the count of file failures. + * For TabularDataset, this value is the count of record failures. + * If set to -1 (the lower bound), all failures during batch inference will be ignored. + * * @param errorThreshold the errorThreshold value to set. * @return the BatchDeploymentProperties object itself. */ @@ -137,7 +169,7 @@ public BatchDeploymentProperties withErrorThreshold(Integer errorThreshold) { /** * Get the loggingLevel property: Logging level for batch inference operation. - * + * * @return the loggingLevel value. */ public BatchLoggingLevel loggingLevel() { @@ -146,7 +178,7 @@ public BatchLoggingLevel loggingLevel() { /** * Set the loggingLevel property: Logging level for batch inference operation. - * + * * @param loggingLevel the loggingLevel value to set. * @return the BatchDeploymentProperties object itself. */ @@ -157,7 +189,7 @@ public BatchDeploymentProperties withLoggingLevel(BatchLoggingLevel loggingLevel /** * Get the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * + * * @return the maxConcurrencyPerInstance value. */ public Integer maxConcurrencyPerInstance() { @@ -166,7 +198,7 @@ public Integer maxConcurrencyPerInstance() { /** * Set the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * + * * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. * @return the BatchDeploymentProperties object itself. */ @@ -176,9 +208,10 @@ public BatchDeploymentProperties withMaxConcurrencyPerInstance(Integer maxConcur } /** - * Get the miniBatchSize property: Size of the mini-batch passed to each batch invocation. For FileDataset, this is - * the number of files per mini-batch. For TabularDataset, this is the size of the records in bytes, per mini-batch. - * + * Get the miniBatchSize property: Size of the mini-batch passed to each batch invocation. + * For FileDataset, this is the number of files per mini-batch. + * For TabularDataset, this is the size of the records in bytes, per mini-batch. + * * @return the miniBatchSize value. */ public Long miniBatchSize() { @@ -186,9 +219,10 @@ public Long miniBatchSize() { } /** - * Set the miniBatchSize property: Size of the mini-batch passed to each batch invocation. For FileDataset, this is - * the number of files per mini-batch. For TabularDataset, this is the size of the records in bytes, per mini-batch. - * + * Set the miniBatchSize property: Size of the mini-batch passed to each batch invocation. + * For FileDataset, this is the number of files per mini-batch. + * For TabularDataset, this is the size of the records in bytes, per mini-batch. + * * @param miniBatchSize the miniBatchSize value to set. * @return the BatchDeploymentProperties object itself. */ @@ -199,7 +233,7 @@ public BatchDeploymentProperties withMiniBatchSize(Long miniBatchSize) { /** * Get the model property: Reference to the model asset for the endpoint deployment. - * + * * @return the model value. */ public AssetReferenceBase model() { @@ -208,7 +242,7 @@ public AssetReferenceBase model() { /** * Set the model property: Reference to the model asset for the endpoint deployment. - * + * * @param model the model value to set. * @return the BatchDeploymentProperties object itself. */ @@ -219,7 +253,7 @@ public BatchDeploymentProperties withModel(AssetReferenceBase model) { /** * Get the outputAction property: Indicates how the output will be organized. - * + * * @return the outputAction value. */ public BatchOutputAction outputAction() { @@ -228,7 +262,7 @@ public BatchOutputAction outputAction() { /** * Set the outputAction property: Indicates how the output will be organized. - * + * * @param outputAction the outputAction value to set. * @return the BatchDeploymentProperties object itself. */ @@ -239,7 +273,7 @@ public BatchDeploymentProperties withOutputAction(BatchOutputAction outputAction /** * Get the outputFileName property: Customized output file name for append_row output action. - * + * * @return the outputFileName value. */ public String outputFileName() { @@ -248,7 +282,7 @@ public String outputFileName() { /** * Set the outputFileName property: Customized output file name for append_row output action. - * + * * @param outputFileName the outputFileName value to set. * @return the BatchDeploymentProperties object itself. */ @@ -259,7 +293,7 @@ public BatchDeploymentProperties withOutputFileName(String outputFileName) { /** * Get the provisioningState property: Provisioning state for the endpoint deployment. - * + * * @return the provisioningState value. */ public DeploymentProvisioningState provisioningState() { @@ -267,9 +301,9 @@ public DeploymentProvisioningState provisioningState() { } /** - * Get the resources property: Indicates compute configuration for the job. If not provided, will default to the - * defaults defined in ResourceConfiguration. - * + * Get the resources property: Indicates compute configuration for the job. + * If not provided, will default to the defaults defined in ResourceConfiguration. + * * @return the resources value. */ public DeploymentResourceConfiguration resources() { @@ -277,9 +311,9 @@ public DeploymentResourceConfiguration resources() { } /** - * Set the resources property: Indicates compute configuration for the job. If not provided, will default to the - * defaults defined in ResourceConfiguration. - * + * Set the resources property: Indicates compute configuration for the job. + * If not provided, will default to the defaults defined in ResourceConfiguration. + * * @param resources the resources value to set. * @return the BatchDeploymentProperties object itself. */ @@ -289,9 +323,9 @@ public BatchDeploymentProperties withResources(DeploymentResourceConfiguration r } /** - * Get the retrySettings property: Retry Settings for the batch inference operation. If not provided, will default - * to the defaults defined in BatchRetrySettings. - * + * Get the retrySettings property: Retry Settings for the batch inference operation. + * If not provided, will default to the defaults defined in BatchRetrySettings. + * * @return the retrySettings value. */ public BatchRetrySettings retrySettings() { @@ -299,9 +333,9 @@ public BatchRetrySettings retrySettings() { } /** - * Set the retrySettings property: Retry Settings for the batch inference operation. If not provided, will default - * to the defaults defined in BatchRetrySettings. - * + * Set the retrySettings property: Retry Settings for the batch inference operation. + * If not provided, will default to the defaults defined in BatchRetrySettings. + * * @param retrySettings the retrySettings value to set. * @return the BatchDeploymentProperties object itself. */ @@ -310,35 +344,45 @@ public BatchDeploymentProperties withRetrySettings(BatchRetrySettings retrySetti return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { super.withCodeConfiguration(codeConfiguration); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchDeploymentProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchDeploymentProperties withEnvironmentId(String environmentId) { super.withEnvironmentId(environmentId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchDeploymentProperties withEnvironmentVariables(Map environmentVariables) { super.withEnvironmentVariables(environmentVariables); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchDeploymentProperties withProperties(Map properties) { super.withProperties(properties); @@ -347,12 +391,15 @@ public BatchDeploymentProperties withProperties(Map properties) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (deploymentConfiguration() != null) { + deploymentConfiguration().validate(); + } if (model() != null) { model().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java index 32e17c4cdfd01..7045e655f6675 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of BatchDeployment entities. */ +/** + * A paginated list of BatchDeployment entities. + */ @Fluent public final class BatchDeploymentTrackedResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class BatchDeploymentTrackedResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of BatchDeploymentTrackedResourceArmPaginatedResult class. */ + /** + * Creates an instance of BatchDeploymentTrackedResourceArmPaginatedResult class. + */ public BatchDeploymentTrackedResourceArmPaginatedResult() { } /** - * Get the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional - * pages. - * + * Get the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no + * additional pages. + * * @return the nextLink value. */ public String nextLink() { @@ -39,9 +43,9 @@ public String nextLink() { } /** - * Set the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional - * pages. - * + * Set the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no + * additional pages. + * * @param nextLink the nextLink value to set. * @return the BatchDeploymentTrackedResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public BatchDeploymentTrackedResourceArmPaginatedResult withNextLink(String next /** * Get the value property: An array of objects of type BatchDeployment. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type BatchDeployment. - * + * * @param value the value value to set. * @return the BatchDeploymentTrackedResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public BatchDeploymentTrackedResourceArmPaginatedResult withValue(List list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context); /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -62,7 +58,7 @@ PagedIterable list( /** * Delete Batch Inference deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -72,12 +68,12 @@ PagedIterable list( * @throws com.azure.core.management.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 endpointName, String deploymentName, Context context); + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); /** * Gets a batch inference deployment by id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -88,12 +84,12 @@ void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a batch inference deployment by id along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** * Gets a batch inference deployment by id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Endpoint name. @@ -107,7 +103,7 @@ Response getWithResponse( /** * Gets a batch inference deployment by id. - * + * * @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. @@ -118,7 +114,7 @@ Response getWithResponse( /** * Gets a batch inference deployment by id. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -130,7 +126,7 @@ Response getWithResponse( /** * Delete Batch Inference deployment (asynchronous). - * + * * @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. @@ -140,7 +136,7 @@ Response getWithResponse( /** * Delete Batch Inference deployment (asynchronous). - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,7 +147,7 @@ Response getWithResponse( /** * Begins definition for a new BatchDeployment resource. - * + * * @param name resource name. * @return the first stage of the new BatchDeployment definition. */ 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..27ec5bc30610a 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 @@ -11,46 +11,48 @@ import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; import java.util.Map; -/** An immutable client-side representation of BatchEndpoint. */ +/** + * An immutable client-side representation of BatchEndpoint. + */ public interface BatchEndpoint { /** * 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(); @@ -58,78 +60,84 @@ public interface BatchEndpoint { /** * 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 properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ BatchEndpointProperties properties(); /** * 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 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.BatchEndpointInner object. - * + * * @return the inner object. */ BatchEndpointInner innerModel(); - /** The entirety of the BatchEndpoint definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the BatchEndpoint definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The BatchEndpoint definition stages. */ + + /** + * The BatchEndpoint definition stages. + */ interface DefinitionStages { - /** The first stage of the BatchEndpoint definition. */ + /** + * The first stage of the BatchEndpoint definition. + */ interface Blank extends WithLocation { } - /** The stage of the BatchEndpoint definition allowing to specify location. */ + + /** + * The stage of the BatchEndpoint 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. */ @@ -137,159 +145,187 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithParentResource withRegion(String location); } - /** The stage of the BatchEndpoint definition allowing to specify parent resource. */ + + /** + * The stage of the BatchEndpoint 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 BatchEndpoint definition allowing to specify properties. */ + + /** + * The stage of the BatchEndpoint 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(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. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithKind, - DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. - * + * * @return the created resource. */ BatchEndpoint create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ BatchEndpoint create(Context context); } - /** The stage of the BatchEndpoint definition allowing to specify tags. */ + + /** + * The stage of the BatchEndpoint 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 BatchEndpoint definition allowing to specify identity. */ + + /** + * The stage of the BatchEndpoint 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 BatchEndpoint definition allowing to specify kind. */ + + /** + * The stage of the BatchEndpoint 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. + * same type. * @return the next definition stage. */ WithCreate withKind(String kind); } - /** The stage of the BatchEndpoint definition allowing to specify sku. */ + + /** + * The stage of the BatchEndpoint 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); } } + /** * Begins update for the BatchEndpoint resource. - * + * * @return the stage of resource update. */ BatchEndpoint.Update update(); - /** The template for BatchEndpoint update. */ + /** + * The template for BatchEndpoint update. + */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { /** * Executes the update request. - * + * * @return the updated resource. */ BatchEndpoint apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ BatchEndpoint apply(Context context); } - /** The BatchEndpoint update stages. */ + + /** + * The BatchEndpoint update stages. + */ interface UpdateStages { - /** The stage of the BatchEndpoint update allowing to specify tags. */ + /** + * The stage of the BatchEndpoint 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 BatchEndpoint update allowing to specify identity. */ + + /** + * The stage of the BatchEndpoint 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(PartialManagedServiceIdentity identity); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ BatchEndpoint refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -297,7 +333,7 @@ interface WithIdentity { /** * Lists batch Inference Endpoint keys. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -308,7 +344,7 @@ interface WithIdentity { /** * Lists batch Inference Endpoint keys. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return keys for endpoint authentication. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java index aa25ce2802e2a..269478d23ed57 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Batch endpoint default values. */ +/** + * Batch endpoint default values. + */ @Fluent public final class BatchEndpointDefaults { /* @@ -17,14 +19,16 @@ public final class BatchEndpointDefaults { @JsonProperty(value = "deploymentName") private String deploymentName; - /** Creates an instance of BatchEndpointDefaults class. */ + /** + * Creates an instance of BatchEndpointDefaults class. + */ public BatchEndpointDefaults() { } /** - * Get the deploymentName property: Name of the deployment that will be default for the endpoint. This deployment - * will end up getting 100% traffic when the endpoint scoring URL is invoked. - * + * Get the deploymentName property: Name of the deployment that will be default for the endpoint. + * This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + * * @return the deploymentName value. */ public String deploymentName() { @@ -32,9 +36,9 @@ public String deploymentName() { } /** - * Set the deploymentName property: Name of the deployment that will be default for the endpoint. This deployment - * will end up getting 100% traffic when the endpoint scoring URL is invoked. - * + * Set the deploymentName property: Name of the deployment that will be default for the endpoint. + * This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + * * @param deploymentName the deploymentName value to set. * @return the BatchEndpointDefaults object itself. */ @@ -45,7 +49,7 @@ public BatchEndpointDefaults withDeploymentName(String deploymentName) { /** * 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/BatchEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java index 91f737a4bd0fc..7c895270bd832 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java @@ -10,11 +10,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Batch endpoint configuration. */ +/** + * Batch endpoint configuration. + */ @Fluent public final class BatchEndpointProperties extends EndpointPropertiesBaseInner { /* - * Default values for Batch Endpoint + * Default values for Batch Endpoint. */ @JsonProperty(value = "defaults") private BatchEndpointDefaults defaults; @@ -25,13 +27,15 @@ public final class BatchEndpointProperties extends EndpointPropertiesBaseInner { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private EndpointProvisioningState provisioningState; - /** Creates an instance of BatchEndpointProperties class. */ + /** + * Creates an instance of BatchEndpointProperties class. + */ public BatchEndpointProperties() { } /** * Get the defaults property: Default values for Batch Endpoint. - * + * * @return the defaults value. */ public BatchEndpointDefaults defaults() { @@ -40,7 +44,7 @@ public BatchEndpointDefaults defaults() { /** * Set the defaults property: Default values for Batch Endpoint. - * + * * @param defaults the defaults value to set. * @return the BatchEndpointProperties object itself. */ @@ -51,35 +55,43 @@ public BatchEndpointProperties withDefaults(BatchEndpointDefaults defaults) { /** * Get the provisioningState property: Provisioning state for the endpoint. - * + * * @return the provisioningState value. */ public EndpointProvisioningState provisioningState() { return this.provisioningState; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchEndpointProperties withAuthMode(EndpointAuthMode authMode) { super.withAuthMode(authMode); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchEndpointProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchEndpointProperties withKeys(EndpointAuthKeysInner keys) { super.withKeys(keys); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public BatchEndpointProperties withProperties(Map properties) { super.withProperties(properties); @@ -88,7 +100,7 @@ public BatchEndpointProperties withProperties(Map properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java index d2984db78bd8e..103e54cd7e231 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of BatchEndpoint entities. */ +/** + * A paginated list of BatchEndpoint entities. + */ @Fluent public final class BatchEndpointTrackedResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class BatchEndpointTrackedResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of BatchEndpointTrackedResourceArmPaginatedResult class. */ + /** + * Creates an instance of BatchEndpointTrackedResourceArmPaginatedResult class. + */ public BatchEndpointTrackedResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional * pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional * pages. - * + * * @param nextLink the nextLink value to set. * @return the BatchEndpointTrackedResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public BatchEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLi /** * Get the value property: An array of objects of type BatchEndpoint. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type BatchEndpoint. - * + * * @param value the value value to set. * @return the BatchEndpointTrackedResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public BatchEndpointTrackedResourceArmPaginatedResult withValue(List list( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + Context context); /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -52,7 +54,7 @@ PagedIterable list( /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -65,7 +67,7 @@ PagedIterable list( /** * Gets a batch inference endpoint by name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. @@ -75,12 +77,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a batch inference endpoint by name along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** * Gets a batch inference endpoint by name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Name for the Batch Endpoint. @@ -93,7 +95,7 @@ Response getWithResponse( /** * Lists batch Inference Endpoint keys. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -103,12 +105,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return keys for endpoint authentication along with {@link Response}. */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + Response listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** * Lists batch Inference Endpoint keys. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference Endpoint name. @@ -121,7 +123,7 @@ Response listKeysWithResponse( /** * Gets a batch inference endpoint by name. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -132,7 +134,7 @@ Response listKeysWithResponse( /** * Gets a batch inference endpoint by name. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -144,7 +146,7 @@ Response listKeysWithResponse( /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @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. @@ -154,7 +156,7 @@ Response listKeysWithResponse( /** * Delete Batch Inference Endpoint (asynchronous). - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -165,7 +167,7 @@ Response listKeysWithResponse( /** * Begins definition for a new BatchEndpoint resource. - * + * * @param name resource name. * @return the first stage of the new BatchEndpoint definition. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java index 75fc37922df39..f8d8991135f94 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java @@ -9,22 +9,29 @@ import java.util.Collection; /** - * Log verbosity for batch inferencing. Increasing verbosity order for logging is : Warning, Info and Debug. The default - * value is Info. + * Log verbosity for batch inferencing. + * Increasing verbosity order for logging is : Warning, Info and Debug. + * The default value is Info. */ public final class BatchLoggingLevel extends ExpandableStringEnum { - /** Static value Info for BatchLoggingLevel. */ + /** + * Static value Info for BatchLoggingLevel. + */ public static final BatchLoggingLevel INFO = fromString("Info"); - /** Static value Warning for BatchLoggingLevel. */ + /** + * Static value Warning for BatchLoggingLevel. + */ public static final BatchLoggingLevel WARNING = fromString("Warning"); - /** Static value Debug for BatchLoggingLevel. */ + /** + * Static value Debug for BatchLoggingLevel. + */ public static final BatchLoggingLevel DEBUG = fromString("Debug"); /** * Creates a new instance of BatchLoggingLevel value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +40,7 @@ public BatchLoggingLevel() { /** * Creates or finds a BatchLoggingLevel from its string representation. - * + * * @param name a name to look for. * @return the corresponding BatchLoggingLevel. */ @@ -44,7 +51,7 @@ public static BatchLoggingLevel fromString(String name) { /** * Gets known BatchLoggingLevel values. - * + * * @return known BatchLoggingLevel values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java index 3b8fd6878d965..37842b6d0df0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine how batch inferencing will handle output. */ +/** + * Enum to determine how batch inferencing will handle output. + */ public final class BatchOutputAction extends ExpandableStringEnum { - /** Static value SummaryOnly for BatchOutputAction. */ + /** + * Static value SummaryOnly for BatchOutputAction. + */ public static final BatchOutputAction SUMMARY_ONLY = fromString("SummaryOnly"); - /** Static value AppendRow for BatchOutputAction. */ + /** + * Static value AppendRow for BatchOutputAction. + */ public static final BatchOutputAction APPEND_ROW = fromString("AppendRow"); /** * Creates a new instance of BatchOutputAction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public BatchOutputAction() { /** * Creates or finds a BatchOutputAction from its string representation. - * + * * @param name a name to look for. * @return the corresponding BatchOutputAction. */ @@ -38,7 +44,7 @@ public static BatchOutputAction fromString(String name) { /** * Gets known BatchOutputAction values. - * + * * @return known BatchOutputAction values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java new file mode 100644 index 0000000000000..f5461f716fcc1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.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.annotation.Fluent; +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.Map; + +/** + * Properties for a Batch Pipeline Component Deployment. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "deploymentConfigurationType") +@JsonTypeName("PipelineComponent") +@Fluent +public final class BatchPipelineComponentDeploymentConfiguration extends BatchDeploymentConfiguration { + /* + * The ARM id of the component to be run. + */ + @JsonProperty(value = "componentId") + private IdAssetReference componentId; + + /* + * The description which will be applied to the job. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Run-time settings for the pipeline job. + */ + @JsonProperty(value = "settings") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map settings; + + /* + * The tags which will be applied to the job. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /** + * Creates an instance of BatchPipelineComponentDeploymentConfiguration class. + */ + public BatchPipelineComponentDeploymentConfiguration() { + } + + /** + * Get the componentId property: The ARM id of the component to be run. + * + * @return the componentId value. + */ + public IdAssetReference componentId() { + return this.componentId; + } + + /** + * Set the componentId property: The ARM id of the component to be run. + * + * @param componentId the componentId value to set. + * @return the BatchPipelineComponentDeploymentConfiguration object itself. + */ + public BatchPipelineComponentDeploymentConfiguration withComponentId(IdAssetReference componentId) { + this.componentId = componentId; + return this; + } + + /** + * Get the description property: The description which will be applied to the job. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description which will be applied to the job. + * + * @param description the description value to set. + * @return the BatchPipelineComponentDeploymentConfiguration object itself. + */ + public BatchPipelineComponentDeploymentConfiguration withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the settings property: Run-time settings for the pipeline job. + * + * @return the settings value. + */ + public Map settings() { + return this.settings; + } + + /** + * Set the settings property: Run-time settings for the pipeline job. + * + * @param settings the settings value to set. + * @return the BatchPipelineComponentDeploymentConfiguration object itself. + */ + public BatchPipelineComponentDeploymentConfiguration withSettings(Map settings) { + this.settings = settings; + return this; + } + + /** + * Get the tags property: The tags which will be applied to the job. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags which will be applied to the job. + * + * @param tags the tags value to set. + * @return the BatchPipelineComponentDeploymentConfiguration object itself. + */ + public BatchPipelineComponentDeploymentConfiguration withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (componentId() != null) { + componentId().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java index 1d98496b92ba5..b405a20b80477 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; -/** Retry settings for a batch inference operation. */ +/** + * Retry settings for a batch inference operation. + */ @Fluent public final class BatchRetrySettings { /* @@ -23,13 +25,15 @@ public final class BatchRetrySettings { @JsonProperty(value = "timeout") private Duration timeout; - /** Creates an instance of BatchRetrySettings class. */ + /** + * Creates an instance of BatchRetrySettings class. + */ public BatchRetrySettings() { } /** * Get the maxRetries property: Maximum retry count for a mini-batch. - * + * * @return the maxRetries value. */ public Integer maxRetries() { @@ -38,7 +42,7 @@ public Integer maxRetries() { /** * Set the maxRetries property: Maximum retry count for a mini-batch. - * + * * @param maxRetries the maxRetries value to set. * @return the BatchRetrySettings object itself. */ @@ -49,7 +53,7 @@ public BatchRetrySettings withMaxRetries(Integer maxRetries) { /** * Get the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. - * + * * @return the timeout value. */ public Duration timeout() { @@ -58,7 +62,7 @@ public Duration timeout() { /** * Set the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. - * + * * @param timeout the timeout value to set. * @return the BatchRetrySettings object itself. */ @@ -69,7 +73,7 @@ public BatchRetrySettings withTimeout(Duration timeout) { /** * 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/BayesianSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java index 06e64fab91691..de4637849626b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Defines a Sampling Algorithm that generates values based on previous values. */ +/** + * Defines a Sampling Algorithm that generates values based on previous values. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "samplingAlgorithmType") @JsonTypeName("Bayesian") @Immutable public final class BayesianSamplingAlgorithm extends SamplingAlgorithm { - /** Creates an instance of BayesianSamplingAlgorithm class. */ + /** + * Creates an instance of BayesianSamplingAlgorithm class. + */ public BayesianSamplingAlgorithm() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java index 9f908f659abad..088c52f10ee5d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java @@ -10,16 +10,18 @@ /** * Billing currency - * - *

Three lettered code specifying the currency of the VM price. Example: USD. + * + * Three lettered code specifying the currency of the VM price. Example: USD. */ public final class BillingCurrency extends ExpandableStringEnum { - /** Static value USD for BillingCurrency. */ + /** + * Static value USD for BillingCurrency. + */ public static final BillingCurrency USD = fromString("USD"); /** * Creates a new instance of BillingCurrency value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -28,7 +30,7 @@ public BillingCurrency() { /** * Creates or finds a BillingCurrency from its string representation. - * + * * @param name a name to look for. * @return the corresponding BillingCurrency. */ @@ -39,7 +41,7 @@ public static BillingCurrency fromString(String name) { /** * Gets known BillingCurrency values. - * + * * @return known BillingCurrency values. */ public static Collection values() { 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..1dcd483db5313 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.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; + +/** + * The BindOptions model. + */ +@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..5b688c20153e4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java @@ -0,0 +1,112 @@ +// Copyright (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/BlockedTransformers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java index 2ac161f2f5a69..25b375d0ca2f5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java @@ -8,41 +8,63 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum for all classification models supported by AutoML. */ +/** + * Enum for all classification models supported by AutoML. + */ public final class BlockedTransformers extends ExpandableStringEnum { - /** Static value TextTargetEncoder for BlockedTransformers. */ + /** + * Static value TextTargetEncoder for BlockedTransformers. + */ public static final BlockedTransformers TEXT_TARGET_ENCODER = fromString("TextTargetEncoder"); - /** Static value OneHotEncoder for BlockedTransformers. */ + /** + * Static value OneHotEncoder for BlockedTransformers. + */ public static final BlockedTransformers ONE_HOT_ENCODER = fromString("OneHotEncoder"); - /** Static value CatTargetEncoder for BlockedTransformers. */ + /** + * Static value CatTargetEncoder for BlockedTransformers. + */ public static final BlockedTransformers CAT_TARGET_ENCODER = fromString("CatTargetEncoder"); - /** Static value TfIdf for BlockedTransformers. */ + /** + * Static value TfIdf for BlockedTransformers. + */ public static final BlockedTransformers TF_IDF = fromString("TfIdf"); - /** Static value WoETargetEncoder for BlockedTransformers. */ + /** + * Static value WoETargetEncoder for BlockedTransformers. + */ public static final BlockedTransformers WO_ETARGET_ENCODER = fromString("WoETargetEncoder"); - /** Static value LabelEncoder for BlockedTransformers. */ + /** + * Static value LabelEncoder for BlockedTransformers. + */ public static final BlockedTransformers LABEL_ENCODER = fromString("LabelEncoder"); - /** Static value WordEmbedding for BlockedTransformers. */ + /** + * Static value WordEmbedding for BlockedTransformers. + */ public static final BlockedTransformers WORD_EMBEDDING = fromString("WordEmbedding"); - /** Static value NaiveBayes for BlockedTransformers. */ + /** + * Static value NaiveBayes for BlockedTransformers. + */ public static final BlockedTransformers NAIVE_BAYES = fromString("NaiveBayes"); - /** Static value CountVectorizer for BlockedTransformers. */ + /** + * Static value CountVectorizer for BlockedTransformers. + */ public static final BlockedTransformers COUNT_VECTORIZER = fromString("CountVectorizer"); - /** Static value HashOneHotEncoder for BlockedTransformers. */ + /** + * Static value HashOneHotEncoder for BlockedTransformers. + */ public static final BlockedTransformers HASH_ONE_HOT_ENCODER = fromString("HashOneHotEncoder"); /** * Creates a new instance of BlockedTransformers value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -51,7 +73,7 @@ public BlockedTransformers() { /** * Creates or finds a BlockedTransformers from its string representation. - * + * * @param name a name to look for. * @return the corresponding BlockedTransformers. */ @@ -62,7 +84,7 @@ public static BlockedTransformers fromString(String name) { /** * Gets known BlockedTransformers values. - * + * * @return known BlockedTransformers values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java index 5ee7e93ad42bd..ecea196c34478 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration settings for Docker build context. */ +/** + * Configuration settings for Docker build context. + */ @Fluent public final class BuildContext { /* @@ -26,15 +28,17 @@ public final class BuildContext { @JsonProperty(value = "dockerfilePath") private String dockerfilePath; - /** Creates an instance of BuildContext class. */ + /** + * Creates an instance of BuildContext class. + */ public BuildContext() { } /** * Get the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob - * URIs on environment creation and may return blob or Git URIs. <seealso - * href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. - * + * URIs on environment creation and may return blob or Git URIs. + * <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. + * * @return the contextUri value. */ public String contextUri() { @@ -43,9 +47,9 @@ public String contextUri() { /** * Set the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob - * URIs on environment creation and may return blob or Git URIs. <seealso - * href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. - * + * URIs on environment creation and may return blob or Git URIs. + * <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. + * * @param contextUri the contextUri value to set. * @return the BuildContext object itself. */ @@ -55,9 +59,9 @@ public BuildContext withContextUri(String contextUri) { } /** - * Get the dockerfilePath property: Path to the Dockerfile in the build context. <seealso - * href="https://docs.docker.com/engine/reference/builder/" />. - * + * Get the dockerfilePath property: Path to the Dockerfile in the build context. + * <seealso href="https://docs.docker.com/engine/reference/builder/" />. + * * @return the dockerfilePath value. */ public String dockerfilePath() { @@ -65,9 +69,9 @@ public String dockerfilePath() { } /** - * Set the dockerfilePath property: Path to the Dockerfile in the build context. <seealso - * href="https://docs.docker.com/engine/reference/builder/" />. - * + * Set the dockerfilePath property: Path to the Dockerfile in the build context. + * <seealso href="https://docs.docker.com/engine/reference/builder/" />. + * * @param dockerfilePath the dockerfilePath value to set. * @return the BuildContext object itself. */ @@ -78,14 +82,13 @@ public BuildContext withDockerfilePath(String dockerfilePath) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (contextUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property contextUri in model BuildContext")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property contextUri in model BuildContext")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java index 8ada219906473..1b708c3f886f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Caching type of Data Disk. */ +/** + * Caching type of Data Disk. + */ public final class Caching extends ExpandableStringEnum { - /** Static value None for Caching. */ + /** + * Static value None for Caching. + */ public static final Caching NONE = fromString("None"); - /** Static value ReadOnly for Caching. */ + /** + * Static value ReadOnly for Caching. + */ public static final Caching READ_ONLY = fromString("ReadOnly"); - /** Static value ReadWrite for Caching. */ + /** + * Static value ReadWrite for Caching. + */ public static final Caching READ_WRITE = fromString("ReadWrite"); /** * Creates a new instance of Caching value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public Caching() { /** * Creates or finds a Caching from its string representation. - * + * * @param name a name to look for. * @return the corresponding Caching. */ @@ -41,7 +49,7 @@ public static Caching fromString(String name) { /** * Gets known Caching values. - * + * * @return known Caching values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CallRateLimit.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CallRateLimit.java new file mode 100644 index 0000000000000..ed318d6f34c31 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CallRateLimit.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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The call rate limit Cognitive Services account. + */ +@Fluent +public final class CallRateLimit { + /* + * The count value of Call Rate Limit. + */ + @JsonProperty(value = "count") + private Float count; + + /* + * The renewal period in seconds of Call Rate Limit. + */ + @JsonProperty(value = "renewalPeriod") + private Float renewalPeriod; + + /* + * The rules property. + */ + @JsonProperty(value = "rules") + private List rules; + + /** + * Creates an instance of CallRateLimit class. + */ + public CallRateLimit() { + } + + /** + * Get the count property: The count value of Call Rate Limit. + * + * @return the count value. + */ + public Float count() { + return this.count; + } + + /** + * Set the count property: The count value of Call Rate Limit. + * + * @param count the count value to set. + * @return the CallRateLimit object itself. + */ + public CallRateLimit withCount(Float count) { + this.count = count; + return this; + } + + /** + * Get the renewalPeriod property: The renewal period in seconds of Call Rate Limit. + * + * @return the renewalPeriod value. + */ + public Float renewalPeriod() { + return this.renewalPeriod; + } + + /** + * Set the renewalPeriod property: The renewal period in seconds of Call Rate Limit. + * + * @param renewalPeriod the renewalPeriod value to set. + * @return the CallRateLimit object itself. + */ + public CallRateLimit withRenewalPeriod(Float renewalPeriod) { + this.renewalPeriod = renewalPeriod; + return this; + } + + /** + * Get the rules property: The rules property. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: The rules property. + * + * @param rules the rules value to set. + * @return the CallRateLimit object itself. + */ + public CallRateLimit withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityConfig.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityConfig.java new file mode 100644 index 0000000000000..3034cd0ce7ff2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityConfig.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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The capacity configuration. + */ +@Fluent +public final class CapacityConfig { + /* + * The minimum capacity. + */ + @JsonProperty(value = "minimum") + private Integer minimum; + + /* + * The maximum capacity. + */ + @JsonProperty(value = "maximum") + private Integer maximum; + + /* + * The minimal incremental between allowed values for capacity. + */ + @JsonProperty(value = "step") + private Integer step; + + /* + * The default capacity. + */ + @JsonProperty(value = "default") + private Integer defaultProperty; + + /* + * The array of allowed values for capacity. + */ + @JsonProperty(value = "allowedValues") + private List allowedValues; + + /** + * Creates an instance of CapacityConfig class. + */ + public CapacityConfig() { + } + + /** + * Get the minimum property: The minimum capacity. + * + * @return the minimum value. + */ + public Integer minimum() { + return this.minimum; + } + + /** + * Set the minimum property: The minimum capacity. + * + * @param minimum the minimum value to set. + * @return the CapacityConfig object itself. + */ + public CapacityConfig withMinimum(Integer minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the maximum property: The maximum capacity. + * + * @return the maximum value. + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Set the maximum property: The maximum capacity. + * + * @param maximum the maximum value to set. + * @return the CapacityConfig object itself. + */ + public CapacityConfig withMaximum(Integer maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the step property: The minimal incremental between allowed values for capacity. + * + * @return the step value. + */ + public Integer step() { + return this.step; + } + + /** + * Set the step property: The minimal incremental between allowed values for capacity. + * + * @param step the step value to set. + * @return the CapacityConfig object itself. + */ + public CapacityConfig withStep(Integer step) { + this.step = step; + return this; + } + + /** + * Get the defaultProperty property: The default capacity. + * + * @return the defaultProperty value. + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: The default capacity. + * + * @param defaultProperty the defaultProperty value to set. + * @return the CapacityConfig object itself. + */ + public CapacityConfig withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the allowedValues property: The array of allowed values for capacity. + * + * @return the allowedValues value. + */ + public List allowedValues() { + return this.allowedValues; + } + + /** + * Set the allowedValues property: The array of allowed values for capacity. + * + * @param allowedValues the allowedValues value to set. + * @return the CapacityConfig object itself. + */ + public CapacityConfig withAllowedValues(List allowedValues) { + this.allowedValues = allowedValues; + 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/CapacityReservationGroup.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroup.java new file mode 100644 index 0000000000000..4c1db2c294f70 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroup.java @@ -0,0 +1,344 @@ +// Copyright (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.CapacityReservationGroupInner; +import java.util.Map; + +/** + * An immutable client-side representation of CapacityReservationGroup. + */ +public interface CapacityReservationGroup { + /** + * 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 properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + CapacityReservationGroupProperties properties(); + + /** + * 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 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.CapacityReservationGroupInner object. + * + * @return the inner object. + */ + CapacityReservationGroupInner innerModel(); + + /** + * The entirety of the CapacityReservationGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The CapacityReservationGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the CapacityReservationGroup definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the CapacityReservationGroup 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 CapacityReservationGroup 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. + */ + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the CapacityReservationGroup 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(CapacityReservationGroupProperties properties); + } + + /** + * The stage of the CapacityReservationGroup 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + CapacityReservationGroup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CapacityReservationGroup create(Context context); + } + + /** + * The stage of the CapacityReservationGroup 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 CapacityReservationGroup 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 CapacityReservationGroup 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 CapacityReservationGroup 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); + } + } + + /** + * Begins update for the CapacityReservationGroup resource. + * + * @return the stage of resource update. + */ + CapacityReservationGroup.Update update(); + + /** + * The template for CapacityReservationGroup update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CapacityReservationGroup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CapacityReservationGroup apply(Context context); + } + + /** + * The CapacityReservationGroup update stages. + */ + interface UpdateStages { + /** + * The stage of the CapacityReservationGroup 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 CapacityReservationGroup 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(PartialManagedServiceIdentity identity); + } + + /** + * The stage of the CapacityReservationGroup 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. + */ + CapacityReservationGroup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CapacityReservationGroup refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroupProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroupProperties.java new file mode 100644 index 0000000000000..581ea6ccefe2a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroupProperties.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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CapacityReservationGroupProperties model. + */ +@Fluent +public final class CapacityReservationGroupProperties { + /* + * Offer used by this capacity reservation group. + */ + @JsonProperty(value = "offer") + private ServerlessOffer offer; + + /* + * [Required] Specifies the amount of capacity to reserve. + */ + @JsonProperty(value = "reservedCapacity", required = true) + private int reservedCapacity; + + /** + * Creates an instance of CapacityReservationGroupProperties class. + */ + public CapacityReservationGroupProperties() { + } + + /** + * Get the offer property: Offer used by this capacity reservation group. + * + * @return the offer value. + */ + public ServerlessOffer offer() { + return this.offer; + } + + /** + * Set the offer property: Offer used by this capacity reservation group. + * + * @param offer the offer value to set. + * @return the CapacityReservationGroupProperties object itself. + */ + public CapacityReservationGroupProperties withOffer(ServerlessOffer offer) { + this.offer = offer; + return this; + } + + /** + * Get the reservedCapacity property: [Required] Specifies the amount of capacity to reserve. + * + * @return the reservedCapacity value. + */ + public int reservedCapacity() { + return this.reservedCapacity; + } + + /** + * Set the reservedCapacity property: [Required] Specifies the amount of capacity to reserve. + * + * @param reservedCapacity the reservedCapacity value to set. + * @return the CapacityReservationGroupProperties object itself. + */ + public CapacityReservationGroupProperties withReservedCapacity(int reservedCapacity) { + this.reservedCapacity = reservedCapacity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (offer() != null) { + offer().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroupTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroupTrackedResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..c4b88f5bdd4fb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroupTrackedResourceArmPaginatedResult.java @@ -0,0 +1,88 @@ +// Copyright (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.CapacityReservationGroupInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A paginated list of CapacityReservationGroup entities. + */ +@Fluent +public final class CapacityReservationGroupTrackedResourceArmPaginatedResult { + /* + * The link to the next page of CapacityReservationGroup objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type CapacityReservationGroup. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of CapacityReservationGroupTrackedResourceArmPaginatedResult class. + */ + public CapacityReservationGroupTrackedResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of CapacityReservationGroup 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 CapacityReservationGroup objects. If null, there are no + * additional pages. + * + * @param nextLink the nextLink value to set. + * @return the CapacityReservationGroupTrackedResourceArmPaginatedResult object itself. + */ + public CapacityReservationGroupTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type CapacityReservationGroup. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type CapacityReservationGroup. + * + * @param value the value value to set. + * @return the CapacityReservationGroupTrackedResourceArmPaginatedResult object itself. + */ + public CapacityReservationGroupTrackedResourceArmPaginatedResult + 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/CapacityReservationGroups.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroups.java new file mode 100644 index 0000000000000..51570bc7bf1b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapacityReservationGroups.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 CapacityReservationGroups. + */ +public interface CapacityReservationGroups { + /** + * List CapacityReservationGroups 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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List CapacityReservationGroups by subscription. + * + * @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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String skip, Context context); + + /** + * Lists CapacityReservationGroups. + * + * @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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists CapacityReservationGroups. + * + * @param resourceGroupName The name of the resource group. The name 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 CapacityReservationGroup entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); + + /** + * Delete CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByResourceGroupWithResponse(String resourceGroupName, String groupId, Context context); + + /** + * Delete CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group 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 deleteByResourceGroup(String resourceGroupName, String groupId); + + /** + * Get CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group 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 capacityReservationGroup along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String groupId, + Context context); + + /** + * Get CapacityReservationGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param groupId Group 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 capacityReservationGroup. + */ + CapacityReservationGroup getByResourceGroup(String resourceGroupName, String groupId); + + /** + * Get CapacityReservationGroup. + * + * @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 capacityReservationGroup along with {@link Response}. + */ + CapacityReservationGroup getById(String id); + + /** + * Get CapacityReservationGroup. + * + * @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 capacityReservationGroup along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete CapacityReservationGroup. + * + * @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 CapacityReservationGroup. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CapacityReservationGroup resource. + * + * @param name resource name. + * @return the first stage of the new CapacityReservationGroup definition. + */ + CapacityReservationGroup.DefinitionStages.Blank define(String name); +} 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..7a72d0c248721 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.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.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..3a54221823e51 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.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.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..4cf995d927da8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.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.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..59e309a1f1954 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.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.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..39a3e0731b1b4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.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.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..faccab945d4f7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.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.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..be3431c3741d4 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.UUID; -/** Certificate datastore credentials configuration. */ +/** + * Certificate datastore credentials configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") @JsonTypeName("Certificate") @Fluent @@ -37,7 +39,7 @@ public final class CertificateDatastoreCredentials extends DatastoreCredentials /* * [Required] Service principal secrets. */ - @JsonProperty(value = "secrets", required = true) + @JsonProperty(value = "secrets") private CertificateDatastoreSecrets secrets; /* @@ -52,13 +54,15 @@ public final class CertificateDatastoreCredentials extends DatastoreCredentials @JsonProperty(value = "thumbprint", required = true) private String thumbprint; - /** Creates an instance of CertificateDatastoreCredentials class. */ + /** + * Creates an instance of CertificateDatastoreCredentials class. + */ public CertificateDatastoreCredentials() { } /** * Get the authorityUrl property: Authority URL used for authentication. - * + * * @return the authorityUrl value. */ public String authorityUrl() { @@ -67,7 +71,7 @@ public String authorityUrl() { /** * Set the authorityUrl property: Authority URL used for authentication. - * + * * @param authorityUrl the authorityUrl value to set. * @return the CertificateDatastoreCredentials object itself. */ @@ -78,7 +82,7 @@ public CertificateDatastoreCredentials withAuthorityUrl(String authorityUrl) { /** * Get the clientId property: [Required] Service principal client ID. - * + * * @return the clientId value. */ public UUID clientId() { @@ -87,7 +91,7 @@ public UUID clientId() { /** * Set the clientId property: [Required] Service principal client ID. - * + * * @param clientId the clientId value to set. * @return the CertificateDatastoreCredentials object itself. */ @@ -98,7 +102,7 @@ public CertificateDatastoreCredentials withClientId(UUID clientId) { /** * Get the resourceUrl property: Resource the service principal has access to. - * + * * @return the resourceUrl value. */ public String resourceUrl() { @@ -107,7 +111,7 @@ public String resourceUrl() { /** * Set the resourceUrl property: Resource the service principal has access to. - * + * * @param resourceUrl the resourceUrl value to set. * @return the CertificateDatastoreCredentials object itself. */ @@ -118,7 +122,7 @@ public CertificateDatastoreCredentials withResourceUrl(String resourceUrl) { /** * Get the secrets property: [Required] Service principal secrets. - * + * * @return the secrets value. */ public CertificateDatastoreSecrets secrets() { @@ -127,7 +131,7 @@ public CertificateDatastoreSecrets secrets() { /** * Set the secrets property: [Required] Service principal secrets. - * + * * @param secrets the secrets value to set. * @return the CertificateDatastoreCredentials object itself. */ @@ -138,7 +142,7 @@ public CertificateDatastoreCredentials withSecrets(CertificateDatastoreSecrets s /** * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -147,7 +151,7 @@ public UUID tenantId() { /** * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. - * + * * @param tenantId the tenantId value to set. * @return the CertificateDatastoreCredentials object itself. */ @@ -158,7 +162,7 @@ public CertificateDatastoreCredentials withTenantId(UUID tenantId) { /** * Get the thumbprint property: [Required] Thumbprint of the certificate used for authentication. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -167,7 +171,7 @@ public String thumbprint() { /** * Set the thumbprint property: [Required] Thumbprint of the certificate used for authentication. - * + * * @param thumbprint the thumbprint value to set. * @return the CertificateDatastoreCredentials object itself. */ @@ -178,37 +182,29 @@ public CertificateDatastoreCredentials withThumbprint(String thumbprint) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (clientId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clientId in model CertificateDatastoreCredentials")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clientId in model CertificateDatastoreCredentials")); } if (secrets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secrets in model CertificateDatastoreCredentials")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property secrets in model CertificateDatastoreCredentials")); } else { secrets().validate(); } if (tenantId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property tenantId in model CertificateDatastoreCredentials")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property tenantId in model CertificateDatastoreCredentials")); } if (thumbprint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property thumbprint in model CertificateDatastoreCredentials")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property thumbprint in model CertificateDatastoreCredentials")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java index 9024d4497f717..b51327030fbc4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Datastore certificate secrets. */ +/** + * Datastore certificate secrets. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") @JsonTypeName("Certificate") @Fluent @@ -21,13 +23,15 @@ public final class CertificateDatastoreSecrets extends DatastoreSecretsInner { @JsonProperty(value = "certificate") private String certificate; - /** Creates an instance of CertificateDatastoreSecrets class. */ + /** + * Creates an instance of CertificateDatastoreSecrets class. + */ public CertificateDatastoreSecrets() { } /** * Get the certificate property: Service principal certificate. - * + * * @return the certificate value. */ public String certificate() { @@ -36,7 +40,7 @@ public String certificate() { /** * Set the certificate property: Service principal certificate. - * + * * @param certificate the certificate value to set. * @return the CertificateDatastoreSecrets object itself. */ @@ -47,7 +51,7 @@ public CertificateDatastoreSecrets withCertificate(String certificate) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java index 2a6e376d9a349..68989841532bf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Classification task in AutoML Table vertical. */ +/** + * Classification task in AutoML Table vertical. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Classification") @Fluent @@ -45,6 +47,12 @@ public final class Classification extends AutoMLVertical { @JsonProperty(value = "featurizationSettings") private TableVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private TableFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @@ -58,6 +66,18 @@ public final class Classification extends AutoMLVertical { @JsonProperty(value = "nCrossValidations") private NCrossValidations nCrossValidations; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private TableSweepSettings sweepSettings; + /* * Test data input. */ @@ -93,13 +113,15 @@ public final class Classification extends AutoMLVertical { @JsonProperty(value = "weightColumnName") private String weightColumnName; - /** Creates an instance of Classification class. */ + /** + * Creates an instance of Classification class. + */ public Classification() { } /** * Get the positiveLabel property: Positive label for binary metrics calculation. - * + * * @return the positiveLabel value. */ public String positiveLabel() { @@ -108,7 +130,7 @@ public String positiveLabel() { /** * Set the positiveLabel property: Positive label for binary metrics calculation. - * + * * @param positiveLabel the positiveLabel value to set. * @return the Classification object itself. */ @@ -119,7 +141,7 @@ public Classification withPositiveLabel(String positiveLabel) { /** * Get the primaryMetric property: Primary metric for the task. - * + * * @return the primaryMetric value. */ public ClassificationPrimaryMetrics primaryMetric() { @@ -128,7 +150,7 @@ public ClassificationPrimaryMetrics primaryMetric() { /** * Set the primaryMetric property: Primary metric for the task. - * + * * @param primaryMetric the primaryMetric value to set. * @return the Classification object itself. */ @@ -139,7 +161,7 @@ public Classification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetr /** * Get the trainingSettings property: Inputs for training phase for an AutoML Job. - * + * * @return the trainingSettings value. */ public ClassificationTrainingSettings trainingSettings() { @@ -148,7 +170,7 @@ public ClassificationTrainingSettings trainingSettings() { /** * Set the trainingSettings property: Inputs for training phase for an AutoML Job. - * + * * @param trainingSettings the trainingSettings value to set. * @return the Classification object itself. */ @@ -159,7 +181,7 @@ public Classification withTrainingSettings(ClassificationTrainingSettings traini /** * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * + * * @return the cvSplitColumnNames value. */ public List cvSplitColumnNames() { @@ -168,7 +190,7 @@ public List cvSplitColumnNames() { /** * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * + * * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the Classification object itself. */ @@ -179,7 +201,7 @@ public Classification withCvSplitColumnNames(List cvSplitColumnNames) { /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @return the featurizationSettings value. */ public TableVerticalFeaturizationSettings featurizationSettings() { @@ -188,7 +210,7 @@ public TableVerticalFeaturizationSettings featurizationSettings() { /** * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @param featurizationSettings the featurizationSettings value to set. * @return the Classification object itself. */ @@ -197,9 +219,29 @@ public Classification withFeaturizationSettings(TableVerticalFeaturizationSettin return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public TableFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the Classification object itself. + */ + public Classification withFixedParameters(TableFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. - * + * * @return the limitSettings value. */ public TableVerticalLimitSettings limitSettings() { @@ -208,7 +250,7 @@ public TableVerticalLimitSettings limitSettings() { /** * Set the limitSettings property: Execution constraints for AutoMLJob. - * + * * @param limitSettings the limitSettings value to set. * @return the Classification object itself. */ @@ -218,9 +260,9 @@ public Classification withLimitSettings(TableVerticalLimitSettings limitSettings } /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * + * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. + * * @return the nCrossValidations value. */ public NCrossValidations nCrossValidations() { @@ -228,9 +270,9 @@ public NCrossValidations nCrossValidations() { } /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * + * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. + * * @param nCrossValidations the nCrossValidations value to set. * @return the Classification object itself. */ @@ -239,9 +281,51 @@ public Classification withNCrossValidations(NCrossValidations nCrossValidations) return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the Classification object itself. + */ + public Classification withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public TableSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the Classification object itself. + */ + public Classification withSweepSettings(TableSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + /** * Get the testData property: Test data input. - * + * * @return the testData value. */ public MLTableJobInput testData() { @@ -250,7 +334,7 @@ public MLTableJobInput testData() { /** * Set the testData property: Test data input. - * + * * @param testData the testData value to set. * @return the Classification object itself. */ @@ -261,8 +345,9 @@ public Classification withTestData(MLTableJobInput testData) { /** * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the testDataSize value. */ public Double testDataSize() { @@ -271,8 +356,9 @@ public Double testDataSize() { /** * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param testDataSize the testDataSize value to set. * @return the Classification object itself. */ @@ -283,7 +369,7 @@ public Classification withTestDataSize(Double testDataSize) { /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -292,7 +378,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the Classification object itself. */ @@ -303,8 +389,10 @@ public Classification withValidationData(MLTableJobInput validationData) { /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the validationDataSize value. */ public Double validationDataSize() { @@ -313,8 +401,10 @@ public Double validationDataSize() { /** * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param validationDataSize the validationDataSize value to set. * @return the Classification object itself. */ @@ -326,7 +416,7 @@ public Classification withValidationDataSize(Double validationDataSize) { /** * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column * as an input, causing rows in the data to be weighted up or down. - * + * * @return the weightColumnName value. */ public String weightColumnName() { @@ -336,7 +426,7 @@ public String weightColumnName() { /** * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column * as an input, causing rows in the data to be weighted up or down. - * + * * @param weightColumnName the weightColumnName value to set. * @return the Classification object itself. */ @@ -345,21 +435,27 @@ public Classification withWeightColumnName(String weightColumnName) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Classification withLogVerbosity(LogVerbosity logVerbosity) { super.withLogVerbosity(logVerbosity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Classification withTargetColumnName(String targetColumnName) { super.withTargetColumnName(targetColumnName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Classification withTrainingData(MLTableJobInput trainingData) { super.withTrainingData(trainingData); @@ -368,7 +464,7 @@ public Classification withTrainingData(MLTableJobInput trainingData) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -380,12 +476,21 @@ public void validate() { if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } if (nCrossValidations() != null) { nCrossValidations().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } if (testData() != null) { testData().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModelPerformanceMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModelPerformanceMetric.java new file mode 100644 index 0000000000000..7914e3658d9ae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModelPerformanceMetric.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; + +/** + * Defines values for ClassificationModelPerformanceMetric. + */ +public final class ClassificationModelPerformanceMetric + extends ExpandableStringEnum { + /** + * Static value Accuracy for ClassificationModelPerformanceMetric. + */ + public static final ClassificationModelPerformanceMetric ACCURACY = fromString("Accuracy"); + + /** + * Static value Precision for ClassificationModelPerformanceMetric. + */ + public static final ClassificationModelPerformanceMetric PRECISION = fromString("Precision"); + + /** + * Static value Recall for ClassificationModelPerformanceMetric. + */ + public static final ClassificationModelPerformanceMetric RECALL = fromString("Recall"); + + /** + * Creates a new instance of ClassificationModelPerformanceMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClassificationModelPerformanceMetric() { + } + + /** + * Creates or finds a ClassificationModelPerformanceMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClassificationModelPerformanceMetric. + */ + @JsonCreator + public static ClassificationModelPerformanceMetric fromString(String name) { + return fromString(name, ClassificationModelPerformanceMetric.class); + } + + /** + * Gets known ClassificationModelPerformanceMetric values. + * + * @return known ClassificationModelPerformanceMetric values. + */ + public static Collection values() { + return values(ClassificationModelPerformanceMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModelPerformanceMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModelPerformanceMetricThreshold.java new file mode 100644 index 0000000000000..babac88d0e230 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModelPerformanceMetricThreshold.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The ClassificationModelPerformanceMetricThreshold model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "modelType") +@JsonTypeName("Classification") +@Fluent +public final class ClassificationModelPerformanceMetricThreshold extends ModelPerformanceMetricThresholdBase { + /* + * [Required] The classification model performance to calculate. + */ + @JsonProperty(value = "metric", required = true) + private ClassificationModelPerformanceMetric metric; + + /** + * Creates an instance of ClassificationModelPerformanceMetricThreshold class. + */ + public ClassificationModelPerformanceMetricThreshold() { + } + + /** + * Get the metric property: [Required] The classification model performance to calculate. + * + * @return the metric value. + */ + public ClassificationModelPerformanceMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The classification model performance to calculate. + * + * @param metric the metric value to set. + * @return the ClassificationModelPerformanceMetricThreshold object itself. + */ + public ClassificationModelPerformanceMetricThreshold withMetric(ClassificationModelPerformanceMetric metric) { + this.metric = metric; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ClassificationModelPerformanceMetricThreshold 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 ClassificationModelPerformanceMetricThreshold")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClassificationModelPerformanceMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java index 362a874a3e1e1..d00492ad6347a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java @@ -8,50 +8,78 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum for all classification models supported by AutoML. */ +/** + * Enum for all classification models supported by AutoML. + */ public final class ClassificationModels extends ExpandableStringEnum { - /** Static value LogisticRegression for ClassificationModels. */ + /** + * Static value LogisticRegression for ClassificationModels. + */ public static final ClassificationModels LOGISTIC_REGRESSION = fromString("LogisticRegression"); - /** Static value SGD for ClassificationModels. */ + /** + * Static value SGD for ClassificationModels. + */ public static final ClassificationModels SGD = fromString("SGD"); - /** Static value MultinomialNaiveBayes for ClassificationModels. */ + /** + * Static value MultinomialNaiveBayes for ClassificationModels. + */ public static final ClassificationModels MULTINOMIAL_NAIVE_BAYES = fromString("MultinomialNaiveBayes"); - /** Static value BernoulliNaiveBayes for ClassificationModels. */ + /** + * Static value BernoulliNaiveBayes for ClassificationModels. + */ public static final ClassificationModels BERNOULLI_NAIVE_BAYES = fromString("BernoulliNaiveBayes"); - /** Static value SVM for ClassificationModels. */ + /** + * Static value SVM for ClassificationModels. + */ public static final ClassificationModels SVM = fromString("SVM"); - /** Static value LinearSVM for ClassificationModels. */ + /** + * Static value LinearSVM for ClassificationModels. + */ public static final ClassificationModels LINEAR_SVM = fromString("LinearSVM"); - /** Static value KNN for ClassificationModels. */ + /** + * Static value KNN for ClassificationModels. + */ public static final ClassificationModels KNN = fromString("KNN"); - /** Static value DecisionTree for ClassificationModels. */ + /** + * Static value DecisionTree for ClassificationModels. + */ public static final ClassificationModels DECISION_TREE = fromString("DecisionTree"); - /** Static value RandomForest for ClassificationModels. */ + /** + * Static value RandomForest for ClassificationModels. + */ public static final ClassificationModels RANDOM_FOREST = fromString("RandomForest"); - /** Static value ExtremeRandomTrees for ClassificationModels. */ + /** + * Static value ExtremeRandomTrees for ClassificationModels. + */ public static final ClassificationModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); - /** Static value LightGBM for ClassificationModels. */ + /** + * Static value LightGBM for ClassificationModels. + */ public static final ClassificationModels LIGHT_GBM = fromString("LightGBM"); - /** Static value GradientBoosting for ClassificationModels. */ + /** + * Static value GradientBoosting for ClassificationModels. + */ public static final ClassificationModels GRADIENT_BOOSTING = fromString("GradientBoosting"); - /** Static value XGBoostClassifier for ClassificationModels. */ + /** + * Static value XGBoostClassifier for ClassificationModels. + */ public static final ClassificationModels XGBOOST_CLASSIFIER = fromString("XGBoostClassifier"); /** * Creates a new instance of ClassificationModels value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -60,7 +88,7 @@ public ClassificationModels() { /** * Creates or finds a ClassificationModels from its string representation. - * + * * @param name a name to look for. * @return the corresponding ClassificationModels. */ @@ -71,7 +99,7 @@ public static ClassificationModels fromString(String name) { /** * Gets known ClassificationModels values. - * + * * @return known ClassificationModels values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java index 9e75aa49e8a8c..98a09e698b70a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java @@ -8,32 +8,46 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Primary metrics for classification multilabel tasks. */ +/** + * Primary metrics for classification multilabel tasks. + */ public final class ClassificationMultilabelPrimaryMetrics extends ExpandableStringEnum { - /** Static value AUCWeighted for ClassificationMultilabelPrimaryMetrics. */ + /** + * Static value AUCWeighted for ClassificationMultilabelPrimaryMetrics. + */ public static final ClassificationMultilabelPrimaryMetrics AUCWEIGHTED = fromString("AUCWeighted"); - /** Static value Accuracy for ClassificationMultilabelPrimaryMetrics. */ + /** + * Static value Accuracy for ClassificationMultilabelPrimaryMetrics. + */ public static final ClassificationMultilabelPrimaryMetrics ACCURACY = fromString("Accuracy"); - /** Static value NormMacroRecall for ClassificationMultilabelPrimaryMetrics. */ + /** + * Static value NormMacroRecall for ClassificationMultilabelPrimaryMetrics. + */ public static final ClassificationMultilabelPrimaryMetrics NORM_MACRO_RECALL = fromString("NormMacroRecall"); - /** Static value AveragePrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. */ - public static final ClassificationMultilabelPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED = - fromString("AveragePrecisionScoreWeighted"); + /** + * Static value AveragePrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. + */ + public static final ClassificationMultilabelPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED + = fromString("AveragePrecisionScoreWeighted"); - /** Static value PrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. */ - public static final ClassificationMultilabelPrimaryMetrics PRECISION_SCORE_WEIGHTED = - fromString("PrecisionScoreWeighted"); + /** + * Static value PrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. + */ + public static final ClassificationMultilabelPrimaryMetrics PRECISION_SCORE_WEIGHTED + = fromString("PrecisionScoreWeighted"); - /** Static value IOU for ClassificationMultilabelPrimaryMetrics. */ + /** + * Static value IOU for ClassificationMultilabelPrimaryMetrics. + */ public static final ClassificationMultilabelPrimaryMetrics IOU = fromString("IOU"); /** * Creates a new instance of ClassificationMultilabelPrimaryMetrics value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +56,7 @@ public ClassificationMultilabelPrimaryMetrics() { /** * Creates or finds a ClassificationMultilabelPrimaryMetrics from its string representation. - * + * * @param name a name to look for. * @return the corresponding ClassificationMultilabelPrimaryMetrics. */ @@ -53,7 +67,7 @@ public static ClassificationMultilabelPrimaryMetrics fromString(String name) { /** * Gets known ClassificationMultilabelPrimaryMetrics values. - * + * * @return known ClassificationMultilabelPrimaryMetrics values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java index 5c3d5c4eaf341..69f104226e511 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java @@ -8,27 +8,39 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Primary metrics for classification tasks. */ +/** + * Primary metrics for classification tasks. + */ public final class ClassificationPrimaryMetrics extends ExpandableStringEnum { - /** Static value AUCWeighted for ClassificationPrimaryMetrics. */ + /** + * Static value AUCWeighted for ClassificationPrimaryMetrics. + */ public static final ClassificationPrimaryMetrics AUCWEIGHTED = fromString("AUCWeighted"); - /** Static value Accuracy for ClassificationPrimaryMetrics. */ + /** + * Static value Accuracy for ClassificationPrimaryMetrics. + */ public static final ClassificationPrimaryMetrics ACCURACY = fromString("Accuracy"); - /** Static value NormMacroRecall for ClassificationPrimaryMetrics. */ + /** + * Static value NormMacroRecall for ClassificationPrimaryMetrics. + */ public static final ClassificationPrimaryMetrics NORM_MACRO_RECALL = fromString("NormMacroRecall"); - /** Static value AveragePrecisionScoreWeighted for ClassificationPrimaryMetrics. */ - public static final ClassificationPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED = - fromString("AveragePrecisionScoreWeighted"); + /** + * Static value AveragePrecisionScoreWeighted for ClassificationPrimaryMetrics. + */ + public static final ClassificationPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED + = fromString("AveragePrecisionScoreWeighted"); - /** Static value PrecisionScoreWeighted for ClassificationPrimaryMetrics. */ + /** + * Static value PrecisionScoreWeighted for ClassificationPrimaryMetrics. + */ public static final ClassificationPrimaryMetrics PRECISION_SCORE_WEIGHTED = fromString("PrecisionScoreWeighted"); /** * Creates a new instance of ClassificationPrimaryMetrics value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -37,7 +49,7 @@ public ClassificationPrimaryMetrics() { /** * Creates or finds a ClassificationPrimaryMetrics from its string representation. - * + * * @param name a name to look for. * @return the corresponding ClassificationPrimaryMetrics. */ @@ -48,7 +60,7 @@ public static ClassificationPrimaryMetrics fromString(String name) { /** * Gets known ClassificationPrimaryMetrics values. - * + * * @return known ClassificationPrimaryMetrics values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java index bd667f5bbbc4b..ab63cbc6b062d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java @@ -9,7 +9,9 @@ import java.time.Duration; import java.util.List; -/** Classification Training related configuration. */ +/** + * Classification Training related configuration. + */ @Fluent public final class ClassificationTrainingSettings extends TrainingSettings { /* @@ -24,13 +26,15 @@ public final class ClassificationTrainingSettings extends TrainingSettings { @JsonProperty(value = "blockedTrainingAlgorithms") private List blockedTrainingAlgorithms; - /** Creates an instance of ClassificationTrainingSettings class. */ + /** + * Creates an instance of ClassificationTrainingSettings class. + */ public ClassificationTrainingSettings() { } /** * Get the allowedTrainingAlgorithms property: Allowed models for classification task. - * + * * @return the allowedTrainingAlgorithms value. */ public List allowedTrainingAlgorithms() { @@ -39,19 +43,19 @@ public List allowedTrainingAlgorithms() { /** * Set the allowedTrainingAlgorithms property: Allowed models for classification task. - * + * * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. * @return the ClassificationTrainingSettings object itself. */ - public ClassificationTrainingSettings withAllowedTrainingAlgorithms( - List allowedTrainingAlgorithms) { + public ClassificationTrainingSettings + withAllowedTrainingAlgorithms(List allowedTrainingAlgorithms) { this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; return this; } /** * Get the blockedTrainingAlgorithms property: Blocked models for classification task. - * + * * @return the blockedTrainingAlgorithms value. */ public List blockedTrainingAlgorithms() { @@ -60,68 +64,91 @@ public List blockedTrainingAlgorithms() { /** * Set the blockedTrainingAlgorithms property: Blocked models for classification task. - * + * * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. * @return the ClassificationTrainingSettings object itself. */ - public ClassificationTrainingSettings withBlockedTrainingAlgorithms( - List blockedTrainingAlgorithms) { + public ClassificationTrainingSettings + withBlockedTrainingAlgorithms(List blockedTrainingAlgorithms) { this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClassificationTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { super.withEnableDnnTraining(enableDnnTraining); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClassificationTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { super.withEnableModelExplainability(enableModelExplainability); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { super.withEnableStackEnsemble(enableStackEnsemble); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { super.withEnableVoteEnsemble(enableVoteEnsemble); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { super.withStackEnsembleSettings(stackEnsembleSettings); return this; } + /** + * {@inheritDoc} + */ + @Override + public ClassificationTrainingSettings withTrainingMode(TrainingMode trainingMode) { + super.withTrainingMode(trainingMode); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java index 5a45258121559..46d071c4e5b7f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Intended usage of the cluster. */ +/** + * Intended usage of the cluster. + */ public final class ClusterPurpose extends ExpandableStringEnum { - /** Static value FastProd for ClusterPurpose. */ + /** + * Static value FastProd for ClusterPurpose. + */ public static final ClusterPurpose FAST_PROD = fromString("FastProd"); - /** Static value DenseProd for ClusterPurpose. */ + /** + * Static value DenseProd for ClusterPurpose. + */ public static final ClusterPurpose DENSE_PROD = fromString("DenseProd"); - /** Static value DevTest for ClusterPurpose. */ + /** + * Static value DevTest for ClusterPurpose. + */ public static final ClusterPurpose DEV_TEST = fromString("DevTest"); /** * Creates a new instance of ClusterPurpose value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ClusterPurpose() { /** * Creates or finds a ClusterPurpose from its string representation. - * + * * @param name a name to look for. * @return the corresponding ClusterPurpose. */ @@ -41,7 +49,7 @@ public static ClusterPurpose fromString(String name) { /** * Gets known ClusterPurpose values. - * + * * @return known ClusterPurpose values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java index e375b833b2bf9..15dcb83f53f99 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** AmlCompute update parameters. */ +/** + * AmlCompute update parameters. + */ @Fluent public final class ClusterUpdateParameters { /* @@ -17,13 +19,15 @@ public final class ClusterUpdateParameters { @JsonProperty(value = "properties") private ClusterUpdateProperties innerProperties; - /** Creates an instance of ClusterUpdateParameters class. */ + /** + * Creates an instance of ClusterUpdateParameters class. + */ public ClusterUpdateParameters() { } /** * Get the innerProperties property: The properties of the amlCompute. - * + * * @return the innerProperties value. */ private ClusterUpdateProperties innerProperties() { @@ -32,7 +36,7 @@ private ClusterUpdateProperties innerProperties() { /** * Get the properties property: Properties of ClusterUpdate. - * + * * @return the properties value. */ public ScaleSettingsInformation properties() { @@ -41,7 +45,7 @@ public ScaleSettingsInformation properties() { /** * Set the properties property: Properties of ClusterUpdate. - * + * * @param properties the properties value to set. * @return the ClusterUpdateParameters object itself. */ @@ -55,7 +59,7 @@ public ClusterUpdateParameters withProperties(ScaleSettingsInformation propertie /** * 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/CocoExportSummary.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CocoExportSummary.java new file mode 100644 index 0000000000000..2d7ababf7f970 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CocoExportSummary.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.Immutable; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The CocoExportSummary model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format") +@JsonTypeName("Coco") +@Immutable +public final class CocoExportSummary extends ExportSummaryInner { + /* + * The container name to which the labels will be exported. + */ + @JsonProperty(value = "containerName", access = JsonProperty.Access.WRITE_ONLY) + private String containerName; + + /* + * The output path where the labels will be exported. + */ + @JsonProperty(value = "snapshotPath", access = JsonProperty.Access.WRITE_ONLY) + private String snapshotPath; + + /** + * Creates an instance of CocoExportSummary class. + */ + public CocoExportSummary() { + } + + /** + * Get the containerName property: The container name to which the labels will be exported. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Get the snapshotPath property: The output path where the labels will be exported. + * + * @return the snapshotPath value. + */ + public String snapshotPath() { + return this.snapshotPath; + } + + /** + * 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/CodeConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java index 1da5ea3ab59cc..3025814d3ac6b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration for a scoring code asset. */ +/** + * Configuration for a scoring code asset. + */ @Fluent public final class CodeConfiguration { /* @@ -23,13 +25,15 @@ public final class CodeConfiguration { @JsonProperty(value = "scoringScript", required = true) private String scoringScript; - /** Creates an instance of CodeConfiguration class. */ + /** + * Creates an instance of CodeConfiguration class. + */ public CodeConfiguration() { } /** * Get the codeId property: ARM resource ID of the code asset. - * + * * @return the codeId value. */ public String codeId() { @@ -38,7 +42,7 @@ public String codeId() { /** * Set the codeId property: ARM resource ID of the code asset. - * + * * @param codeId the codeId value to set. * @return the CodeConfiguration object itself. */ @@ -49,7 +53,7 @@ public CodeConfiguration withCodeId(String codeId) { /** * Get the scoringScript property: [Required] The script to execute on startup. eg. "score.py". - * + * * @return the scoringScript value. */ public String scoringScript() { @@ -58,7 +62,7 @@ public String scoringScript() { /** * Set the scoringScript property: [Required] The script to execute on startup. eg. "score.py". - * + * * @param scoringScript the scoringScript value to set. * @return the CodeConfiguration object itself. */ @@ -69,14 +73,13 @@ public CodeConfiguration withScoringScript(String scoringScript) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (scoringScript() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property scoringScript in model CodeConfiguration")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property scoringScript in model CodeConfiguration")); } } 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..e5847914add87 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 @@ -8,90 +8,103 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -/** An immutable client-side representation of CodeContainer. */ +/** + * An immutable client-side representation of CodeContainer. + */ public interface CodeContainer { /** * 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. */ CodeContainerProperties 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.CodeContainerInner object. - * + * * @return the inner object. */ CodeContainerInner innerModel(); - /** The entirety of the CodeContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the CodeContainer definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The CodeContainer definition stages. */ + + /** + * The CodeContainer definition stages. + */ interface DefinitionStages { - /** The first stage of the CodeContainer definition. */ + /** + * The first stage of the CodeContainer definition. + */ interface Blank extends WithParentResource { } - /** The stage of the CodeContainer definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the CodeContainer 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(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. @@ -99,67 +112,76 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ CodeContainer create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ CodeContainer create(Context context); } } + /** * Begins update for the CodeContainer resource. - * + * * @return the stage of resource update. */ CodeContainer.Update update(); - /** The template for CodeContainer update. */ + /** + * The template for CodeContainer update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ CodeContainer apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ CodeContainer apply(Context context); } - /** The CodeContainer update stages. */ + + /** + * The CodeContainer update stages. + */ interface UpdateStages { - /** The stage of the CodeContainer update allowing to specify properties. */ + /** + * The stage of the CodeContainer 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(CodeContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ CodeContainer refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/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..3494edba84bdc 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,37 +5,65 @@ 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. */ +/** + * Container for code asset versions. + */ @Fluent public final class CodeContainerProperties extends AssetContainer { - /** Creates an instance of CodeContainerProperties class. */ + /* + * 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() { } - /** {@inheritDoc} */ + /** + * 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) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CodeContainerProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CodeContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CodeContainerProperties withTags(Map tags) { super.withTags(tags); @@ -44,7 +72,7 @@ public CodeContainerProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java index fdb6888e079bd..dd61002b5a6a3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of CodeContainer entities. */ +/** + * A paginated list of CodeContainer entities. + */ @Fluent public final class CodeContainerResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class CodeContainerResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of CodeContainerResourceArmPaginatedResult class. */ + /** + * Creates an instance of CodeContainerResourceArmPaginatedResult class. + */ public CodeContainerResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional * pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional * pages. - * + * * @param nextLink the nextLink value to set. * @return the CodeContainerResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public CodeContainerResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type CodeContainer. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type CodeContainer. - * + * * @param value the value value to set. * @return the CodeContainerResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public CodeContainerResourceArmPaginatedResult withValue(List getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response getWithResponse(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. @@ -91,55 +94,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. - * - * @param id the resource ID. + * 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 container along with {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + CodeContainerInner body, 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. + * 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 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..5da88ef8260e8 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,95 +4,109 @@ 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; -/** An immutable client-side representation of CodeVersion. */ +/** + * An immutable client-side representation of CodeVersion. + */ public interface CodeVersion { /** * 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. */ CodeVersionProperties 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.CodeVersionInner object. - * + * * @return the inner object. */ CodeVersionInner innerModel(); - /** The entirety of the CodeVersion definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the CodeVersion definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The CodeVersion definition stages. */ + + /** + * The CodeVersion definition stages. + */ interface DefinitionStages { - /** The first stage of the CodeVersion definition. */ + /** + * The first stage of the CodeVersion definition. + */ interface Blank extends WithParentResource { } - /** The stage of the CodeVersion definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the CodeVersion 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(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. @@ -100,69 +114,102 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ CodeVersion create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ CodeVersion create(Context context); } } + /** * Begins update for the CodeVersion resource. - * + * * @return the stage of resource update. */ CodeVersion.Update update(); - /** The template for CodeVersion update. */ + /** + * The template for CodeVersion update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ CodeVersion apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ CodeVersion apply(Context context); } - /** The CodeVersion update stages. */ + + /** + * The CodeVersion update stages. + */ interface UpdateStages { - /** The stage of the CodeVersion update allowing to specify properties. */ + /** + * The stage of the CodeVersion 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(CodeVersionProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ CodeVersion refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @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..a565593d9fc14 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Code asset version details. */ +/** + * Code asset version details. + */ @Fluent public final class CodeVersionProperties extends AssetBase { /* @@ -17,13 +19,21 @@ public final class CodeVersionProperties extends AssetBase { @JsonProperty(value = "codeUri") private String codeUri; - /** Creates an instance of CodeVersionProperties class. */ + /* + * 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() { } /** * Get the codeUri property: Uri where code is located. - * + * * @return the codeUri value. */ public String codeUri() { @@ -32,7 +42,7 @@ public String codeUri() { /** * Set the codeUri property: Uri where code is located. - * + * * @param codeUri the codeUri value to set. * @return the CodeVersionProperties object itself. */ @@ -41,35 +51,63 @@ public CodeVersionProperties withCodeUri(String codeUri) { return this; } - /** {@inheritDoc} */ + /** + * Get the provisioningState property: Provisioning state for the code version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public CodeVersionProperties withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + return this; + } + + /** + * {@inheritDoc} + */ @Override public CodeVersionProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CodeVersionProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CodeVersionProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CodeVersionProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CodeVersionProperties withTags(Map tags) { super.withTags(tags); @@ -78,7 +116,7 @@ public CodeVersionProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java index 64ed58a5722f9..eb06cc04c9f01 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of CodeVersion entities. */ +/** + * A paginated list of CodeVersion entities. + */ @Fluent public final class CodeVersionResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class CodeVersionResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of CodeVersionResourceArmPaginatedResult class. */ + /** + * Creates an instance of CodeVersionResourceArmPaginatedResult class. + */ public CodeVersionResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional * pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional * pages. - * + * * @param nextLink the nextLink value to set. * @return the CodeVersionResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public CodeVersionResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type CodeVersion. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type CodeVersion. - * + * * @param value the value value to set. * @return the CodeVersionResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public CodeVersionResourceArmPaginatedResult withValue(List va /** * 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/CodeVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java index 832a78bf6085d..e3e98a98e959b 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,12 +7,15 @@ 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. */ +/** + * Resource collection API of CodeVersions. + */ public interface CodeVersions { /** * 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 Container name. This is case-sensitive. @@ -25,31 +28,27 @@ public interface CodeVersions { /** * 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 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 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. * @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 workspaceName, - String name, - String orderBy, - Integer top, - String skip, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, String hash, String hashVersion, 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. @@ -60,12 +59,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -78,7 +77,7 @@ Response deleteWithResponse( /** * 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. @@ -89,12 +88,12 @@ Response deleteWithResponse( * @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); + 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. @@ -107,55 +106,98 @@ Response getWithResponse( CodeVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. - * - * @param id the resource ID. + * 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 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. - * - * @param id the resource ID. - * @param context The context to associate with this operation. + * 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 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. - * - * @param id the resource ID. + * 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. */ - void deleteById(String id); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); /** - * Delete version. - * - * @param id the resource ID. + * 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 Response}. */ - Response deleteByIdWithResponse(String id, Context context); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, + Context context); /** - * Begins definition for a new CodeVersion resource. - * - * @param name resource name. - * @return the first stage of the new CodeVersion definition. + * 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); + + /** + * 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. */ - 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/CognitiveServiceEndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServiceEndpointDeploymentResourceProperties.java new file mode 100644 index 0000000000000..b72a4ea6136ad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServiceEndpointDeploymentResourceProperties.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CognitiveServiceEndpointDeploymentResourceProperties model. + */ +@Fluent +public class CognitiveServiceEndpointDeploymentResourceProperties { + /* + * Model used for the endpoint deployment. + */ + @JsonProperty(value = "model", required = true) + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + @JsonProperty(value = "raiPolicyName") + private String raiPolicyName; + + /* + * The sku property. + */ + @JsonProperty(value = "sku") + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + @JsonProperty(value = "versionUpgradeOption") + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of CognitiveServiceEndpointDeploymentResourceProperties class. + */ + public CognitiveServiceEndpointDeploymentResourceProperties() { + } + + /** + * Get the model property: Model used for the endpoint deployment. + * + * @return the model value. + */ + public EndpointDeploymentModel model() { + return this.model; + } + + /** + * Set the model property: Model used for the endpoint deployment. + * + * @param model the model value to set. + * @return the CognitiveServiceEndpointDeploymentResourceProperties object itself. + */ + public CognitiveServiceEndpointDeploymentResourceProperties withModel(EndpointDeploymentModel model) { + this.model = model; + return this; + } + + /** + * Get the raiPolicyName property: The name of RAI policy. + * + * @return the raiPolicyName value. + */ + public String raiPolicyName() { + return this.raiPolicyName; + } + + /** + * Set the raiPolicyName property: The name of RAI policy. + * + * @param raiPolicyName the raiPolicyName value to set. + * @return the CognitiveServiceEndpointDeploymentResourceProperties object itself. + */ + public CognitiveServiceEndpointDeploymentResourceProperties withRaiPolicyName(String raiPolicyName) { + this.raiPolicyName = raiPolicyName; + return this; + } + + /** + * Get the sku property: The sku property. + * + * @return the sku value. + */ + public CognitiveServicesSku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku property. + * + * @param sku the sku value to set. + * @return the CognitiveServiceEndpointDeploymentResourceProperties object itself. + */ + public CognitiveServiceEndpointDeploymentResourceProperties withSku(CognitiveServicesSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the versionUpgradeOption property: Deployment model version upgrade option. + * + * @return the versionUpgradeOption value. + */ + public DeploymentModelVersionUpgradeOption versionUpgradeOption() { + return this.versionUpgradeOption; + } + + /** + * Set the versionUpgradeOption property: Deployment model version upgrade option. + * + * @param versionUpgradeOption the versionUpgradeOption value to set. + * @return the CognitiveServiceEndpointDeploymentResourceProperties object itself. + */ + public CognitiveServiceEndpointDeploymentResourceProperties + withVersionUpgradeOption(DeploymentModelVersionUpgradeOption versionUpgradeOption) { + this.versionUpgradeOption = versionUpgradeOption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (model() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property model in model CognitiveServiceEndpointDeploymentResourceProperties")); + } else { + model().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(CognitiveServiceEndpointDeploymentResourceProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java new file mode 100644 index 0000000000000..3e7b2ce0af46d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CognitiveServicesSku model. + */ +@Fluent +public final class CognitiveServicesSku { + /* + * The capacity property. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /* + * The family property. + */ + @JsonProperty(value = "family") + private String family; + + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The size property. + */ + @JsonProperty(value = "size") + private String size; + + /* + * The tier property. + */ + @JsonProperty(value = "tier") + private String tier; + + /** + * Creates an instance of CognitiveServicesSku class. + */ + public CognitiveServicesSku() { + } + + /** + * Get the capacity property: The capacity property. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The capacity property. + * + * @param capacity the capacity value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the family property: The family property. + * + * @return the family value. + */ + public String family() { + return this.family; + } + + /** + * Set the family property: The family property. + * + * @param family the family value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get the size property: The size property. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: The size property. + * + * @param size the size value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the tier property: The tier property. + * + * @return the tier value. + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier property: The tier property. + * + * @param tier the tier value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withTier(String tier) { + this.tier = tier; + 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/Collection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java new file mode 100644 index 0000000000000..899277df5c745 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Collection model. + */ +@Fluent +public final class Collection { + /* + * The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint + * identity to auth. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * Enable or disable data collection. + */ + @JsonProperty(value = "dataCollectionMode") + private DataCollectionMode dataCollectionMode; + + /* + * The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend + * will collect data to the blob storage. + */ + @JsonProperty(value = "dataId") + private String dataId; + + /* + * The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. + */ + @JsonProperty(value = "samplingRate") + private Double samplingRate; + + /** + * Creates an instance of Collection class. + */ + public Collection() { + } + + /** + * Get the clientId property: The msi client id used to collect logging to blob storage. If it's null,backend will + * pick a registered endpoint identity to auth. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The msi client id used to collect logging to blob storage. If it's null,backend will + * pick a registered endpoint identity to auth. + * + * @param clientId the clientId value to set. + * @return the Collection object itself. + */ + public Collection withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the dataCollectionMode property: Enable or disable data collection. + * + * @return the dataCollectionMode value. + */ + public DataCollectionMode dataCollectionMode() { + return this.dataCollectionMode; + } + + /** + * Set the dataCollectionMode property: Enable or disable data collection. + * + * @param dataCollectionMode the dataCollectionMode value to set. + * @return the Collection object itself. + */ + public Collection withDataCollectionMode(DataCollectionMode dataCollectionMode) { + this.dataCollectionMode = dataCollectionMode; + return this; + } + + /** + * Get the dataId property: The data asset arm resource id. Client side will ensure data asset is pointing to the + * blob storage, and backend will collect data to the blob storage. + * + * @return the dataId value. + */ + public String dataId() { + return this.dataId; + } + + /** + * Set the dataId property: The data asset arm resource id. Client side will ensure data asset is pointing to the + * blob storage, and backend will collect data to the blob storage. + * + * @param dataId the dataId value to set. + * @return the Collection object itself. + */ + public Collection withDataId(String dataId) { + this.dataId = dataId; + return this; + } + + /** + * Get the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data + * by default. + * + * @return the samplingRate value. + */ + public Double samplingRate() { + return this.samplingRate; + } + + /** + * Set the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data + * by default. + * + * @param samplingRate the samplingRate value to set. + * @return the Collection object itself. + */ + public Collection withSamplingRate(Double samplingRate) { + this.samplingRate = samplingRate; + 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/ColumnTransformer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java index 649d7c1740715..c882adcfeb1e8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Column transformer parameters. */ +/** + * Column transformer parameters. + */ @Fluent public final class ColumnTransformer { /* @@ -24,13 +26,15 @@ public final class ColumnTransformer { @JsonProperty(value = "parameters") private Object parameters; - /** Creates an instance of ColumnTransformer class. */ + /** + * Creates an instance of ColumnTransformer class. + */ public ColumnTransformer() { } /** * Get the fields property: Fields to apply transformer logic on. - * + * * @return the fields value. */ public List fields() { @@ -39,7 +43,7 @@ public List fields() { /** * Set the fields property: Fields to apply transformer logic on. - * + * * @param fields the fields value to set. * @return the ColumnTransformer object itself. */ @@ -49,9 +53,9 @@ public ColumnTransformer withFields(List fields) { } /** - * Get the parameters property: Different properties to be passed to transformer. Input expected is dictionary of - * key,value pairs in JSON format. - * + * Get the parameters property: Different properties to be passed to transformer. + * Input expected is dictionary of key,value pairs in JSON format. + * * @return the parameters value. */ public Object parameters() { @@ -59,9 +63,9 @@ public Object parameters() { } /** - * Set the parameters property: Different properties to be passed to transformer. Input expected is dictionary of - * key,value pairs in JSON format. - * + * Set the parameters property: Different properties to be passed to transformer. + * Input expected is dictionary of key,value pairs in JSON format. + * * @param parameters the parameters value to set. * @return the ColumnTransformer object itself. */ @@ -72,7 +76,7 @@ public ColumnTransformer withParameters(Object parameters) { /** * 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/CommandJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java index f7f423aed984f..40be093c71d5b 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 @@ -12,11 +12,19 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Command job definition. */ +/** + * Command job definition. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") @JsonTypeName("Command") @Fluent public final class CommandJob extends JobBaseProperties { + /* + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + */ + @JsonProperty(value = "autologgerSettings") + private AutologgerSettings autologgerSettings; + /* * ARM resource ID of the code asset. */ @@ -30,7 +38,7 @@ public final class CommandJob extends JobBaseProperties { private String command; /* - * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null. */ @JsonProperty(value = "distribution") private DistributionConfiguration distribution; @@ -74,19 +82,49 @@ 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. */ @JsonProperty(value = "resources") private JobResourceConfiguration resources; - /** Creates an instance of CommandJob class. */ + /** + * Creates an instance of CommandJob class. + */ public CommandJob() { } + /** + * Get the autologgerSettings property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. + * + * @return the autologgerSettings value. + */ + public AutologgerSettings autologgerSettings() { + return this.autologgerSettings; + } + + /** + * Set the autologgerSettings property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. + * + * @param autologgerSettings the autologgerSettings value to set. + * @return the CommandJob object itself. + */ + public CommandJob withAutologgerSettings(AutologgerSettings autologgerSettings) { + this.autologgerSettings = autologgerSettings; + return this; + } + /** * Get the codeId property: ARM resource ID of the code asset. - * + * * @return the codeId value. */ public String codeId() { @@ -95,7 +133,7 @@ public String codeId() { /** * Set the codeId property: ARM resource ID of the code asset. - * + * * @param codeId the codeId value to set. * @return the CommandJob object itself. */ @@ -106,7 +144,7 @@ public CommandJob withCodeId(String codeId) { /** * Get the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * + * * @return the command value. */ public String command() { @@ -115,7 +153,7 @@ public String command() { /** * Set the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * + * * @param command the command value to set. * @return the CommandJob object itself. */ @@ -126,8 +164,8 @@ public CommandJob withCommand(String command) { /** * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. - * + * Tensorflow, PyTorch, Ray, or null. + * * @return the distribution value. */ public DistributionConfiguration distribution() { @@ -136,8 +174,8 @@ public DistributionConfiguration distribution() { /** * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. - * + * Tensorflow, PyTorch, Ray, or null. + * * @param distribution the distribution value to set. * @return the CommandJob object itself. */ @@ -148,7 +186,7 @@ public CommandJob withDistribution(DistributionConfiguration distribution) { /** * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. - * + * * @return the environmentId value. */ public String environmentId() { @@ -157,7 +195,7 @@ public String environmentId() { /** * Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. - * + * * @param environmentId the environmentId value to set. * @return the CommandJob object itself. */ @@ -168,7 +206,7 @@ public CommandJob withEnvironmentId(String environmentId) { /** * Get the environmentVariables property: Environment variables included in the job. - * + * * @return the environmentVariables value. */ public Map environmentVariables() { @@ -177,7 +215,7 @@ public Map environmentVariables() { /** * Set the environmentVariables property: Environment variables included in the job. - * + * * @param environmentVariables the environmentVariables value to set. * @return the CommandJob object itself. */ @@ -188,7 +226,7 @@ public CommandJob withEnvironmentVariables(Map environmentVariab /** * Get the inputs property: Mapping of input data bindings used in the job. - * + * * @return the inputs value. */ public Map inputs() { @@ -197,7 +235,7 @@ public Map inputs() { /** * Set the inputs property: Mapping of input data bindings used in the job. - * + * * @param inputs the inputs value to set. * @return the CommandJob object itself. */ @@ -208,7 +246,7 @@ public CommandJob withInputs(Map inputs) { /** * Get the limits property: Command Job limit. - * + * * @return the limits value. */ public CommandJobLimits limits() { @@ -217,7 +255,7 @@ public CommandJobLimits limits() { /** * Set the limits property: Command Job limit. - * + * * @param limits the limits value to set. * @return the CommandJob object itself. */ @@ -228,7 +266,7 @@ public CommandJob withLimits(CommandJobLimits limits) { /** * Get the outputs property: Mapping of output data bindings used in the job. - * + * * @return the outputs value. */ public Map outputs() { @@ -237,7 +275,7 @@ public Map outputs() { /** * Set the outputs property: Mapping of output data bindings used in the job. - * + * * @param outputs the outputs value to set. * @return the CommandJob object itself. */ @@ -248,16 +286,36 @@ public CommandJob withOutputs(Map outputs) { /** * Get the parameters property: Input parameters. - * + * * @return the parameters value. */ 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. - * + * * @return the resources value. */ public JobResourceConfiguration resources() { @@ -266,7 +324,7 @@ public JobResourceConfiguration resources() { /** * Set the resources property: Compute Resource configuration for the job. - * + * * @param resources the resources value to set. * @return the CommandJob object itself. */ @@ -275,70 +333,108 @@ public CommandJob withResources(JobResourceConfiguration resources) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJob withComponentId(String componentId) { super.withComponentId(componentId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJob withComputeId(String computeId) { super.withComputeId(computeId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJob withDisplayName(String displayName) { super.withDisplayName(displayName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJob withExperimentName(String experimentName) { super.withExperimentName(experimentName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJob withIdentity(IdentityConfiguration identity) { super.withIdentity(identity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJob withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public CommandJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CommandJob withSecretsConfiguration(Map secretsConfiguration) { + super.withSecretsConfiguration(secretsConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ @Override public CommandJob withServices(Map services) { super.withServices(services); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJob withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJob withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJob withTags(Map tags) { super.withTags(tags); @@ -347,47 +443,45 @@ public CommandJob withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (autologgerSettings() != null) { + autologgerSettings().validate(); + } if (command() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property command in model CommandJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property command in model CommandJob")); } if (distribution() != null) { distribution().validate(); } if (environmentId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property environmentId in model CommandJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property environmentId in model CommandJob")); } if (inputs() != null) { - inputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + inputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } if (limits() != null) { limits().validate(); } if (outputs() != null) { - outputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + outputs().values().forEach(e -> { + if (e != null) { + e.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/CommandJobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java index 5b2b21d51c28d..9be87fff6690c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java @@ -9,16 +9,22 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Command Job limit class. */ +/** + * Command Job limit class. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobLimitsType") @JsonTypeName("Command") @Fluent public final class CommandJobLimits extends JobLimits { - /** Creates an instance of CommandJobLimits class. */ + /** + * Creates an instance of CommandJobLimits class. + */ public CommandJobLimits() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CommandJobLimits withTimeout(Duration timeout) { super.withTimeout(timeout); @@ -27,7 +33,7 @@ public CommandJobLimits withTimeout(Duration timeout) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentConfiguration.java new file mode 100644 index 0000000000000..7c8140cb2219b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentConfiguration.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; + +/** + * Used for sweep over component. + */ +@Fluent +public final class ComponentConfiguration { + /* + * Pipeline settings, for things like ContinueRunOnStepFailure etc. + */ + @JsonProperty(value = "pipelineSettings") + private Object pipelineSettings; + + /** + * Creates an instance of ComponentConfiguration class. + */ + public ComponentConfiguration() { + } + + /** + * Get the pipelineSettings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. + * + * @return the pipelineSettings value. + */ + public Object pipelineSettings() { + return this.pipelineSettings; + } + + /** + * Set the pipelineSettings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. + * + * @param pipelineSettings the pipelineSettings value to set. + * @return the ComponentConfiguration object itself. + */ + public ComponentConfiguration withPipelineSettings(Object pipelineSettings) { + this.pipelineSettings = pipelineSettings; + 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/ComponentContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java index 2db458e03fb13..80096076fb885 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 @@ -8,90 +8,103 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -/** An immutable client-side representation of ComponentContainer. */ +/** + * An immutable client-side representation of ComponentContainer. + */ public interface ComponentContainer { /** * 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. */ ComponentContainerProperties 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.ComponentContainerInner object. - * + * * @return the inner object. */ ComponentContainerInner innerModel(); - /** The entirety of the ComponentContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the ComponentContainer definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ComponentContainer definition stages. */ + + /** + * The ComponentContainer definition stages. + */ interface DefinitionStages { - /** The first stage of the ComponentContainer definition. */ + /** + * The first stage of the ComponentContainer definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ComponentContainer definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the ComponentContainer 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(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. @@ -99,67 +112,76 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ ComponentContainer create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ComponentContainer create(Context context); } } + /** * Begins update for the ComponentContainer resource. - * + * * @return the stage of resource update. */ ComponentContainer.Update update(); - /** The template for ComponentContainer update. */ + /** + * The template for ComponentContainer update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ ComponentContainer apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ComponentContainer apply(Context context); } - /** The ComponentContainer update stages. */ + + /** + * The ComponentContainer update stages. + */ interface UpdateStages { - /** The stage of the ComponentContainer update allowing to specify properties. */ + /** + * The stage of the ComponentContainer 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(ComponentContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ComponentContainer refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/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..8e4216a052271 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,40 +5,66 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** - * Component container definition. <see - * href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. + * Component container definition. + * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. */ @Fluent public final class ComponentContainerProperties extends AssetContainer { - /** Creates an instance of ComponentContainerProperties class. */ + /* + * 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() { } - /** {@inheritDoc} */ + /** + * 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) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComponentContainerProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComponentContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComponentContainerProperties withTags(Map tags) { super.withTags(tags); @@ -47,7 +73,7 @@ public ComponentContainerProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java index 0be978c7adf26..cf9776b2dbbc2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of ComponentContainer entities. */ +/** + * A paginated list of ComponentContainer entities. + */ @Fluent public final class ComponentContainerResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class ComponentContainerResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of ComponentContainerResourceArmPaginatedResult class. */ + /** + * Creates an instance of ComponentContainerResourceArmPaginatedResult class. + */ public ComponentContainerResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no * additional pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no * additional pages. - * + * * @param nextLink the nextLink value to set. * @return the ComponentContainerResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public ComponentContainerResourceArmPaginatedResult withNextLink(String nextLink /** * Get the value property: An array of objects of type ComponentContainer. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type ComponentContainer. - * + * * @param value the value value to set. * @return the ComponentContainerResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public ComponentContainerResourceArmPaginatedResult withValue(List list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, 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. @@ -54,7 +57,7 @@ PagedIterable list( /** * 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. @@ -66,7 +69,7 @@ PagedIterable list( /** * 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. @@ -76,12 +79,12 @@ PagedIterable list( * @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 workspaceName, String name, Context context); + Response getWithResponse(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. @@ -93,55 +96,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. - * - * @param id the resource ID. + * 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. + * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + ComponentContainerInner body, 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. + * 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. + * @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..313bc99202d41 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 @@ -8,91 +8,104 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -/** An immutable client-side representation of ComponentVersion. */ +/** + * An immutable client-side representation of ComponentVersion. + */ public interface ComponentVersion { /** * 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. */ ComponentVersionProperties 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.ComponentVersionInner object. - * + * * @return the inner object. */ ComponentVersionInner innerModel(); - /** The entirety of the ComponentVersion definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the ComponentVersion definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ComponentVersion definition stages. */ + + /** + * The ComponentVersion definition stages. + */ interface DefinitionStages { - /** The first stage of the ComponentVersion definition. */ + /** + * The first stage of the ComponentVersion definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ComponentVersion definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the ComponentVersion 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(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. @@ -100,67 +113,76 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ ComponentVersion create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ComponentVersion create(Context context); } } + /** * Begins update for the ComponentVersion resource. - * + * * @return the stage of resource update. */ ComponentVersion.Update update(); - /** The template for ComponentVersion update. */ + /** + * The template for ComponentVersion update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ ComponentVersion apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ComponentVersion apply(Context context); } - /** The ComponentVersion update stages. */ + + /** + * The ComponentVersion update stages. + */ interface UpdateStages { - /** The stage of the ComponentVersion update allowing to specify properties. */ + /** + * The stage of the ComponentVersion 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(ComponentVersionProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ComponentVersion refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/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..1bf708f1a275c 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Definition of a component version: defines resources that span component types. */ +/** + * Definition of a component version: defines resources that span component types. + */ @Fluent public final class ComponentVersionProperties extends AssetBase { /* @@ -18,14 +20,28 @@ public final class ComponentVersionProperties extends AssetBase { @JsonProperty(value = "componentSpec") private Object componentSpec; - /** Creates an instance of ComponentVersionProperties class. */ + /* + * Provisioning state for the component version. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private AssetProvisioningState provisioningState; + + /* + * Stage in the component lifecycle + */ + @JsonProperty(value = "stage") + private String stage; + + /** + * Creates an instance of ComponentVersionProperties class. + */ public ComponentVersionProperties() { } /** - * Get the componentSpec property: Defines Component definition details. <see - * href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. - * + * Get the componentSpec property: Defines Component definition details. + * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. + * * @return the componentSpec value. */ public Object componentSpec() { @@ -33,9 +49,9 @@ public Object componentSpec() { } /** - * Set the componentSpec property: Defines Component definition details. <see - * href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. - * + * Set the componentSpec property: Defines Component definition details. + * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. + * * @param componentSpec the componentSpec value to set. * @return the ComponentVersionProperties object itself. */ @@ -44,35 +60,83 @@ public ComponentVersionProperties withComponentSpec(Object componentSpec) { return this; } - /** {@inheritDoc} */ + /** + * Get the provisioningState property: Provisioning state for the component version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the stage property: Stage in the component lifecycle. + * + * @return the stage value. + */ + public String stage() { + return this.stage; + } + + /** + * Set the stage property: Stage in the component lifecycle. + * + * @param stage the stage value to set. + * @return the ComponentVersionProperties object itself. + */ + public ComponentVersionProperties withStage(String stage) { + this.stage = stage; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ComponentVersionProperties withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + return this; + } + + /** + * {@inheritDoc} + */ @Override public ComponentVersionProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComponentVersionProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComponentVersionProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComponentVersionProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComponentVersionProperties withTags(Map tags) { super.withTags(tags); @@ -81,7 +145,7 @@ public ComponentVersionProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java index d78b0c57e190f..251141aa5c753 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of ComponentVersion entities. */ +/** + * A paginated list of ComponentVersion entities. + */ @Fluent public final class ComponentVersionResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class ComponentVersionResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of ComponentVersionResourceArmPaginatedResult class. */ + /** + * Creates an instance of ComponentVersionResourceArmPaginatedResult class. + */ public ComponentVersionResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no * additional pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no * additional pages. - * + * * @param nextLink the nextLink value to set. * @return the ComponentVersionResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public ComponentVersionResourceArmPaginatedResult withNextLink(String nextLink) /** * Get the value property: An array of objects of type ComponentVersion. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type ComponentVersion. - * + * * @param value the value value to set. * @return the ComponentVersionResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public ComponentVersionResourceArmPaginatedResult withValue(List list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, ListViewType listViewType, 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. @@ -62,12 +59,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -80,7 +77,7 @@ Response deleteWithResponse( /** * 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. @@ -91,12 +88,12 @@ Response deleteWithResponse( * @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); + 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. @@ -109,55 +106,65 @@ Response getWithResponse( ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. - * - * @param id the resource ID. + * 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. + * @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. - * - * @param id the resource ID. - * @param context The context to associate with this operation. + * 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. + * @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. - * - * @param id the resource ID. + * 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. */ - void deleteById(String id); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); /** - * Delete version. - * - * @param id the resource ID. + * 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 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/Compute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java index 1ed2a4317c3a8..9b8e263651ed1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java @@ -13,7 +13,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Machine Learning compute object. */ +/** + * Machine Learning compute object. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -30,8 +32,7 @@ @JsonSubTypes.Type(name = "DataFactory", value = DataFactory.class), @JsonSubTypes.Type(name = "Databricks", value = Databricks.class), @JsonSubTypes.Type(name = "DataLakeAnalytics", value = DataLakeAnalytics.class), - @JsonSubTypes.Type(name = "SynapseSpark", value = SynapseSpark.class) -}) + @JsonSubTypes.Type(name = "SynapseSpark", value = SynapseSpark.class) }) @Fluent public class Compute { /* @@ -89,13 +90,15 @@ public class Compute { @JsonProperty(value = "disableLocalAuth") private Boolean disableLocalAuth; - /** Creates an instance of Compute class. */ + /** + * Creates an instance of Compute class. + */ public Compute() { } /** * Get the computeLocation property: Location for the underlying compute. - * + * * @return the computeLocation value. */ public String computeLocation() { @@ -104,7 +107,7 @@ public String computeLocation() { /** * Set the computeLocation property: Location for the underlying compute. - * + * * @param computeLocation the computeLocation value to set. * @return the Compute object itself. */ @@ -116,7 +119,7 @@ public Compute withComputeLocation(String computeLocation) { /** * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, * Provisioning, Succeeded, and Failed. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -125,7 +128,7 @@ public ProvisioningState provisioningState() { /** * Get the description property: The description of the Machine Learning compute. - * + * * @return the description value. */ public String description() { @@ -134,7 +137,7 @@ public String description() { /** * Set the description property: The description of the Machine Learning compute. - * + * * @param description the description value to set. * @return the Compute object itself. */ @@ -145,7 +148,7 @@ public Compute withDescription(String description) { /** * Get the createdOn property: The time at which the compute was created. - * + * * @return the createdOn value. */ public OffsetDateTime createdOn() { @@ -154,7 +157,7 @@ public OffsetDateTime createdOn() { /** * Get the modifiedOn property: The time at which the compute was last modified. - * + * * @return the modifiedOn value. */ public OffsetDateTime modifiedOn() { @@ -163,7 +166,7 @@ public OffsetDateTime modifiedOn() { /** * Get the resourceId property: ARM resource id of the underlying compute. - * + * * @return the resourceId value. */ public String resourceId() { @@ -172,7 +175,7 @@ public String resourceId() { /** * Set the resourceId property: ARM resource id of the underlying compute. - * + * * @param resourceId the resourceId value to set. * @return the Compute object itself. */ @@ -183,7 +186,7 @@ public Compute withResourceId(String resourceId) { /** * Get the provisioningErrors property: Errors during provisioning. - * + * * @return the provisioningErrors value. */ public List provisioningErrors() { @@ -193,7 +196,7 @@ public List provisioningErrors() { /** * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from * outside if true, or machine learning service provisioned it if false. - * + * * @return the isAttachedCompute value. */ public Boolean isAttachedCompute() { @@ -203,7 +206,7 @@ public Boolean isAttachedCompute() { /** * Get the disableLocalAuth property: Opt-out of local authentication and ensure customers can use only MSI and AAD * exclusively for authentication. - * + * * @return the disableLocalAuth value. */ public Boolean disableLocalAuth() { @@ -213,7 +216,7 @@ public Boolean disableLocalAuth() { /** * Set the disableLocalAuth property: Opt-out of local authentication and ensure customers can use only MSI and AAD * exclusively for authentication. - * + * * @param disableLocalAuth the disableLocalAuth value to set. * @return the Compute object itself. */ @@ -224,7 +227,7 @@ public Compute withDisableLocalAuth(Boolean disableLocalAuth) { /** * 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/ComputeInstance.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java index 3c1201eb45463..fc173eee5b079 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** An Azure Machine Learning compute instance. */ +/** + * An Azure Machine Learning compute instance. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("ComputeInstance") @Fluent @@ -20,13 +22,15 @@ public final class ComputeInstance extends Compute { @JsonProperty(value = "properties") private ComputeInstanceProperties properties; - /** Creates an instance of ComputeInstance class. */ + /** + * Creates an instance of ComputeInstance class. + */ public ComputeInstance() { } /** * Get the properties property: Properties of ComputeInstance. - * + * * @return the properties value. */ public ComputeInstanceProperties properties() { @@ -35,7 +39,7 @@ public ComputeInstanceProperties properties() { /** * Set the properties property: Properties of ComputeInstance. - * + * * @param properties the properties value to set. * @return the ComputeInstance object itself. */ @@ -44,28 +48,36 @@ public ComputeInstance withProperties(ComputeInstanceProperties properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComputeInstance withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComputeInstance withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComputeInstance withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ComputeInstance withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -74,7 +86,7 @@ public ComputeInstance withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java index efaf0271b71eb..70c4604db58ec 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines an Aml Instance application and its connectivity endpoint URI. */ +/** + * Defines an Aml Instance application and its connectivity endpoint URI. + */ @Fluent public final class ComputeInstanceApplication { /* @@ -22,13 +24,15 @@ public final class ComputeInstanceApplication { @JsonProperty(value = "endpointUri") private String endpointUri; - /** Creates an instance of ComputeInstanceApplication class. */ + /** + * Creates an instance of ComputeInstanceApplication class. + */ public ComputeInstanceApplication() { } /** * Get the displayName property: Name of the ComputeInstance application. - * + * * @return the displayName value. */ public String displayName() { @@ -37,7 +41,7 @@ public String displayName() { /** * Set the displayName property: Name of the ComputeInstance application. - * + * * @param displayName the displayName value to set. * @return the ComputeInstanceApplication object itself. */ @@ -48,7 +52,7 @@ public ComputeInstanceApplication withDisplayName(String displayName) { /** * Get the endpointUri property: Application' endpoint URI. - * + * * @return the endpointUri value. */ public String endpointUri() { @@ -57,7 +61,7 @@ public String endpointUri() { /** * Set the endpointUri property: Application' endpoint URI. - * + * * @param endpointUri the endpointUri value to set. * @return the ComputeInstanceApplication object itself. */ @@ -68,7 +72,7 @@ public ComputeInstanceApplication withEndpointUri(String endpointUri) { /** * 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/ComputeInstanceAuthorizationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java index 998bf39f0692e..43759b129279d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java @@ -10,16 +10,18 @@ /** * Compute Instance Authorization type. - * - *

The Compute Instance Authorization type. Available values are personal (default). + * + * The Compute Instance Authorization type. Available values are personal (default). */ public final class ComputeInstanceAuthorizationType extends ExpandableStringEnum { - /** Static value personal for ComputeInstanceAuthorizationType. */ + /** + * Static value personal for ComputeInstanceAuthorizationType. + */ public static final ComputeInstanceAuthorizationType PERSONAL = fromString("personal"); /** * Creates a new instance of ComputeInstanceAuthorizationType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -28,7 +30,7 @@ public ComputeInstanceAuthorizationType() { /** * Creates or finds a ComputeInstanceAuthorizationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ComputeInstanceAuthorizationType. */ @@ -39,7 +41,7 @@ public static ComputeInstanceAuthorizationType fromString(String name) { /** * Gets known ComputeInstanceAuthorizationType values. - * + * * @return known ComputeInstanceAuthorizationType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java new file mode 100644 index 0000000000000..d00dd8611457f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.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; + +/** + * Specifies settings for autologger. + */ +@Fluent +public final class ComputeInstanceAutologgerSettings { + /* + * Indicates whether mlflow autologger is enabled for notebooks. + */ + @JsonProperty(value = "mlflowAutologger") + private MlflowAutologger mlflowAutologger; + + /** + * Creates an instance of ComputeInstanceAutologgerSettings class. + */ + public ComputeInstanceAutologgerSettings() { + } + + /** + * Get the mlflowAutologger property: Indicates whether mlflow autologger is enabled for notebooks. + * + * @return the mlflowAutologger value. + */ + public MlflowAutologger mlflowAutologger() { + return this.mlflowAutologger; + } + + /** + * Set the mlflowAutologger property: Indicates whether mlflow autologger is enabled for notebooks. + * + * @param mlflowAutologger the mlflowAutologger value to set. + * @return the ComputeInstanceAutologgerSettings object itself. + */ + public ComputeInstanceAutologgerSettings withMlflowAutologger(MlflowAutologger mlflowAutologger) { + this.mlflowAutologger = mlflowAutologger; + 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/ComputeInstanceConnectivityEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java index f0cb84e7f4058..6d59c0819d8ef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines all connectivity endpoints and properties for an ComputeInstance. */ +/** + * Defines all connectivity endpoints and properties for an ComputeInstance. + */ @Immutable public final class ComputeInstanceConnectivityEndpoints { /* @@ -22,13 +24,15 @@ public final class ComputeInstanceConnectivityEndpoints { @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY) private String privateIpAddress; - /** Creates an instance of ComputeInstanceConnectivityEndpoints class. */ + /** + * Creates an instance of ComputeInstanceConnectivityEndpoints class. + */ public ComputeInstanceConnectivityEndpoints() { } /** * Get the publicIpAddress property: Public IP Address of this ComputeInstance. - * + * * @return the publicIpAddress value. */ public String publicIpAddress() { @@ -38,7 +42,7 @@ public String publicIpAddress() { /** * Get the privateIpAddress property: Private IP Address of this ComputeInstance (local to the VNET in which the * compute instance is deployed). - * + * * @return the privateIpAddress value. */ public String privateIpAddress() { @@ -47,7 +51,7 @@ public String privateIpAddress() { /** * 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/ComputeInstanceContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java index e9b49d9885472..735ad4161a3ad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Defines an Aml Instance container. */ +/** + * Defines an Aml Instance container. + */ @Fluent public final class ComputeInstanceContainer { /* @@ -47,13 +49,15 @@ public final class ComputeInstanceContainer { @JsonProperty(value = "services", access = JsonProperty.Access.WRITE_ONLY) private List services; - /** Creates an instance of ComputeInstanceContainer class. */ + /** + * Creates an instance of ComputeInstanceContainer class. + */ public ComputeInstanceContainer() { } /** * Get the name property: Name of the ComputeInstance container. - * + * * @return the name value. */ public String name() { @@ -62,7 +66,7 @@ public String name() { /** * Set the name property: Name of the ComputeInstance container. - * + * * @param name the name value to set. * @return the ComputeInstanceContainer object itself. */ @@ -73,7 +77,7 @@ public ComputeInstanceContainer withName(String name) { /** * Get the autosave property: Auto save settings. - * + * * @return the autosave value. */ public Autosave autosave() { @@ -82,7 +86,7 @@ public Autosave autosave() { /** * Set the autosave property: Auto save settings. - * + * * @param autosave the autosave value to set. * @return the ComputeInstanceContainer object itself. */ @@ -93,7 +97,7 @@ public ComputeInstanceContainer withAutosave(Autosave autosave) { /** * Get the gpu property: Information of GPU. - * + * * @return the gpu value. */ public String gpu() { @@ -102,7 +106,7 @@ public String gpu() { /** * Set the gpu property: Information of GPU. - * + * * @param gpu the gpu value to set. * @return the ComputeInstanceContainer object itself. */ @@ -113,7 +117,7 @@ public ComputeInstanceContainer withGpu(String gpu) { /** * Get the network property: network of this container. - * + * * @return the network value. */ public Network network() { @@ -122,7 +126,7 @@ public Network network() { /** * Set the network property: network of this container. - * + * * @param network the network value to set. * @return the ComputeInstanceContainer object itself. */ @@ -133,7 +137,7 @@ public ComputeInstanceContainer withNetwork(Network network) { /** * Get the environment property: Environment information of this container. - * + * * @return the environment value. */ public ComputeInstanceEnvironmentInfo environment() { @@ -142,7 +146,7 @@ public ComputeInstanceEnvironmentInfo environment() { /** * Set the environment property: Environment information of this container. - * + * * @param environment the environment value to set. * @return the ComputeInstanceContainer object itself. */ @@ -153,7 +157,7 @@ public ComputeInstanceContainer withEnvironment(ComputeInstanceEnvironmentInfo e /** * Get the services property: services of this containers. - * + * * @return the services value. */ public List services() { @@ -162,7 +166,7 @@ public List services() { /** * 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/ComputeInstanceCreatedBy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java index 91652991d01ba..2bc64a18a3913 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes information on user who created this ComputeInstance. */ +/** + * Describes information on user who created this ComputeInstance. + */ @Immutable public final class ComputeInstanceCreatedBy { /* @@ -28,13 +30,15 @@ public final class ComputeInstanceCreatedBy { @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY) private String userId; - /** Creates an instance of ComputeInstanceCreatedBy class. */ + /** + * Creates an instance of ComputeInstanceCreatedBy class. + */ public ComputeInstanceCreatedBy() { } /** * Get the username property: Name of the user. - * + * * @return the username value. */ public String username() { @@ -43,7 +47,7 @@ public String username() { /** * Get the userOrgId property: Uniquely identifies user' Azure Active Directory organization. - * + * * @return the userOrgId value. */ public String userOrgId() { @@ -52,7 +56,7 @@ public String userOrgId() { /** * Get the userId property: Uniquely identifies the user within his/her organization. - * + * * @return the userId value. */ public String userId() { @@ -61,7 +65,7 @@ public String userId() { /** * 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/ComputeInstanceDataDisk.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.java index 3c23d8dd308dd..cff47b954bfaa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Defines an Aml Instance DataDisk. */ +/** + * Defines an Aml Instance DataDisk. + */ @Fluent public final class ComputeInstanceDataDisk { /* @@ -24,7 +26,7 @@ public final class ComputeInstanceDataDisk { /* * The logical unit number. - * + * * The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct * lun. */ @@ -37,13 +39,15 @@ public final class ComputeInstanceDataDisk { @JsonProperty(value = "storageAccountType") private StorageAccountType storageAccountType; - /** Creates an instance of ComputeInstanceDataDisk class. */ + /** + * Creates an instance of ComputeInstanceDataDisk class. + */ public ComputeInstanceDataDisk() { } /** * Get the caching property: Caching type of Data Disk. - * + * * @return the caching value. */ public Caching caching() { @@ -52,7 +56,7 @@ public Caching caching() { /** * Set the caching property: Caching type of Data Disk. - * + * * @param caching the caching value to set. * @return the ComputeInstanceDataDisk object itself. */ @@ -63,7 +67,7 @@ public ComputeInstanceDataDisk withCaching(Caching caching) { /** * Get the diskSizeGB property: The initial disk size in gigabytes. - * + * * @return the diskSizeGB value. */ public Integer diskSizeGB() { @@ -72,7 +76,7 @@ public Integer diskSizeGB() { /** * Set the diskSizeGB property: The initial disk size in gigabytes. - * + * * @param diskSizeGB the diskSizeGB value to set. * @return the ComputeInstanceDataDisk object itself. */ @@ -83,10 +87,10 @@ public ComputeInstanceDataDisk withDiskSizeGB(Integer diskSizeGB) { /** * Get the lun property: The logical unit number. - * - *

The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct + * + * The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct * lun. - * + * * @return the lun value. */ public Integer lun() { @@ -95,10 +99,10 @@ public Integer lun() { /** * Set the lun property: The logical unit number. - * - *

The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct + * + * The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct * lun. - * + * * @param lun the lun value to set. * @return the ComputeInstanceDataDisk object itself. */ @@ -109,7 +113,7 @@ public ComputeInstanceDataDisk withLun(Integer lun) { /** * Get the storageAccountType property: type of this storage account. - * + * * @return the storageAccountType value. */ public StorageAccountType storageAccountType() { @@ -118,7 +122,7 @@ public StorageAccountType storageAccountType() { /** * Set the storageAccountType property: type of this storage account. - * + * * @param storageAccountType the storageAccountType value to set. * @return the ComputeInstanceDataDisk object itself. */ @@ -129,7 +133,7 @@ public ComputeInstanceDataDisk withStorageAccountType(StorageAccountType storage /** * 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/ComputeInstanceDataMount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.java index b5c6decae93df..696b8b2f9892e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Defines an Aml Instance DataMount. */ +/** + * Defines an Aml Instance DataMount. + */ @Fluent public final class ComputeInstanceDataMount { /* @@ -35,6 +37,12 @@ public final class ComputeInstanceDataMount { @JsonProperty(value = "mountAction") private MountAction mountAction; + /* + * Mount Mode. + */ + @JsonProperty(value = "mountMode") + private MountMode mountMode; + /* * who this data mount created by. */ @@ -55,7 +63,7 @@ public final class ComputeInstanceDataMount { /* * Mounted time. - * + * * The time when the disk mounted. */ @JsonProperty(value = "mountedOn") @@ -67,13 +75,15 @@ public final class ComputeInstanceDataMount { @JsonProperty(value = "error") private String error; - /** Creates an instance of ComputeInstanceDataMount class. */ + /** + * Creates an instance of ComputeInstanceDataMount class. + */ public ComputeInstanceDataMount() { } /** * Get the source property: Source of the ComputeInstance data mount. - * + * * @return the source value. */ public String source() { @@ -82,7 +92,7 @@ public String source() { /** * Set the source property: Source of the ComputeInstance data mount. - * + * * @param source the source value to set. * @return the ComputeInstanceDataMount object itself. */ @@ -93,7 +103,7 @@ public ComputeInstanceDataMount withSource(String source) { /** * Get the sourceType property: Data source type. - * + * * @return the sourceType value. */ public SourceType sourceType() { @@ -102,7 +112,7 @@ public SourceType sourceType() { /** * Set the sourceType property: Data source type. - * + * * @param sourceType the sourceType value to set. * @return the ComputeInstanceDataMount object itself. */ @@ -113,7 +123,7 @@ public ComputeInstanceDataMount withSourceType(SourceType sourceType) { /** * Get the mountName property: name of the ComputeInstance data mount. - * + * * @return the mountName value. */ public String mountName() { @@ -122,7 +132,7 @@ public String mountName() { /** * Set the mountName property: name of the ComputeInstance data mount. - * + * * @param mountName the mountName value to set. * @return the ComputeInstanceDataMount object itself. */ @@ -133,7 +143,7 @@ public ComputeInstanceDataMount withMountName(String mountName) { /** * Get the mountAction property: Mount Action. - * + * * @return the mountAction value. */ public MountAction mountAction() { @@ -142,7 +152,7 @@ public MountAction mountAction() { /** * Set the mountAction property: Mount Action. - * + * * @param mountAction the mountAction value to set. * @return the ComputeInstanceDataMount object itself. */ @@ -151,9 +161,29 @@ public ComputeInstanceDataMount withMountAction(MountAction mountAction) { return this; } + /** + * Get the mountMode property: Mount Mode. + * + * @return the mountMode value. + */ + public MountMode mountMode() { + return this.mountMode; + } + + /** + * Set the mountMode property: Mount Mode. + * + * @param mountMode the mountMode value to set. + * @return the ComputeInstanceDataMount object itself. + */ + public ComputeInstanceDataMount withMountMode(MountMode mountMode) { + this.mountMode = mountMode; + return this; + } + /** * Get the createdBy property: who this data mount created by. - * + * * @return the createdBy value. */ public String createdBy() { @@ -162,7 +192,7 @@ public String createdBy() { /** * Set the createdBy property: who this data mount created by. - * + * * @param createdBy the createdBy value to set. * @return the ComputeInstanceDataMount object itself. */ @@ -173,7 +203,7 @@ public ComputeInstanceDataMount withCreatedBy(String createdBy) { /** * Get the mountPath property: Path of this data mount. - * + * * @return the mountPath value. */ public String mountPath() { @@ -182,7 +212,7 @@ public String mountPath() { /** * Set the mountPath property: Path of this data mount. - * + * * @param mountPath the mountPath value to set. * @return the ComputeInstanceDataMount object itself. */ @@ -193,7 +223,7 @@ public ComputeInstanceDataMount withMountPath(String mountPath) { /** * Get the mountState property: Mount state. - * + * * @return the mountState value. */ public MountState mountState() { @@ -202,7 +232,7 @@ public MountState mountState() { /** * Set the mountState property: Mount state. - * + * * @param mountState the mountState value to set. * @return the ComputeInstanceDataMount object itself. */ @@ -213,9 +243,9 @@ public ComputeInstanceDataMount withMountState(MountState mountState) { /** * Get the mountedOn property: Mounted time. - * - *

The time when the disk mounted. - * + * + * The time when the disk mounted. + * * @return the mountedOn value. */ public OffsetDateTime mountedOn() { @@ -224,9 +254,9 @@ public OffsetDateTime mountedOn() { /** * Set the mountedOn property: Mounted time. - * - *

The time when the disk mounted. - * + * + * The time when the disk mounted. + * * @param mountedOn the mountedOn value to set. * @return the ComputeInstanceDataMount object itself. */ @@ -237,7 +267,7 @@ public ComputeInstanceDataMount withMountedOn(OffsetDateTime mountedOn) { /** * Get the error property: Error of this data mount. - * + * * @return the error value. */ public String error() { @@ -246,7 +276,7 @@ public String error() { /** * Set the error property: Error of this data mount. - * + * * @param error the error value to set. * @return the ComputeInstanceDataMount object itself. */ @@ -257,7 +287,7 @@ public ComputeInstanceDataMount withError(String error) { /** * 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/ComputeInstanceEnvironmentInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java index d0e05ed76298f..e4d24001f81d4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Environment information. */ +/** + * Environment information. + */ @Fluent public final class ComputeInstanceEnvironmentInfo { /* @@ -22,13 +24,15 @@ public final class ComputeInstanceEnvironmentInfo { @JsonProperty(value = "version") private String version; - /** Creates an instance of ComputeInstanceEnvironmentInfo class. */ + /** + * Creates an instance of ComputeInstanceEnvironmentInfo class. + */ public ComputeInstanceEnvironmentInfo() { } /** * Get the name property: name of environment. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: name of environment. - * + * * @param name the name value to set. * @return the ComputeInstanceEnvironmentInfo object itself. */ @@ -48,7 +52,7 @@ public ComputeInstanceEnvironmentInfo withName(String name) { /** * Get the version property: version of environment. - * + * * @return the version value. */ public String version() { @@ -57,7 +61,7 @@ public String version() { /** * Set the version property: version of environment. - * + * * @param version the version value to set. * @return the ComputeInstanceEnvironmentInfo object itself. */ @@ -68,7 +72,7 @@ public ComputeInstanceEnvironmentInfo withVersion(String version) { /** * 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/ComputeInstanceLastOperation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java index 3f656ff40efca..3aa4e4284a6a5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** The last operation on ComputeInstance. */ +/** + * The last operation on ComputeInstance. + */ @Fluent public final class ComputeInstanceLastOperation { /* @@ -35,13 +37,15 @@ public final class ComputeInstanceLastOperation { @JsonProperty(value = "operationTrigger") private OperationTrigger operationTrigger; - /** Creates an instance of ComputeInstanceLastOperation class. */ + /** + * Creates an instance of ComputeInstanceLastOperation class. + */ public ComputeInstanceLastOperation() { } /** * Get the operationName property: Name of the last operation. - * + * * @return the operationName value. */ public OperationName operationName() { @@ -50,7 +54,7 @@ public OperationName operationName() { /** * Set the operationName property: Name of the last operation. - * + * * @param operationName the operationName value to set. * @return the ComputeInstanceLastOperation object itself. */ @@ -61,7 +65,7 @@ public ComputeInstanceLastOperation withOperationName(OperationName operationNam /** * Get the operationTime property: Time of the last operation. - * + * * @return the operationTime value. */ public OffsetDateTime operationTime() { @@ -70,7 +74,7 @@ public OffsetDateTime operationTime() { /** * Set the operationTime property: Time of the last operation. - * + * * @param operationTime the operationTime value to set. * @return the ComputeInstanceLastOperation object itself. */ @@ -81,7 +85,7 @@ public ComputeInstanceLastOperation withOperationTime(OffsetDateTime operationTi /** * Get the operationStatus property: Operation status. - * + * * @return the operationStatus value. */ public OperationStatus operationStatus() { @@ -90,7 +94,7 @@ public OperationStatus operationStatus() { /** * Set the operationStatus property: Operation status. - * + * * @param operationStatus the operationStatus value to set. * @return the ComputeInstanceLastOperation object itself. */ @@ -101,7 +105,7 @@ public ComputeInstanceLastOperation withOperationStatus(OperationStatus operatio /** * Get the operationTrigger property: Trigger of operation. - * + * * @return the operationTrigger value. */ public OperationTrigger operationTrigger() { @@ -110,7 +114,7 @@ public OperationTrigger operationTrigger() { /** * Set the operationTrigger property: Trigger of operation. - * + * * @param operationTrigger the operationTrigger value to set. * @return the ComputeInstanceLastOperation object itself. */ @@ -121,7 +125,7 @@ public ComputeInstanceLastOperation withOperationTrigger(OperationTrigger operat /** * 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/ComputeInstanceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java index c5332ebf01e8b..2d2c6ca32bd05 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Compute Instance properties. */ +/** + * Compute Instance properties. + */ @Fluent public final class ComputeInstanceProperties { /* @@ -26,7 +28,7 @@ public final class ComputeInstanceProperties { /* * Sharing policy for applications on this compute instance - * + * * Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the * creator can access applications on this compute instance. When Shared, any workspace user can access * applications on this instance depending on his/her assigned role. @@ -34,12 +36,30 @@ public final class ComputeInstanceProperties { @JsonProperty(value = "applicationSharingPolicy") private ApplicationSharingPolicy applicationSharingPolicy; + /* + * Specifies settings for autologger. + */ + @JsonProperty(value = "autologgerSettings") + private ComputeInstanceAutologgerSettings autologgerSettings; + /* * Specifies policy and settings for SSH access. */ @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. */ @@ -60,7 +80,7 @@ public final class ComputeInstanceProperties { /* * Errors. - * + * * Collection of errors encountered on this ComputeInstance. */ @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) @@ -74,12 +94,45 @@ public final class ComputeInstanceProperties { /* * Compute Instance Authorization type. - * + * * The Compute Instance Authorization type. Available values are personal (default). */ @JsonProperty(value = "computeInstanceAuthorizationType") private ComputeInstanceAuthorizationType computeInstanceAuthorizationType; + /* + * Enable Auto OS Patching. + * + * Enable Auto OS Patching. Possible values are: true, false. + */ + @JsonProperty(value = "enableOSPatching") + private Boolean enableOSPatching; + + /* + * Enable root access. + * + * Enable root access. Possible values are: true, false. + */ + @JsonProperty(value = "enableRootAccess") + private Boolean enableRootAccess; + + /* + * Enable SSO (single sign on). + * + * Enable SSO (single sign on). Possible values are: true, false. + */ + @JsonProperty(value = "enableSSO") + private Boolean enableSso; + + /* + * Release quota if compute instance stopped. + * + * Release quota if compute instance stopped. Possible values are: true - release quota if compute instance + * stopped. false - don't release quota when compute instance stopped. + */ + @JsonProperty(value = "releaseQuotaOnStop") + private Boolean releaseQuotaOnStop; + /* * Settings for a personal compute instance. */ @@ -101,12 +154,19 @@ 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; + /* + * Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 + * min, maximum is 3 days. + */ + @JsonProperty(value = "idleTimeBeforeShutdown") + private String idleTimeBeforeShutdown; + /* * Enable node public IP. - * + * * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - * Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will * have a private endpoint and no public IPs. @@ -138,13 +198,15 @@ public final class ComputeInstanceProperties { @JsonProperty(value = "versions", access = JsonProperty.Access.WRITE_ONLY) private ComputeInstanceVersion versions; - /** Creates an instance of ComputeInstanceProperties class. */ + /** + * Creates an instance of ComputeInstanceProperties class. + */ public ComputeInstanceProperties() { } /** * Get the vmSize property: Virtual Machine Size. - * + * * @return the vmSize value. */ public String vmSize() { @@ -153,7 +215,7 @@ public String vmSize() { /** * Set the vmSize property: Virtual Machine Size. - * + * * @param vmSize the vmSize value to set. * @return the ComputeInstanceProperties object itself. */ @@ -164,7 +226,7 @@ public ComputeInstanceProperties withVmSize(String vmSize) { /** * Get the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * + * * @return the subnet value. */ public ResourceId subnet() { @@ -173,7 +235,7 @@ public ResourceId subnet() { /** * Set the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * + * * @param subnet the subnet value to set. * @return the ComputeInstanceProperties object itself. */ @@ -184,11 +246,11 @@ public ComputeInstanceProperties withSubnet(ResourceId subnet) { /** * Get the applicationSharingPolicy property: Sharing policy for applications on this compute instance - * - *

Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only - * the creator can access applications on this compute instance. When Shared, any workspace user can access + * + * Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the + * creator can access applications on this compute instance. When Shared, any workspace user can access * applications on this instance depending on his/her assigned role. - * + * * @return the applicationSharingPolicy value. */ public ApplicationSharingPolicy applicationSharingPolicy() { @@ -197,11 +259,11 @@ public ApplicationSharingPolicy applicationSharingPolicy() { /** * Set the applicationSharingPolicy property: Sharing policy for applications on this compute instance - * - *

Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only - * the creator can access applications on this compute instance. When Shared, any workspace user can access + * + * Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the + * creator can access applications on this compute instance. When Shared, any workspace user can access * applications on this instance depending on his/her assigned role. - * + * * @param applicationSharingPolicy the applicationSharingPolicy value to set. * @return the ComputeInstanceProperties object itself. */ @@ -210,9 +272,29 @@ public ComputeInstanceProperties withApplicationSharingPolicy(ApplicationSharing return this; } + /** + * Get the autologgerSettings property: Specifies settings for autologger. + * + * @return the autologgerSettings value. + */ + public ComputeInstanceAutologgerSettings autologgerSettings() { + return this.autologgerSettings; + } + + /** + * Set the autologgerSettings property: Specifies settings for autologger. + * + * @param autologgerSettings the autologgerSettings value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withAutologgerSettings(ComputeInstanceAutologgerSettings autologgerSettings) { + this.autologgerSettings = autologgerSettings; + return this; + } + /** * Get the sshSettings property: Specifies policy and settings for SSH access. - * + * * @return the sshSettings value. */ public ComputeInstanceSshSettings sshSettings() { @@ -221,7 +303,7 @@ public ComputeInstanceSshSettings sshSettings() { /** * Set the sshSettings property: Specifies policy and settings for SSH access. - * + * * @param sshSettings the sshSettings value to set. * @return the ComputeInstanceProperties object itself. */ @@ -230,9 +312,38 @@ 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. - * + * * @return the connectivityEndpoints value. */ public ComputeInstanceConnectivityEndpoints connectivityEndpoints() { @@ -241,7 +352,7 @@ public ComputeInstanceConnectivityEndpoints connectivityEndpoints() { /** * Get the applications property: Describes available applications and their endpoints on this ComputeInstance. - * + * * @return the applications value. */ public List applications() { @@ -250,7 +361,7 @@ public List applications() { /** * Get the createdBy property: Describes information on user who created this ComputeInstance. - * + * * @return the createdBy value. */ public ComputeInstanceCreatedBy createdBy() { @@ -259,9 +370,9 @@ public ComputeInstanceCreatedBy createdBy() { /** * Get the errors property: Errors. - * - *

Collection of errors encountered on this ComputeInstance. - * + * + * Collection of errors encountered on this ComputeInstance. + * * @return the errors value. */ public List errors() { @@ -270,7 +381,7 @@ public List errors() { /** * Get the state property: The current state of this ComputeInstance. - * + * * @return the state value. */ public ComputeInstanceState state() { @@ -279,9 +390,9 @@ public ComputeInstanceState state() { /** * Get the computeInstanceAuthorizationType property: Compute Instance Authorization type. - * - *

The Compute Instance Authorization type. Available values are personal (default). - * + * + * The Compute Instance Authorization type. Available values are personal (default). + * * @return the computeInstanceAuthorizationType value. */ public ComputeInstanceAuthorizationType computeInstanceAuthorizationType() { @@ -290,21 +401,119 @@ public ComputeInstanceAuthorizationType computeInstanceAuthorizationType() { /** * Set the computeInstanceAuthorizationType property: Compute Instance Authorization type. - * - *

The Compute Instance Authorization type. Available values are personal (default). - * + * + * The Compute Instance Authorization type. Available values are personal (default). + * * @param computeInstanceAuthorizationType the computeInstanceAuthorizationType value to set. * @return the ComputeInstanceProperties object itself. */ - public ComputeInstanceProperties withComputeInstanceAuthorizationType( - ComputeInstanceAuthorizationType computeInstanceAuthorizationType) { + public ComputeInstanceProperties + withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType computeInstanceAuthorizationType) { this.computeInstanceAuthorizationType = computeInstanceAuthorizationType; return this; } + /** + * Get the enableOSPatching property: Enable Auto OS Patching. + * + * Enable Auto OS Patching. Possible values are: true, false. + * + * @return the enableOSPatching value. + */ + public Boolean enableOSPatching() { + return this.enableOSPatching; + } + + /** + * Set the enableOSPatching property: Enable Auto OS Patching. + * + * Enable Auto OS Patching. Possible values are: true, false. + * + * @param enableOSPatching the enableOSPatching value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withEnableOSPatching(Boolean enableOSPatching) { + this.enableOSPatching = enableOSPatching; + return this; + } + + /** + * Get the enableRootAccess property: Enable root access. + * + * Enable root access. Possible values are: true, false. + * + * @return the enableRootAccess value. + */ + public Boolean enableRootAccess() { + return this.enableRootAccess; + } + + /** + * Set the enableRootAccess property: Enable root access. + * + * Enable root access. Possible values are: true, false. + * + * @param enableRootAccess the enableRootAccess value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withEnableRootAccess(Boolean enableRootAccess) { + this.enableRootAccess = enableRootAccess; + return this; + } + + /** + * Get the enableSso property: Enable SSO (single sign on). + * + * Enable SSO (single sign on). Possible values are: true, false. + * + * @return the enableSso value. + */ + public Boolean enableSso() { + return this.enableSso; + } + + /** + * Set the enableSso property: Enable SSO (single sign on). + * + * Enable SSO (single sign on). Possible values are: true, false. + * + * @param enableSso the enableSso value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withEnableSso(Boolean enableSso) { + this.enableSso = enableSso; + return this; + } + + /** + * Get the releaseQuotaOnStop property: Release quota if compute instance stopped. + * + * Release quota if compute instance stopped. Possible values are: true - release quota if compute instance + * stopped. false - don't release quota when compute instance stopped. + * + * @return the releaseQuotaOnStop value. + */ + public Boolean releaseQuotaOnStop() { + return this.releaseQuotaOnStop; + } + + /** + * Set the releaseQuotaOnStop property: Release quota if compute instance stopped. + * + * Release quota if compute instance stopped. Possible values are: true - release quota if compute instance + * stopped. false - don't release quota when compute instance stopped. + * + * @param releaseQuotaOnStop the releaseQuotaOnStop value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withReleaseQuotaOnStop(Boolean releaseQuotaOnStop) { + this.releaseQuotaOnStop = releaseQuotaOnStop; + return this; + } + /** * Get the personalComputeInstanceSettings property: Settings for a personal compute instance. - * + * * @return the personalComputeInstanceSettings value. */ public PersonalComputeInstanceSettings personalComputeInstanceSettings() { @@ -313,19 +522,19 @@ public PersonalComputeInstanceSettings personalComputeInstanceSettings() { /** * Set the personalComputeInstanceSettings property: Settings for a personal compute instance. - * + * * @param personalComputeInstanceSettings the personalComputeInstanceSettings value to set. * @return the ComputeInstanceProperties object itself. */ - public ComputeInstanceProperties withPersonalComputeInstanceSettings( - PersonalComputeInstanceSettings personalComputeInstanceSettings) { + public ComputeInstanceProperties + withPersonalComputeInstanceSettings(PersonalComputeInstanceSettings personalComputeInstanceSettings) { this.personalComputeInstanceSettings = personalComputeInstanceSettings; return this; } /** * Get the setupScripts property: Details of customized scripts to execute for setting up the cluster. - * + * * @return the setupScripts value. */ public SetupScripts setupScripts() { @@ -334,7 +543,7 @@ public SetupScripts setupScripts() { /** * Set the setupScripts property: Details of customized scripts to execute for setting up the cluster. - * + * * @param setupScripts the setupScripts value to set. * @return the ComputeInstanceProperties object itself. */ @@ -345,7 +554,7 @@ public ComputeInstanceProperties withSetupScripts(SetupScripts setupScripts) { /** * Get the lastOperation property: The last operation on ComputeInstance. - * + * * @return the lastOperation value. */ public ComputeInstanceLastOperation lastOperation() { @@ -354,20 +563,53 @@ public ComputeInstanceLastOperation lastOperation() { /** * Get the schedules property: The list of schedules to be applied on the computes. - * + * * @return the schedules value. */ 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 idleTimeBeforeShutdown property: Stops compute instance after user defined period of inactivity. Time is + * defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + * + * @return the idleTimeBeforeShutdown value. + */ + public String idleTimeBeforeShutdown() { + return this.idleTimeBeforeShutdown; + } + + /** + * Set the idleTimeBeforeShutdown property: Stops compute instance after user defined period of inactivity. Time is + * defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + * + * @param idleTimeBeforeShutdown the idleTimeBeforeShutdown value to set. + * @return the ComputeInstanceProperties object itself. + */ + public ComputeInstanceProperties withIdleTimeBeforeShutdown(String idleTimeBeforeShutdown) { + this.idleTimeBeforeShutdown = idleTimeBeforeShutdown; + return this; + } + /** * Get the enableNodePublicIp property: Enable node public IP. - * - *

Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - + * + * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - * Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will * have a private endpoint and no public IPs. - * + * * @return the enableNodePublicIp value. */ public Boolean enableNodePublicIp() { @@ -376,11 +618,11 @@ public Boolean enableNodePublicIp() { /** * Set the enableNodePublicIp property: Enable node public IP. - * - *

Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - + * + * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - * Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will * have a private endpoint and no public IPs. - * + * * @param enableNodePublicIp the enableNodePublicIp value to set. * @return the ComputeInstanceProperties object itself. */ @@ -391,7 +633,7 @@ public ComputeInstanceProperties withEnableNodePublicIp(Boolean enableNodePublic /** * Get the containers property: Describes informations of containers on this ComputeInstance. - * + * * @return the containers value. */ public List containers() { @@ -400,7 +642,7 @@ public List containers() { /** * Get the dataDisks property: Describes informations of dataDisks on this ComputeInstance. - * + * * @return the dataDisks value. */ public List dataDisks() { @@ -409,7 +651,7 @@ public List dataDisks() { /** * Get the dataMounts property: Describes informations of dataMounts on this ComputeInstance. - * + * * @return the dataMounts value. */ public List dataMounts() { @@ -418,7 +660,7 @@ public List dataMounts() { /** * Get the versions property: ComputeInstance version. - * + * * @return the versions value. */ public ComputeInstanceVersion versions() { @@ -427,16 +669,25 @@ public ComputeInstanceVersion versions() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (subnet() != null) { subnet().validate(); } + if (autologgerSettings() != null) { + autologgerSettings().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/ComputeInstanceSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java index 48d4b12a0ab3e..3227e1b4dfacc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties(top level) of ComputeInstance. */ +/** + * Properties(top level) of ComputeInstance. + */ @Fluent public class ComputeInstanceSchema { /* @@ -16,13 +18,15 @@ public class ComputeInstanceSchema { @JsonProperty(value = "properties") private ComputeInstanceProperties properties; - /** Creates an instance of ComputeInstanceSchema class. */ + /** + * Creates an instance of ComputeInstanceSchema class. + */ public ComputeInstanceSchema() { } /** * Get the properties property: Properties of ComputeInstance. - * + * * @return the properties value. */ public ComputeInstanceProperties properties() { @@ -31,7 +35,7 @@ public ComputeInstanceProperties properties() { /** * Set the properties property: Properties of ComputeInstance. - * + * * @param properties the properties value to set. * @return the ComputeInstanceSchema object itself. */ @@ -42,7 +46,7 @@ public ComputeInstanceSchema withProperties(ComputeInstanceProperties properties /** * 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/ComputeInstanceSshSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java index fa34e74a58897..c7c26c0947e70 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java @@ -7,12 +7,14 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specifies policy and settings for SSH access. */ +/** + * Specifies policy and settings for SSH access. + */ @Fluent public final class ComputeInstanceSshSettings { /* * Access policy for SSH - * + * * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on * this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet * policy if applicable. @@ -39,17 +41,19 @@ public final class ComputeInstanceSshSettings { @JsonProperty(value = "adminPublicKey") private String adminPublicKey; - /** Creates an instance of ComputeInstanceSshSettings class. */ + /** + * Creates an instance of ComputeInstanceSshSettings class. + */ public ComputeInstanceSshSettings() { } /** * Get the sshPublicAccess property: Access policy for SSH - * - *

State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on + * + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on * this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet * policy if applicable. - * + * * @return the sshPublicAccess value. */ public SshPublicAccess sshPublicAccess() { @@ -58,11 +62,11 @@ public SshPublicAccess sshPublicAccess() { /** * Set the sshPublicAccess property: Access policy for SSH - * - *

State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on + * + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on * this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet * policy if applicable. - * + * * @param sshPublicAccess the sshPublicAccess value to set. * @return the ComputeInstanceSshSettings object itself. */ @@ -73,7 +77,7 @@ public ComputeInstanceSshSettings withSshPublicAccess(SshPublicAccess sshPublicA /** * Get the adminUsername property: Describes the admin user name. - * + * * @return the adminUsername value. */ public String adminUsername() { @@ -82,7 +86,7 @@ public String adminUsername() { /** * Get the sshPort property: Describes the port for connecting through SSH. - * + * * @return the sshPort value. */ public Integer sshPort() { @@ -92,7 +96,7 @@ public Integer sshPort() { /** * Get the adminPublicKey property: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b * 2048" to generate your SSH key pairs. - * + * * @return the adminPublicKey value. */ public String adminPublicKey() { @@ -102,7 +106,7 @@ public String adminPublicKey() { /** * Set the adminPublicKey property: Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b * 2048" to generate your SSH key pairs. - * + * * @param adminPublicKey the adminPublicKey value to set. * @return the ComputeInstanceSshSettings object itself. */ @@ -113,7 +117,7 @@ public ComputeInstanceSshSettings withAdminPublicKey(String adminPublicKey) { /** * 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/ComputeInstanceState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java index 7e62436e09e71..2d2a469ad2b79 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java @@ -8,56 +8,93 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Current state of an ComputeInstance. */ +/** + * Current state of an ComputeInstance. + */ public final class ComputeInstanceState extends ExpandableStringEnum { - /** Static value Creating for ComputeInstanceState. */ + /** + * Static value Creating for ComputeInstanceState. + */ public static final ComputeInstanceState CREATING = fromString("Creating"); - /** Static value CreateFailed for ComputeInstanceState. */ + /** + * Static value CreateFailed for ComputeInstanceState. + */ public static final ComputeInstanceState CREATE_FAILED = fromString("CreateFailed"); - /** Static value Deleting for ComputeInstanceState. */ + /** + * Static value Deleting for ComputeInstanceState. + */ public static final ComputeInstanceState DELETING = fromString("Deleting"); - /** Static value Running for ComputeInstanceState. */ + /** + * Static value Running for ComputeInstanceState. + */ public static final ComputeInstanceState RUNNING = fromString("Running"); - /** Static value Restarting for ComputeInstanceState. */ + /** + * Static value Restarting for ComputeInstanceState. + */ public static final ComputeInstanceState RESTARTING = fromString("Restarting"); - /** Static value JobRunning for ComputeInstanceState. */ + /** + * Static value Resizing for ComputeInstanceState. + */ + public static final ComputeInstanceState RESIZING = fromString("Resizing"); + + /** + * Static value JobRunning for ComputeInstanceState. + */ public static final ComputeInstanceState JOB_RUNNING = fromString("JobRunning"); - /** Static value SettingUp for ComputeInstanceState. */ + /** + * Static value SettingUp for ComputeInstanceState. + */ public static final ComputeInstanceState SETTING_UP = fromString("SettingUp"); - /** Static value SetupFailed for ComputeInstanceState. */ + /** + * Static value SetupFailed for ComputeInstanceState. + */ public static final ComputeInstanceState SETUP_FAILED = fromString("SetupFailed"); - /** Static value Starting for ComputeInstanceState. */ + /** + * Static value Starting for ComputeInstanceState. + */ public static final ComputeInstanceState STARTING = fromString("Starting"); - /** Static value Stopped for ComputeInstanceState. */ + /** + * Static value Stopped for ComputeInstanceState. + */ public static final ComputeInstanceState STOPPED = fromString("Stopped"); - /** Static value Stopping for ComputeInstanceState. */ + /** + * Static value Stopping for ComputeInstanceState. + */ public static final ComputeInstanceState STOPPING = fromString("Stopping"); - /** Static value UserSettingUp for ComputeInstanceState. */ + /** + * Static value UserSettingUp for ComputeInstanceState. + */ public static final ComputeInstanceState USER_SETTING_UP = fromString("UserSettingUp"); - /** Static value UserSetupFailed for ComputeInstanceState. */ + /** + * Static value UserSetupFailed for ComputeInstanceState. + */ public static final ComputeInstanceState USER_SETUP_FAILED = fromString("UserSetupFailed"); - /** Static value Unknown for ComputeInstanceState. */ + /** + * Static value Unknown for ComputeInstanceState. + */ public static final ComputeInstanceState UNKNOWN = fromString("Unknown"); - /** Static value Unusable for ComputeInstanceState. */ + /** + * Static value Unusable for ComputeInstanceState. + */ public static final ComputeInstanceState UNUSABLE = fromString("Unusable"); /** * Creates a new instance of ComputeInstanceState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -66,7 +103,7 @@ public ComputeInstanceState() { /** * Creates or finds a ComputeInstanceState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ComputeInstanceState. */ @@ -77,7 +114,7 @@ public static ComputeInstanceState fromString(String name) { /** * Gets known ComputeInstanceState values. - * + * * @return known ComputeInstanceState values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java index e8b7f1b2d1cbb..6e0b5248b8464 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Version of computeInstance. */ +/** + * Version of computeInstance. + */ @Fluent public final class ComputeInstanceVersion { /* @@ -16,13 +18,15 @@ public final class ComputeInstanceVersion { @JsonProperty(value = "runtime") private String runtime; - /** Creates an instance of ComputeInstanceVersion class. */ + /** + * Creates an instance of ComputeInstanceVersion class. + */ public ComputeInstanceVersion() { } /** * Get the runtime property: Runtime of compute instance. - * + * * @return the runtime value. */ public String runtime() { @@ -31,7 +35,7 @@ public String runtime() { /** * Set the runtime property: Runtime of compute instance. - * + * * @param runtime the runtime value to set. * @return the ComputeInstanceVersion object itself. */ @@ -42,7 +46,7 @@ public ComputeInstanceVersion withRuntime(String runtime) { /** * 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/ComputePowerAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java index e486bcfd2863c..349c3d56919d6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The compute power action. */ +/** + * [Required] The compute power action. + */ public final class ComputePowerAction extends ExpandableStringEnum { - /** Static value Start for ComputePowerAction. */ + /** + * Static value Start for ComputePowerAction. + */ public static final ComputePowerAction START = fromString("Start"); - /** Static value Stop for ComputePowerAction. */ + /** + * Static value Stop for ComputePowerAction. + */ public static final ComputePowerAction STOP = fromString("Stop"); /** * Creates a new instance of ComputePowerAction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ComputePowerAction() { /** * Creates or finds a ComputePowerAction from its string representation. - * + * * @param name a name to look for. * @return the corresponding ComputePowerAction. */ @@ -38,7 +44,7 @@ public static ComputePowerAction fromString(String name) { /** * Gets known ComputePowerAction values. - * + * * @return known ComputePowerAction values. */ public static Collection values() { 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..b020995a90794 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.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.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..0dec398a5720b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.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.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..9e89f2ef08796 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 @@ -10,151 +10,164 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; +import java.util.List; import java.util.Map; -/** An immutable client-side representation of ComputeResource. */ +/** + * An immutable client-side representation of ComputeResource. + */ public interface ComputeResource { /** * 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 identity property: The identity of the resource. - * + * * @return the identity value. */ ManagedServiceIdentity identity(); /** * Gets the location property: Specifies the location of the resource. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Contains resource tags defined as key/value pairs. - * + * * @return the tags value. */ Map tags(); /** * Gets the sku property: The sku of the workspace. - * + * * @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 properties property: Compute properties. - * + * * @return the properties value. */ Compute properties(); /** * 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.ComputeResourceInner object. - * + * * @return the inner object. */ ComputeResourceInner innerModel(); - /** The entirety of the ComputeResource definition. */ + /** + * The entirety of the ComputeResource definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ComputeResource definition stages. */ + + /** + * The ComputeResource definition stages. + */ interface DefinitionStages { - /** The first stage of the ComputeResource definition. */ + /** + * The first stage of the ComputeResource definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ComputeResource definition allowing to specify parent resource. */ + + /** + * The stage of the ComputeResource 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. */ 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. */ - interface WithCreate - extends DefinitionStages.WithLocation, - DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithSku, - DefinitionStages.WithProperties { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithIdentity, DefinitionStages.WithSku, DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ ComputeResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ComputeResource create(Context context); } - /** The stage of the ComputeResource definition allowing to specify location. */ + + /** + * The stage of the ComputeResource definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location Specifies the location of the resource. * @return the next definition stage. */ @@ -162,151 +175,216 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location Specifies the location of the resource. * @return the next definition stage. */ WithCreate withRegion(String location); } - /** The stage of the ComputeResource definition allowing to specify tags. */ + + /** + * The stage of the ComputeResource definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Contains resource tags defined as key/value pairs.. - * + * * @param tags Contains resource tags defined as key/value pairs. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ComputeResource definition allowing to specify identity. */ + + /** + * The stage of the ComputeResource definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: The identity of the resource.. - * + * * @param identity The identity of the resource. * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the ComputeResource definition allowing to specify sku. */ + + /** + * The stage of the ComputeResource definition allowing to specify sku. + */ interface WithSku { /** * Specifies the sku property: The sku of the workspace.. - * + * * @param sku The sku of the workspace. * @return the next definition stage. */ WithCreate withSku(Sku sku); } - /** The stage of the ComputeResource definition allowing to specify properties. */ + + /** + * The stage of the ComputeResource definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Compute properties. - * + * * @param properties Compute properties. * @return the next definition stage. */ WithCreate withProperties(Compute properties); } } + /** * Begins update for the ComputeResource resource. - * + * * @return the stage of resource update. */ ComputeResource.Update update(); - /** The template for ComputeResource update. */ + /** + * The template for ComputeResource update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ ComputeResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ComputeResource apply(Context context); } - /** The ComputeResource update stages. */ + + /** + * The ComputeResource update stages. + */ interface UpdateStages { - /** The stage of the ComputeResource update allowing to specify properties. */ + /** + * The stage of the ComputeResource update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Properties of ClusterUpdate. - * + * * @param properties Properties of ClusterUpdate. * @return the next definition stage. */ Update withProperties(ScaleSettingsInformation properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ComputeResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ ComputeResource refresh(Context context); + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 updateCustomServicesWithResponse(List customServices, Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateCustomServices(List customServices); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable listNodes(); /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable listNodes(Context context); /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with + * {@link Response}. */ Response listKeysWithResponse(Context context); /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). */ ComputeSecrets listKeys(); + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param dataMounts The parameters for creating or updating 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 Response}. + */ + Response updateDataMountsWithResponse(List dataMounts, Context context); + + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param dataMounts The parameters for creating or updating 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. + */ + void updateDataMounts(List dataMounts); + /** * Posts a start action to a compute instance. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -314,7 +392,7 @@ interface WithProperties { /** * Posts a start action to a compute instance. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -324,7 +402,7 @@ interface WithProperties { /** * Posts a stop action to a compute instance. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -332,7 +410,7 @@ interface WithProperties { /** * Posts a stop action to a compute instance. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -342,7 +420,7 @@ interface WithProperties { /** * Posts a restart action to a compute instance. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -350,11 +428,74 @@ interface WithProperties { /** * Posts a restart action to a compute instance. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void restart(Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 updateIdleShutdownSettingWithResponse(IdleShutdownSetting parameters, Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateIdleShutdownSetting(IdleShutdownSetting parameters); + + /** + * Returns supported virtual machine sizes for resize. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response along with {@link Response}. + */ + Response getAllowedResizeSizesWithResponse(Context context); + + /** + * Returns supported virtual machine sizes for resize. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response. + */ + VirtualMachineSizeListResult getAllowedResizeSizes(); + + /** + * Updates the size of a Compute Instance. + * + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resize(ResizeSchema parameters); + + /** + * Updates the size of a Compute Instance. + * + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resize(ResizeSchema parameters, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java index 4b0b7c7000d23..b61e58062cdfb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ComputeResourceSchema model. */ +/** + * The ComputeResourceSchema model. + */ @Fluent public class ComputeResourceSchema { /* @@ -16,13 +18,15 @@ public class ComputeResourceSchema { @JsonProperty(value = "properties") private Compute properties; - /** Creates an instance of ComputeResourceSchema class. */ + /** + * Creates an instance of ComputeResourceSchema class. + */ public ComputeResourceSchema() { } /** * Get the properties property: Compute properties. - * + * * @return the properties value. */ public Compute properties() { @@ -31,7 +35,7 @@ public Compute properties() { /** * Set the properties property: Compute properties. - * + * * @param properties the properties value to set. * @return the ComputeResourceSchema object itself. */ @@ -42,7 +46,7 @@ public ComputeResourceSchema withProperties(Compute properties) { /** * 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/ComputeRuntimeDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java new file mode 100644 index 0000000000000..6243110df227c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.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 ComputeRuntimeDto model. + */ +@Fluent +public final class ComputeRuntimeDto { + /* + * The sparkRuntimeVersion property. + */ + @JsonProperty(value = "sparkRuntimeVersion") + private String sparkRuntimeVersion; + + /** + * Creates an instance of ComputeRuntimeDto class. + */ + public ComputeRuntimeDto() { + } + + /** + * Get the sparkRuntimeVersion property: The sparkRuntimeVersion property. + * + * @return the sparkRuntimeVersion value. + */ + public String sparkRuntimeVersion() { + return this.sparkRuntimeVersion; + } + + /** + * Set the sparkRuntimeVersion property: The sparkRuntimeVersion property. + * + * @param sparkRuntimeVersion the sparkRuntimeVersion value to set. + * @return the ComputeRuntimeDto object itself. + */ + public ComputeRuntimeDto withSparkRuntimeVersion(String sparkRuntimeVersion) { + this.sparkRuntimeVersion = sparkRuntimeVersion; + 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/ComputeSchedules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java index 78b9effb9a9f6..f9f1361980cad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The list of schedules to be applied on the computes. */ +/** + * The list of schedules to be applied on the computes. + */ @Fluent public final class ComputeSchedules { /* @@ -17,13 +19,15 @@ public final class ComputeSchedules { @JsonProperty(value = "computeStartStop") private List computeStartStop; - /** Creates an instance of ComputeSchedules class. */ + /** + * Creates an instance of ComputeSchedules class. + */ public ComputeSchedules() { } /** * Get the computeStartStop property: The list of compute start stop schedules to be applied. - * + * * @return the computeStartStop value. */ public List computeStartStop() { @@ -32,7 +36,7 @@ public List computeStartStop() { /** * Set the computeStartStop property: The list of compute start stop schedules to be applied. - * + * * @param computeStartStop the computeStartStop value to set. * @return the ComputeSchedules object itself. */ @@ -43,7 +47,7 @@ public ComputeSchedules withComputeStartStop(List comp /** * 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/ComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java index ab0429a6d9da3..c7aaacc154932 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java @@ -6,11 +6,13 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -/** An immutable client-side representation of ComputeSecrets. */ +/** + * An immutable client-side representation of ComputeSecrets. + */ public interface ComputeSecrets { /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner object. - * + * * @return the inner object. */ ComputeSecretsInner innerModel(); 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..2add8188d2724 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Compute start stop schedule properties. */ +/** + * Compute start stop schedule properties. + */ @Fluent public final class ComputeStartStopSchedule { /* @@ -38,19 +40,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. @@ -58,13 +60,15 @@ public final class ComputeStartStopSchedule { @JsonProperty(value = "schedule") private ScheduleBase schedule; - /** Creates an instance of ComputeStartStopSchedule class. */ + /** + * Creates an instance of ComputeStartStopSchedule class. + */ public ComputeStartStopSchedule() { } /** * Get the id property: A system assigned id for the schedule. - * + * * @return the id value. */ public String id() { @@ -73,7 +77,7 @@ public String id() { /** * Get the provisioningStatus property: The current deployment state of schedule. - * + * * @return the provisioningStatus value. */ public ProvisioningStatus provisioningStatus() { @@ -82,7 +86,7 @@ public ProvisioningStatus provisioningStatus() { /** * Get the status property: Is the schedule enabled or disabled?. - * + * * @return the status value. */ public ScheduleStatus status() { @@ -91,7 +95,7 @@ public ScheduleStatus status() { /** * Set the status property: Is the schedule enabled or disabled?. - * + * * @param status the status value to set. * @return the ComputeStartStopSchedule object itself. */ @@ -102,7 +106,7 @@ public ComputeStartStopSchedule withStatus(ScheduleStatus status) { /** * Get the action property: [Required] The compute power action. - * + * * @return the action value. */ public ComputePowerAction action() { @@ -111,7 +115,7 @@ public ComputePowerAction action() { /** * Set the action property: [Required] The compute power action. - * + * * @param action the action value to set. * @return the ComputeStartStopSchedule object itself. */ @@ -122,67 +126,67 @@ public ComputeStartStopSchedule withAction(ComputePowerAction action) { /** * Get the triggerType property: [Required] The schedule trigger type. - * + * * @return the triggerType value. */ - public TriggerType triggerType() { + public ComputeTriggerType triggerType() { return this.triggerType; } /** * Set the triggerType property: [Required] The schedule trigger type. - * + * * @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; } /** * Get the recurrence property: Required if triggerType is Recurrence. - * + * * @return the recurrence value. */ - public RecurrenceTrigger recurrence() { + public Recurrence recurrence() { return this.recurrence; } /** * Set the recurrence property: Required if triggerType is 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; } /** * Get the cron property: Required if triggerType is Cron. - * + * * @return the cron value. */ - public CronTrigger cron() { + public Cron cron() { return this.cron; } /** * Set the cron property: Required if triggerType is 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; } /** * Get the schedule property: [Deprecated] Not used any more. - * + * * @return the schedule value. */ public ScheduleBase schedule() { @@ -191,7 +195,7 @@ public ScheduleBase schedule() { /** * Set the schedule property: [Deprecated] Not used any more. - * + * * @param schedule the schedule value to set. * @return the ComputeStartStopSchedule object itself. */ @@ -202,7 +206,7 @@ public ComputeStartStopSchedule withSchedule(ScheduleBase schedule) { /** * 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/ComputeTriggerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java new file mode 100644 index 0000000000000..0954e9ba2b664 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.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 ComputeTriggerType. + */ +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/ComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java index c3a28e6d05608..877891aceac7f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java @@ -8,41 +8,63 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of compute. */ +/** + * The type of compute. + */ public final class ComputeType extends ExpandableStringEnum { - /** Static value AKS for ComputeType. */ + /** + * Static value AKS for ComputeType. + */ public static final ComputeType AKS = fromString("AKS"); - /** Static value Kubernetes for ComputeType. */ + /** + * Static value Kubernetes for ComputeType. + */ public static final ComputeType KUBERNETES = fromString("Kubernetes"); - /** Static value AmlCompute for ComputeType. */ + /** + * Static value AmlCompute for ComputeType. + */ public static final ComputeType AML_COMPUTE = fromString("AmlCompute"); - /** Static value ComputeInstance for ComputeType. */ + /** + * Static value ComputeInstance for ComputeType. + */ public static final ComputeType COMPUTE_INSTANCE = fromString("ComputeInstance"); - /** Static value DataFactory for ComputeType. */ + /** + * Static value DataFactory for ComputeType. + */ public static final ComputeType DATA_FACTORY = fromString("DataFactory"); - /** Static value VirtualMachine for ComputeType. */ + /** + * Static value VirtualMachine for ComputeType. + */ public static final ComputeType VIRTUAL_MACHINE = fromString("VirtualMachine"); - /** Static value HDInsight for ComputeType. */ + /** + * Static value HDInsight for ComputeType. + */ public static final ComputeType HDINSIGHT = fromString("HDInsight"); - /** Static value Databricks for ComputeType. */ + /** + * Static value Databricks for ComputeType. + */ public static final ComputeType DATABRICKS = fromString("Databricks"); - /** Static value DataLakeAnalytics for ComputeType. */ + /** + * Static value DataLakeAnalytics for ComputeType. + */ public static final ComputeType DATA_LAKE_ANALYTICS = fromString("DataLakeAnalytics"); - /** Static value SynapseSpark for ComputeType. */ + /** + * Static value SynapseSpark for ComputeType. + */ public static final ComputeType SYNAPSE_SPARK = fromString("SynapseSpark"); /** * Creates a new instance of ComputeType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -51,7 +73,7 @@ public ComputeType() { /** * Creates or finds a ComputeType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ComputeType. */ @@ -62,7 +84,7 @@ public static ComputeType fromString(String name) { /** * Gets known ComputeType values. - * + * * @return known ComputeType values. */ public static Collection values() { 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..379afb253c176 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.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.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/Computes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java index 007d1460f249f..028b08b3cacd2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java @@ -7,12 +7,15 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import java.util.List; -/** Resource collection API of Computes. */ +/** + * Resource collection API of Computes. + */ public interface Computes { /** * Gets computes in specified 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. @@ -24,7 +27,7 @@ public interface Computes { /** * Gets computes in specified workspace. - * + * * @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. @@ -39,7 +42,7 @@ public interface Computes { /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -49,13 +52,13 @@ public interface Computes { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return compute definition by its name along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, + Context context); /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -68,45 +71,68 @@ Response getWithResponse( /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 computeName, + void delete(String resourceGroupName, String workspaceName, String computeName, UnderlyingResourceAction underlyingResourceAction); /** * Deletes specified Machine Learning compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * workspace if 'Detach'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.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 computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context); + void delete(String resourceGroupName, String workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction, Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 updateCustomServicesWithResponse(String resourceGroupName, String workspaceName, String computeName, + List customServices, Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateCustomServices(String resourceGroupName, String workspaceName, String computeName, + List customServices); /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -114,14 +140,14 @@ void delete( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ - PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName); + PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName); /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -130,14 +156,14 @@ PagedIterable listNodes( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ - PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName, Context context); + PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName, Context context); /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -145,15 +171,15 @@ PagedIterable listNodes( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with + * {@link Response}. */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); + Response listKeysWithResponse(String resourceGroupName, String workspaceName, String computeName, + Context context); /** * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -164,9 +190,39 @@ Response listKeysWithResponse( */ ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName); + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating 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 Response}. + */ + Response updateDataMountsWithResponse(String resourceGroupName, String workspaceName, String computeName, + List dataMounts, Context context); + + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating 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. + */ + void updateDataMounts(String resourceGroupName, String workspaceName, String computeName, + List dataMounts); + /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -178,7 +234,7 @@ Response listKeysWithResponse( /** * Posts a start action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -191,7 +247,7 @@ Response listKeysWithResponse( /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -203,7 +259,7 @@ Response listKeysWithResponse( /** * Posts a stop action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -216,7 +272,7 @@ Response listKeysWithResponse( /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -228,7 +284,7 @@ Response listKeysWithResponse( /** * Posts a restart action to a compute instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param computeName Name of the Azure Machine Learning compute. @@ -239,10 +295,97 @@ Response listKeysWithResponse( */ void restart(String resourceGroupName, String workspaceName, String computeName, Context context); + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 updateIdleShutdownSettingWithResponse(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters, Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 updateIdleShutdownSetting(String resourceGroupName, String workspaceName, String computeName, + IdleShutdownSetting parameters); + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response along with {@link Response}. + */ + Response getAllowedResizeSizesWithResponse(String resourceGroupName, + String workspaceName, String computeName, Context context); + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List Virtual Machine size operation response. + */ + VirtualMachineSizeListResult getAllowedResizeSizes(String resourceGroupName, String workspaceName, + String computeName); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters, + Context context); + /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @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. @@ -254,7 +397,7 @@ Response listKeysWithResponse( /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -266,7 +409,7 @@ Response listKeysWithResponse( /** * Begins definition for a new ComputeResource resource. - * + * * @param name resource name. * @return the first stage of the new ComputeResource definition. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java index 04ac12e98553a..1085d7e5af960 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java @@ -8,26 +8,73 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Authentication type of the connection target. */ +/** + * Authentication type of the connection target. + */ public final class ConnectionAuthType extends ExpandableStringEnum { - /** Static value PAT for ConnectionAuthType. */ + /** + * Static value PAT for ConnectionAuthType. + */ public static final ConnectionAuthType PAT = fromString("PAT"); - /** Static value ManagedIdentity for ConnectionAuthType. */ + /** + * Static value ManagedIdentity for ConnectionAuthType. + */ public static final ConnectionAuthType MANAGED_IDENTITY = fromString("ManagedIdentity"); - /** Static value UsernamePassword for ConnectionAuthType. */ + /** + * Static value UsernamePassword for ConnectionAuthType. + */ public static final ConnectionAuthType USERNAME_PASSWORD = fromString("UsernamePassword"); - /** Static value None for ConnectionAuthType. */ + /** + * Static value None for ConnectionAuthType. + */ public static final ConnectionAuthType NONE = fromString("None"); - /** Static value SAS for ConnectionAuthType. */ + /** + * Static value SAS for ConnectionAuthType. + */ public static final ConnectionAuthType SAS = fromString("SAS"); + /** + * Static value AccountKey for ConnectionAuthType. + */ + public static final ConnectionAuthType ACCOUNT_KEY = fromString("AccountKey"); + + /** + * Static value ServicePrincipal for ConnectionAuthType. + */ + public static final ConnectionAuthType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); + + /** + * Static value AccessKey for ConnectionAuthType. + */ + public static final ConnectionAuthType ACCESS_KEY = fromString("AccessKey"); + + /** + * Static value ApiKey for ConnectionAuthType. + */ + public static final ConnectionAuthType API_KEY = fromString("ApiKey"); + + /** + * Static value CustomKeys for ConnectionAuthType. + */ + public static final ConnectionAuthType CUSTOM_KEYS = fromString("CustomKeys"); + + /** + * Static value OAuth2 for ConnectionAuthType. + */ + public static final ConnectionAuthType OAUTH2 = fromString("OAuth2"); + + /** + * Static value AAD for ConnectionAuthType. + */ + public static final ConnectionAuthType AAD = fromString("AAD"); + /** * Creates a new instance of ConnectionAuthType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +83,7 @@ public ConnectionAuthType() { /** * Creates or finds a ConnectionAuthType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ConnectionAuthType. */ @@ -47,7 +94,7 @@ public static ConnectionAuthType fromString(String name) { /** * Gets known ConnectionAuthType values. - * + * * @return known ConnectionAuthType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java index bbddfa94d65d7..588c5c6cfc8d0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java @@ -8,20 +8,498 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Category of the connection. */ +/** + * Category of the connection. + */ public final class ConnectionCategory extends ExpandableStringEnum { - /** Static value PythonFeed for ConnectionCategory. */ + /** + * Static value PythonFeed for ConnectionCategory. + */ public static final ConnectionCategory PYTHON_FEED = fromString("PythonFeed"); - /** Static value ContainerRegistry for ConnectionCategory. */ + /** + * Static value ContainerRegistry for ConnectionCategory. + */ public static final ConnectionCategory CONTAINER_REGISTRY = fromString("ContainerRegistry"); - /** Static value Git for ConnectionCategory. */ + /** + * Static value Git for ConnectionCategory. + */ public static final ConnectionCategory GIT = fromString("Git"); + /** + * Static value S3 for ConnectionCategory. + */ + public static final ConnectionCategory S3 = fromString("S3"); + + /** + * Static value Snowflake for ConnectionCategory. + */ + public static final ConnectionCategory SNOWFLAKE = fromString("Snowflake"); + + /** + * Static value AzureSqlDb for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_SQL_DB = fromString("AzureSqlDb"); + + /** + * Static value AzureSynapseAnalytics for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_SYNAPSE_ANALYTICS = fromString("AzureSynapseAnalytics"); + + /** + * Static value AzureMySqlDb for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_MY_SQL_DB = fromString("AzureMySqlDb"); + + /** + * Static value AzurePostgresDb for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_POSTGRES_DB = fromString("AzurePostgresDb"); + + /** + * Static value ADLSGen2 for ConnectionCategory. + */ + public static final ConnectionCategory ADLSGEN2 = fromString("ADLSGen2"); + + /** + * Static value Redis for ConnectionCategory. + */ + public static final ConnectionCategory REDIS = fromString("Redis"); + + /** + * Static value ApiKey for ConnectionCategory. + */ + public static final ConnectionCategory API_KEY = fromString("ApiKey"); + + /** + * Static value AzureOpenAI for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_OPEN_AI = fromString("AzureOpenAI"); + + /** + * Static value CognitiveSearch for ConnectionCategory. + */ + public static final ConnectionCategory COGNITIVE_SEARCH = fromString("CognitiveSearch"); + + /** + * Static value CognitiveService for ConnectionCategory. + */ + public static final ConnectionCategory COGNITIVE_SERVICE = fromString("CognitiveService"); + + /** + * Static value CustomKeys for ConnectionCategory. + */ + public static final ConnectionCategory CUSTOM_KEYS = fromString("CustomKeys"); + + /** + * Static value AzureBlob for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_BLOB = fromString("AzureBlob"); + + /** + * Static value AzureOneLake for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_ONE_LAKE = fromString("AzureOneLake"); + + /** + * Static value CosmosDb for ConnectionCategory. + */ + public static final ConnectionCategory COSMOS_DB = fromString("CosmosDb"); + + /** + * Static value CosmosDbMongoDbApi for ConnectionCategory. + */ + public static final ConnectionCategory COSMOS_DB_MONGO_DB_API = fromString("CosmosDbMongoDbApi"); + + /** + * Static value AzureDataExplorer for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_DATA_EXPLORER = fromString("AzureDataExplorer"); + + /** + * Static value AzureMariaDb for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_MARIA_DB = fromString("AzureMariaDb"); + + /** + * Static value AzureDatabricksDeltaLake for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_DATABRICKS_DELTA_LAKE = fromString("AzureDatabricksDeltaLake"); + + /** + * Static value AzureSqlMi for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_SQL_MI = fromString("AzureSqlMi"); + + /** + * Static value AzureTableStorage for ConnectionCategory. + */ + public static final ConnectionCategory AZURE_TABLE_STORAGE = fromString("AzureTableStorage"); + + /** + * Static value AmazonRdsForOracle for ConnectionCategory. + */ + public static final ConnectionCategory AMAZON_RDS_FOR_ORACLE = fromString("AmazonRdsForOracle"); + + /** + * Static value AmazonRdsForSqlServer for ConnectionCategory. + */ + public static final ConnectionCategory AMAZON_RDS_FOR_SQL_SERVER = fromString("AmazonRdsForSqlServer"); + + /** + * Static value AmazonRedshift for ConnectionCategory. + */ + public static final ConnectionCategory AMAZON_REDSHIFT = fromString("AmazonRedshift"); + + /** + * Static value Db2 for ConnectionCategory. + */ + public static final ConnectionCategory DB2 = fromString("Db2"); + + /** + * Static value Drill for ConnectionCategory. + */ + public static final ConnectionCategory DRILL = fromString("Drill"); + + /** + * Static value GoogleBigQuery for ConnectionCategory. + */ + public static final ConnectionCategory GOOGLE_BIG_QUERY = fromString("GoogleBigQuery"); + + /** + * Static value Greenplum for ConnectionCategory. + */ + public static final ConnectionCategory GREENPLUM = fromString("Greenplum"); + + /** + * Static value Hbase for ConnectionCategory. + */ + public static final ConnectionCategory HBASE = fromString("Hbase"); + + /** + * Static value Hive for ConnectionCategory. + */ + public static final ConnectionCategory HIVE = fromString("Hive"); + + /** + * Static value Impala for ConnectionCategory. + */ + public static final ConnectionCategory IMPALA = fromString("Impala"); + + /** + * Static value Informix for ConnectionCategory. + */ + public static final ConnectionCategory INFORMIX = fromString("Informix"); + + /** + * Static value MariaDb for ConnectionCategory. + */ + public static final ConnectionCategory MARIA_DB = fromString("MariaDb"); + + /** + * Static value MicrosoftAccess for ConnectionCategory. + */ + public static final ConnectionCategory MICROSOFT_ACCESS = fromString("MicrosoftAccess"); + + /** + * Static value MySql for ConnectionCategory. + */ + public static final ConnectionCategory MY_SQL = fromString("MySql"); + + /** + * Static value Netezza for ConnectionCategory. + */ + public static final ConnectionCategory NETEZZA = fromString("Netezza"); + + /** + * Static value Oracle for ConnectionCategory. + */ + public static final ConnectionCategory ORACLE = fromString("Oracle"); + + /** + * Static value Phoenix for ConnectionCategory. + */ + public static final ConnectionCategory PHOENIX = fromString("Phoenix"); + + /** + * Static value PostgreSql for ConnectionCategory. + */ + public static final ConnectionCategory POSTGRE_SQL = fromString("PostgreSql"); + + /** + * Static value Presto for ConnectionCategory. + */ + public static final ConnectionCategory PRESTO = fromString("Presto"); + + /** + * Static value SapOpenHub for ConnectionCategory. + */ + public static final ConnectionCategory SAP_OPEN_HUB = fromString("SapOpenHub"); + + /** + * Static value SapBw for ConnectionCategory. + */ + public static final ConnectionCategory SAP_BW = fromString("SapBw"); + + /** + * Static value SapHana for ConnectionCategory. + */ + public static final ConnectionCategory SAP_HANA = fromString("SapHana"); + + /** + * Static value SapTable for ConnectionCategory. + */ + public static final ConnectionCategory SAP_TABLE = fromString("SapTable"); + + /** + * Static value Spark for ConnectionCategory. + */ + public static final ConnectionCategory SPARK = fromString("Spark"); + + /** + * Static value SqlServer for ConnectionCategory. + */ + public static final ConnectionCategory SQL_SERVER = fromString("SqlServer"); + + /** + * Static value Sybase for ConnectionCategory. + */ + public static final ConnectionCategory SYBASE = fromString("Sybase"); + + /** + * Static value Teradata for ConnectionCategory. + */ + public static final ConnectionCategory TERADATA = fromString("Teradata"); + + /** + * Static value Vertica for ConnectionCategory. + */ + public static final ConnectionCategory VERTICA = fromString("Vertica"); + + /** + * Static value Cassandra for ConnectionCategory. + */ + public static final ConnectionCategory CASSANDRA = fromString("Cassandra"); + + /** + * Static value Couchbase for ConnectionCategory. + */ + public static final ConnectionCategory COUCHBASE = fromString("Couchbase"); + + /** + * Static value MongoDbV2 for ConnectionCategory. + */ + public static final ConnectionCategory MONGO_DB_V2 = fromString("MongoDbV2"); + + /** + * Static value MongoDbAtlas for ConnectionCategory. + */ + public static final ConnectionCategory MONGO_DB_ATLAS = fromString("MongoDbAtlas"); + + /** + * Static value AmazonS3Compatible for ConnectionCategory. + */ + public static final ConnectionCategory AMAZON_S3COMPATIBLE = fromString("AmazonS3Compatible"); + + /** + * Static value FileServer for ConnectionCategory. + */ + public static final ConnectionCategory FILE_SERVER = fromString("FileServer"); + + /** + * Static value FtpServer for ConnectionCategory. + */ + public static final ConnectionCategory FTP_SERVER = fromString("FtpServer"); + + /** + * Static value GoogleCloudStorage for ConnectionCategory. + */ + public static final ConnectionCategory GOOGLE_CLOUD_STORAGE = fromString("GoogleCloudStorage"); + + /** + * Static value Hdfs for ConnectionCategory. + */ + public static final ConnectionCategory HDFS = fromString("Hdfs"); + + /** + * Static value OracleCloudStorage for ConnectionCategory. + */ + public static final ConnectionCategory ORACLE_CLOUD_STORAGE = fromString("OracleCloudStorage"); + + /** + * Static value Sftp for ConnectionCategory. + */ + public static final ConnectionCategory SFTP = fromString("Sftp"); + + /** + * Static value GenericHttp for ConnectionCategory. + */ + public static final ConnectionCategory GENERIC_HTTP = fromString("GenericHttp"); + + /** + * Static value ODataRest for ConnectionCategory. + */ + public static final ConnectionCategory ODATA_REST = fromString("ODataRest"); + + /** + * Static value Odbc for ConnectionCategory. + */ + public static final ConnectionCategory ODBC = fromString("Odbc"); + + /** + * Static value GenericRest for ConnectionCategory. + */ + public static final ConnectionCategory GENERIC_REST = fromString("GenericRest"); + + /** + * Static value AmazonMws for ConnectionCategory. + */ + public static final ConnectionCategory AMAZON_MWS = fromString("AmazonMws"); + + /** + * Static value Concur for ConnectionCategory. + */ + public static final ConnectionCategory CONCUR = fromString("Concur"); + + /** + * Static value Dynamics for ConnectionCategory. + */ + public static final ConnectionCategory DYNAMICS = fromString("Dynamics"); + + /** + * Static value DynamicsAx for ConnectionCategory. + */ + public static final ConnectionCategory DYNAMICS_AX = fromString("DynamicsAx"); + + /** + * Static value DynamicsCrm for ConnectionCategory. + */ + public static final ConnectionCategory DYNAMICS_CRM = fromString("DynamicsCrm"); + + /** + * Static value GoogleAdWords for ConnectionCategory. + */ + public static final ConnectionCategory GOOGLE_AD_WORDS = fromString("GoogleAdWords"); + + /** + * Static value Hubspot for ConnectionCategory. + */ + public static final ConnectionCategory HUBSPOT = fromString("Hubspot"); + + /** + * Static value Jira for ConnectionCategory. + */ + public static final ConnectionCategory JIRA = fromString("Jira"); + + /** + * Static value Magento for ConnectionCategory. + */ + public static final ConnectionCategory MAGENTO = fromString("Magento"); + + /** + * Static value Marketo for ConnectionCategory. + */ + public static final ConnectionCategory MARKETO = fromString("Marketo"); + + /** + * Static value Office365 for ConnectionCategory. + */ + public static final ConnectionCategory OFFICE365 = fromString("Office365"); + + /** + * Static value Eloqua for ConnectionCategory. + */ + public static final ConnectionCategory ELOQUA = fromString("Eloqua"); + + /** + * Static value Responsys for ConnectionCategory. + */ + public static final ConnectionCategory RESPONSYS = fromString("Responsys"); + + /** + * Static value OracleServiceCloud for ConnectionCategory. + */ + public static final ConnectionCategory ORACLE_SERVICE_CLOUD = fromString("OracleServiceCloud"); + + /** + * Static value PayPal for ConnectionCategory. + */ + public static final ConnectionCategory PAY_PAL = fromString("PayPal"); + + /** + * Static value QuickBooks for ConnectionCategory. + */ + public static final ConnectionCategory QUICK_BOOKS = fromString("QuickBooks"); + + /** + * Static value Salesforce for ConnectionCategory. + */ + public static final ConnectionCategory SALESFORCE = fromString("Salesforce"); + + /** + * Static value SalesforceServiceCloud for ConnectionCategory. + */ + public static final ConnectionCategory SALESFORCE_SERVICE_CLOUD = fromString("SalesforceServiceCloud"); + + /** + * Static value SalesforceMarketingCloud for ConnectionCategory. + */ + public static final ConnectionCategory SALESFORCE_MARKETING_CLOUD = fromString("SalesforceMarketingCloud"); + + /** + * Static value SapCloudForCustomer for ConnectionCategory. + */ + public static final ConnectionCategory SAP_CLOUD_FOR_CUSTOMER = fromString("SapCloudForCustomer"); + + /** + * Static value SapEcc for ConnectionCategory. + */ + public static final ConnectionCategory SAP_ECC = fromString("SapEcc"); + + /** + * Static value ServiceNow for ConnectionCategory. + */ + public static final ConnectionCategory SERVICE_NOW = fromString("ServiceNow"); + + /** + * Static value SharePointOnlineList for ConnectionCategory. + */ + public static final ConnectionCategory SHARE_POINT_ONLINE_LIST = fromString("SharePointOnlineList"); + + /** + * Static value Shopify for ConnectionCategory. + */ + public static final ConnectionCategory SHOPIFY = fromString("Shopify"); + + /** + * Static value Square for ConnectionCategory. + */ + public static final ConnectionCategory SQUARE = fromString("Square"); + + /** + * Static value WebTable for ConnectionCategory. + */ + public static final ConnectionCategory WEB_TABLE = fromString("WebTable"); + + /** + * Static value Xero for ConnectionCategory. + */ + public static final ConnectionCategory XERO = fromString("Xero"); + + /** + * Static value Zoho for ConnectionCategory. + */ + public static final ConnectionCategory ZOHO = fromString("Zoho"); + + /** + * Static value GenericContainerRegistry for ConnectionCategory. + */ + public static final ConnectionCategory GENERIC_CONTAINER_REGISTRY = fromString("GenericContainerRegistry"); + /** * Creates a new instance of ConnectionCategory value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +508,7 @@ public ConnectionCategory() { /** * Creates or finds a ConnectionCategory from its string representation. - * + * * @param name a name to look for. * @return the corresponding ConnectionCategory. */ @@ -41,7 +519,7 @@ public static ConnectionCategory fromString(String name) { /** * Gets known ConnectionCategory values. - * + * * @return known ConnectionCategory values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionGroup.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionGroup.java new file mode 100644 index 0000000000000..655ed3b85c0af --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionGroup.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Group based on connection category. + */ +public final class ConnectionGroup extends ExpandableStringEnum { + /** + * Static value Azure for ConnectionGroup. + */ + public static final ConnectionGroup AZURE = fromString("Azure"); + + /** + * Static value AzureAI for ConnectionGroup. + */ + public static final ConnectionGroup AZURE_AI = fromString("AzureAI"); + + /** + * Static value Database for ConnectionGroup. + */ + public static final ConnectionGroup DATABASE = fromString("Database"); + + /** + * Static value NoSQL for ConnectionGroup. + */ + public static final ConnectionGroup NO_SQL = fromString("NoSQL"); + + /** + * Static value File for ConnectionGroup. + */ + public static final ConnectionGroup FILE = fromString("File"); + + /** + * Static value GenericProtocol for ConnectionGroup. + */ + public static final ConnectionGroup GENERIC_PROTOCOL = fromString("GenericProtocol"); + + /** + * Static value ServicesAndApps for ConnectionGroup. + */ + public static final ConnectionGroup SERVICES_AND_APPS = fromString("ServicesAndApps"); + + /** + * Creates a new instance of ConnectionGroup value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ConnectionGroup() { + } + + /** + * Creates or finds a ConnectionGroup from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectionGroup. + */ + @JsonCreator + public static ConnectionGroup fromString(String name) { + return fromString(name, ConnectionGroup.class); + } + + /** + * Gets known ConnectionGroup values. + * + * @return known ConnectionGroup values. + */ + public static Collection values() { + return values(ConnectionGroup.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java index 433207abb0904..c16024bba35aa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Resource requirements for each container instance within an online deployment. */ +/** + * Resource requirements for each container instance within an online deployment. + */ @Fluent public final class ContainerResourceRequirements { /* @@ -22,13 +24,15 @@ public final class ContainerResourceRequirements { @JsonProperty(value = "containerResourceRequests") private ContainerResourceSettings containerResourceRequests; - /** Creates an instance of ContainerResourceRequirements class. */ + /** + * Creates an instance of ContainerResourceRequirements class. + */ public ContainerResourceRequirements() { } /** * Get the containerResourceLimits property: Container resource limit info:. - * + * * @return the containerResourceLimits value. */ public ContainerResourceSettings containerResourceLimits() { @@ -37,19 +41,19 @@ public ContainerResourceSettings containerResourceLimits() { /** * Set the containerResourceLimits property: Container resource limit info:. - * + * * @param containerResourceLimits the containerResourceLimits value to set. * @return the ContainerResourceRequirements object itself. */ - public ContainerResourceRequirements withContainerResourceLimits( - ContainerResourceSettings containerResourceLimits) { + public ContainerResourceRequirements + withContainerResourceLimits(ContainerResourceSettings containerResourceLimits) { this.containerResourceLimits = containerResourceLimits; return this; } /** * Get the containerResourceRequests property: Container resource request info:. - * + * * @return the containerResourceRequests value. */ public ContainerResourceSettings containerResourceRequests() { @@ -58,19 +62,19 @@ public ContainerResourceSettings containerResourceRequests() { /** * Set the containerResourceRequests property: Container resource request info:. - * + * * @param containerResourceRequests the containerResourceRequests value to set. * @return the ContainerResourceRequirements object itself. */ - public ContainerResourceRequirements withContainerResourceRequests( - ContainerResourceSettings containerResourceRequests) { + public ContainerResourceRequirements + withContainerResourceRequests(ContainerResourceSettings containerResourceRequests) { this.containerResourceRequests = containerResourceRequests; 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/ContainerResourceSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java index ef47459f3731e..22e6ac198e20e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ContainerResourceSettings model. */ +/** + * The ContainerResourceSettings model. + */ @Fluent public final class ContainerResourceSettings { /* @@ -31,14 +33,16 @@ public final class ContainerResourceSettings { @JsonProperty(value = "memory") private String memory; - /** Creates an instance of ContainerResourceSettings class. */ + /** + * Creates an instance of ContainerResourceSettings class. + */ public ContainerResourceSettings() { } /** * Get the cpu property: Number of vCPUs request/limit for container. More info: * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * + * * @return the cpu value. */ public String cpu() { @@ -48,7 +52,7 @@ public String cpu() { /** * Set the cpu property: Number of vCPUs request/limit for container. More info: * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * + * * @param cpu the cpu value to set. * @return the ContainerResourceSettings object itself. */ @@ -60,7 +64,7 @@ public ContainerResourceSettings withCpu(String cpu) { /** * Get the gpu property: Number of Nvidia GPU cards request/limit for container. More info: * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * + * * @return the gpu value. */ public String gpu() { @@ -70,7 +74,7 @@ public String gpu() { /** * Set the gpu property: Number of Nvidia GPU cards request/limit for container. More info: * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * + * * @param gpu the gpu value to set. * @return the ContainerResourceSettings object itself. */ @@ -82,7 +86,7 @@ public ContainerResourceSettings withGpu(String gpu) { /** * Get the memory property: Memory size request/limit for container. More info: * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * + * * @return the memory value. */ public String memory() { @@ -92,7 +96,7 @@ public String memory() { /** * Set the memory property: Memory size request/limit for container. More info: * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * + * * @param memory the memory value to set. * @return the ContainerResourceSettings object itself. */ @@ -103,7 +107,7 @@ public ContainerResourceSettings withMemory(String memory) { /** * 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/ContainerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.java index 68f7ef4621c57..b6c34a44b2b0b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.java @@ -8,17 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ContainerType. */ +/** + * The type of container to retrieve logs from. + */ public final class ContainerType extends ExpandableStringEnum { - /** Static value StorageInitializer for ContainerType. */ + /** + * Static value StorageInitializer for ContainerType. + */ public static final ContainerType STORAGE_INITIALIZER = fromString("StorageInitializer"); - /** Static value InferenceServer for ContainerType. */ + /** + * Static value InferenceServer for ContainerType. + */ public static final ContainerType INFERENCE_SERVER = fromString("InferenceServer"); + /** + * Static value ModelDataCollector for ContainerType. + */ + public static final ContainerType MODEL_DATA_COLLECTOR = fromString("ModelDataCollector"); + /** * Creates a new instance of ContainerType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +38,7 @@ public ContainerType() { /** * Creates or finds a ContainerType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ContainerType. */ @@ -38,7 +49,7 @@ public static ContainerType fromString(String name) { /** * Gets known ContainerType values. - * + * * @return known ContainerType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java new file mode 100644 index 0000000000000..14ef4f23cd301 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java @@ -0,0 +1,161 @@ +// Copyright (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 ContentSafetyEndpointDeploymentResourceProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Azure.ContentSafety") +@Fluent +public final class ContentSafetyEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Model used for the endpoint deployment. + */ + @JsonProperty(value = "model", required = true) + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + @JsonProperty(value = "raiPolicyName") + private String raiPolicyName; + + /* + * The sku property. + */ + @JsonProperty(value = "sku") + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + @JsonProperty(value = "versionUpgradeOption") + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of ContentSafetyEndpointDeploymentResourceProperties class. + */ + public ContentSafetyEndpointDeploymentResourceProperties() { + } + + /** + * Get the model property: Model used for the endpoint deployment. + * + * @return the model value. + */ + public EndpointDeploymentModel model() { + return this.model; + } + + /** + * Set the model property: Model used for the endpoint deployment. + * + * @param model the model value to set. + * @return the ContentSafetyEndpointDeploymentResourceProperties object itself. + */ + public ContentSafetyEndpointDeploymentResourceProperties withModel(EndpointDeploymentModel model) { + this.model = model; + return this; + } + + /** + * Get the raiPolicyName property: The name of RAI policy. + * + * @return the raiPolicyName value. + */ + public String raiPolicyName() { + return this.raiPolicyName; + } + + /** + * Set the raiPolicyName property: The name of RAI policy. + * + * @param raiPolicyName the raiPolicyName value to set. + * @return the ContentSafetyEndpointDeploymentResourceProperties object itself. + */ + public ContentSafetyEndpointDeploymentResourceProperties withRaiPolicyName(String raiPolicyName) { + this.raiPolicyName = raiPolicyName; + return this; + } + + /** + * Get the sku property: The sku property. + * + * @return the sku value. + */ + public CognitiveServicesSku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku property. + * + * @param sku the sku value to set. + * @return the ContentSafetyEndpointDeploymentResourceProperties object itself. + */ + public ContentSafetyEndpointDeploymentResourceProperties withSku(CognitiveServicesSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the versionUpgradeOption property: Deployment model version upgrade option. + * + * @return the versionUpgradeOption value. + */ + public DeploymentModelVersionUpgradeOption versionUpgradeOption() { + return this.versionUpgradeOption; + } + + /** + * Set the versionUpgradeOption property: Deployment model version upgrade option. + * + * @param versionUpgradeOption the versionUpgradeOption value to set. + * @return the ContentSafetyEndpointDeploymentResourceProperties object itself. + */ + public ContentSafetyEndpointDeploymentResourceProperties + withVersionUpgradeOption(DeploymentModelVersionUpgradeOption versionUpgradeOption) { + this.versionUpgradeOption = versionUpgradeOption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointDeploymentResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (model() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property model in model ContentSafetyEndpointDeploymentResourceProperties")); + } else { + model().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER + = new ClientLogger(ContentSafetyEndpointDeploymentResourceProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java new file mode 100644 index 0000000000000..e62bacc3b8d44 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java @@ -0,0 +1,69 @@ +// Copyright (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; + +/** + * The ContentSafetyEndpointResourceProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("Azure.ContentSafety") +@Fluent +public final class ContentSafetyEndpointResourceProperties extends EndpointResourceProperties { + /** + * Creates an instance of ContentSafetyEndpointResourceProperties class. + */ + public ContentSafetyEndpointResourceProperties() { + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withName(String name) { + super.withName(name); + 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/CosmosDbSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java index 0b05e1cfaf609..f2a704de459a0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java @@ -7,22 +7,26 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The CosmosDbSettings model. */ +/** + * The CosmosDbSettings model. + */ @Fluent public final class CosmosDbSettings { /* - * The throughput of the collections in cosmosdb database + * The collectionsThroughput property. */ @JsonProperty(value = "collectionsThroughput") private Integer collectionsThroughput; - /** Creates an instance of CosmosDbSettings class. */ + /** + * Creates an instance of CosmosDbSettings class. + */ public CosmosDbSettings() { } /** - * Get the collectionsThroughput property: The throughput of the collections in cosmosdb database. - * + * Get the collectionsThroughput property: The collectionsThroughput property. + * * @return the collectionsThroughput value. */ public Integer collectionsThroughput() { @@ -30,8 +34,8 @@ public Integer collectionsThroughput() { } /** - * Set the collectionsThroughput property: The throughput of the collections in cosmosdb database. - * + * Set the collectionsThroughput property: The collectionsThroughput property. + * * @param collectionsThroughput the collectionsThroughput value to set. * @return the CosmosDbSettings object itself. */ @@ -42,7 +46,7 @@ public CosmosDbSettings withCollectionsThroughput(Integer collectionsThroughput) /** * 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/CreateMonitorAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java new file mode 100644 index 0000000000000..433166205aa38 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java @@ -0,0 +1,69 @@ +// Copyright (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/CredentialsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java index 7596a8d963da1..2a2256f58ba7c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java @@ -8,26 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine the datastore credentials type. */ +/** + * Enum to determine the datastore credentials type. + */ public final class CredentialsType extends ExpandableStringEnum { - /** Static value AccountKey for CredentialsType. */ + /** + * Static value AccountKey for CredentialsType. + */ public static final CredentialsType ACCOUNT_KEY = fromString("AccountKey"); - /** Static value Certificate for CredentialsType. */ + /** + * Static value Certificate for CredentialsType. + */ public static final CredentialsType CERTIFICATE = fromString("Certificate"); - /** Static value None for CredentialsType. */ + /** + * Static value None for CredentialsType. + */ public static final CredentialsType NONE = fromString("None"); - /** Static value Sas for CredentialsType. */ + /** + * Static value Sas for CredentialsType. + */ public static final CredentialsType SAS = fromString("Sas"); - /** Static value ServicePrincipal for CredentialsType. */ + /** + * Static value ServicePrincipal for CredentialsType. + */ public static final CredentialsType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); + /** + * Static value KerberosKeytab for CredentialsType. + */ + public static final CredentialsType KERBEROS_KEYTAB = fromString("KerberosKeytab"); + + /** + * Static value KerberosPassword for CredentialsType. + */ + public static final CredentialsType KERBEROS_PASSWORD = fromString("KerberosPassword"); + /** * Creates a new instance of CredentialsType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +58,7 @@ public CredentialsType() { /** * Creates or finds a CredentialsType from its string representation. - * + * * @param name a name to look for. * @return the corresponding CredentialsType. */ @@ -47,7 +69,7 @@ public static CredentialsType fromString(String name) { /** * Gets known CredentialsType values. - * + * * @return known CredentialsType values. */ public static Collection values() { 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..261d567527584 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java @@ -0,0 +1,115 @@ +// Copyright (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/CronTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java index 362c9d532dc84..21fde33ad5407 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CronTrigger model. */ +/** + * The CronTrigger model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType") @JsonTypeName("Cron") @Fluent @@ -22,14 +24,16 @@ public final class CronTrigger extends TriggerBase { @JsonProperty(value = "expression", required = true) private String expression; - /** Creates an instance of CronTrigger class. */ + /** + * Creates an instance of CronTrigger class. + */ public CronTrigger() { } /** - * Get the expression property: [Required] Specifies cron expression of schedule. The expression should follow - * NCronTab format. - * + * Get the expression property: [Required] Specifies cron expression of schedule. + * The expression should follow NCronTab format. + * * @return the expression value. */ public String expression() { @@ -37,9 +41,9 @@ public String expression() { } /** - * Set the expression property: [Required] Specifies cron expression of schedule. The expression should follow - * NCronTab format. - * + * 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 CronTrigger object itself. */ @@ -48,21 +52,27 @@ public CronTrigger withExpression(String expression) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CronTrigger withEndTime(String endTime) { super.withEndTime(endTime); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CronTrigger withStartTime(String startTime) { super.withStartTime(startTime); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CronTrigger withTimeZone(String timeZone) { super.withTimeZone(timeZone); @@ -71,16 +81,15 @@ public CronTrigger withTimeZone(String timeZone) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (expression() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property expression in model CronTrigger")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property expression in model CronTrigger")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CsvExportSummary.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CsvExportSummary.java new file mode 100644 index 0000000000000..3a6b982d79511 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CsvExportSummary.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.Immutable; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The CsvExportSummary model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format") +@JsonTypeName("CSV") +@Immutable +public final class CsvExportSummary extends ExportSummaryInner { + /* + * The container name to which the labels will be exported. + */ + @JsonProperty(value = "containerName", access = JsonProperty.Access.WRITE_ONLY) + private String containerName; + + /* + * The output path where the labels will be exported. + */ + @JsonProperty(value = "snapshotPath", access = JsonProperty.Access.WRITE_ONLY) + private String snapshotPath; + + /** + * Creates an instance of CsvExportSummary class. + */ + public CsvExportSummary() { + } + + /** + * Get the containerName property: The container name to which the labels will be exported. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Get the snapshotPath property: The output path where the labels will be exported. + * + * @return the snapshotPath value. + */ + public String snapshotPath() { + return this.snapshotPath; + } + + /** + * 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/CustomForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java index 495856b62f74e..354c1912427c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The desired maximum forecast horizon in units of time-series frequency. */ +/** + * The desired maximum forecast horizon in units of time-series frequency. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Custom") @Fluent @@ -20,13 +22,15 @@ public final class CustomForecastHorizon extends ForecastHorizon { @JsonProperty(value = "value", required = true) private int value; - /** Creates an instance of CustomForecastHorizon class. */ + /** + * Creates an instance of CustomForecastHorizon class. + */ public CustomForecastHorizon() { } /** * Get the value property: [Required] Forecast horizon value. - * + * * @return the value value. */ public int value() { @@ -35,7 +39,7 @@ public int value() { /** * Set the value property: [Required] Forecast horizon value. - * + * * @param value the value value to set. * @return the CustomForecastHorizon object itself. */ @@ -46,7 +50,7 @@ public CustomForecastHorizon withValue(int value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomInferencingServer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomInferencingServer.java new file mode 100644 index 0000000000000..9065ce558c847 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomInferencingServer.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Custom inference server configurations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "serverType") +@JsonTypeName("Custom") +@Fluent +public final class CustomInferencingServer extends InferencingServer { + /* + * Inference configuration for custom inferencing. + */ + @JsonProperty(value = "inferenceConfiguration") + private OnlineInferenceConfiguration inferenceConfiguration; + + /** + * Creates an instance of CustomInferencingServer class. + */ + public CustomInferencingServer() { + } + + /** + * Get the inferenceConfiguration property: Inference configuration for custom inferencing. + * + * @return the inferenceConfiguration value. + */ + public OnlineInferenceConfiguration inferenceConfiguration() { + return this.inferenceConfiguration; + } + + /** + * Set the inferenceConfiguration property: Inference configuration for custom inferencing. + * + * @param inferenceConfiguration the inferenceConfiguration value to set. + * @return the CustomInferencingServer object itself. + */ + public CustomInferencingServer withInferenceConfiguration(OnlineInferenceConfiguration inferenceConfiguration) { + this.inferenceConfiguration = inferenceConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (inferenceConfiguration() != null) { + inferenceConfiguration().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java new file mode 100644 index 0000000000000..0cb86f236ba6c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Custom Keys credential object. + */ +@Fluent +public final class CustomKeys { + /* + * Dictionary of + */ + @JsonProperty(value = "keys") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map keys; + + /** + * Creates an instance of CustomKeys class. + */ + public CustomKeys() { + } + + /** + * Get the keys property: Dictionary of <string>. + * + * @return the keys value. + */ + public Map keys() { + return this.keys; + } + + /** + * Set the keys property: Dictionary of <string>. + * + * @param keys the keys value to set. + * @return the CustomKeys object itself. + */ + public CustomKeys withKeys(Map keys) { + this.keys = keys; + 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/CustomKeysWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java new file mode 100644 index 0000000000000..31aff72648840 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java @@ -0,0 +1,123 @@ +// Copyright (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; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Category:= CustomKeys + * AuthType:= CustomKeys (as type discriminator) + * Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys + * Target:= {any value} + * Use Metadata property bag for ApiVersion and other metadata fields. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("CustomKeys") +@Fluent +public final class CustomKeysWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * Custom Keys credential object + */ + @JsonProperty(value = "credentials") + private CustomKeys credentials; + + /** + * Creates an instance of CustomKeysWorkspaceConnectionProperties class. + */ + public CustomKeysWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: Custom Keys credential object. + * + * @return the credentials value. + */ + public CustomKeys credentials() { + return this.credentials; + } + + /** + * Set the credentials property: Custom Keys credential object. + * + * @param credentials the credentials value to set. + * @return the CustomKeysWorkspaceConnectionProperties object itself. + */ + public CustomKeysWorkspaceConnectionProperties withCredentials(CustomKeys credentials) { + this.credentials = credentials; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomKeysWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomKeysWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomKeysWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomKeysWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomKeysWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomKeysWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() != null) { + credentials().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..899ea9be0a974 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java @@ -0,0 +1,92 @@ +// Copyright (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/CustomModelFineTuning.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelFineTuning.java new file mode 100644 index 0000000000000..ace3d84c580cb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelFineTuning.java @@ -0,0 +1,99 @@ +// Copyright (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.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; + +/** + * The CustomModelFineTuning model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "modelProvider") +@JsonTypeName("Custom") +@Fluent +public final class CustomModelFineTuning extends FineTuningVertical { + /* + * HyperParameters for fine tuning custom model. + */ + @JsonProperty(value = "hyperParameters") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map hyperParameters; + + /** + * Creates an instance of CustomModelFineTuning class. + */ + public CustomModelFineTuning() { + } + + /** + * Get the hyperParameters property: HyperParameters for fine tuning custom model. + * + * @return the hyperParameters value. + */ + public Map hyperParameters() { + return this.hyperParameters; + } + + /** + * Set the hyperParameters property: HyperParameters for fine tuning custom model. + * + * @param hyperParameters the hyperParameters value to set. + * @return the CustomModelFineTuning object itself. + */ + public CustomModelFineTuning withHyperParameters(Map hyperParameters) { + this.hyperParameters = hyperParameters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomModelFineTuning withModel(MLFlowModelJobInput model) { + super.withModel(model); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomModelFineTuning withTaskType(FineTuningTaskType taskType) { + super.withTaskType(taskType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomModelFineTuning withTrainingData(JobInput trainingData) { + super.withTrainingData(trainingData); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomModelFineTuning withValidationData(JobInput validationData) { + super.withValidationData(validationData); + 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/CustomModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java index 65061d9cdf229..5bdec1968eb40 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CustomModelJobInput model. */ +/** + * The CustomModelJobInput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") @JsonTypeName("custom_model") @Fluent @@ -21,19 +23,27 @@ public final class CustomModelJobInput extends JobInput { @JsonProperty(value = "mode") private InputDeliveryMode mode; + /* + * Input Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * [Required] Input Asset URI. */ @JsonProperty(value = "uri", required = true) private String uri; - /** Creates an instance of CustomModelJobInput class. */ + /** + * Creates an instance of CustomModelJobInput class. + */ public CustomModelJobInput() { } /** * Get the mode property: Input Asset Delivery Mode. - * + * * @return the mode value. */ public InputDeliveryMode mode() { @@ -42,7 +52,7 @@ public InputDeliveryMode mode() { /** * Set the mode property: Input Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the CustomModelJobInput object itself. */ @@ -51,9 +61,29 @@ public CustomModelJobInput withMode(InputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Input Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Input Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the CustomModelJobInput object itself. + */ + public CustomModelJobInput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: [Required] Input Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -62,7 +92,7 @@ public String uri() { /** * Set the uri property: [Required] Input Asset URI. - * + * * @param uri the uri value to set. * @return the CustomModelJobInput object itself. */ @@ -71,7 +101,9 @@ public CustomModelJobInput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CustomModelJobInput withDescription(String description) { super.withDescription(description); @@ -80,16 +112,15 @@ public CustomModelJobInput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (uri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model CustomModelJobInput")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property uri in model CustomModelJobInput")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java index b68ea2621db98..5913b8e18108d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java @@ -9,30 +9,118 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CustomModelJobOutput model. */ +/** + * The CustomModelJobOutput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") @JsonTypeName("custom_model") @Fluent public final class CustomModelJobOutput extends JobOutput { + /* + * Output Asset Name. + */ + @JsonProperty(value = "assetName") + private String assetName; + + /* + * Output Asset Version. + */ + @JsonProperty(value = "assetVersion") + private String assetVersion; + + /* + * Auto delete setting of output data asset. + */ + @JsonProperty(value = "autoDeleteSetting") + private AutoDeleteSetting autoDeleteSetting; + /* * Output Asset Delivery Mode. */ @JsonProperty(value = "mode") private OutputDeliveryMode mode; + /* + * Output Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * Output Asset URI. */ @JsonProperty(value = "uri") private String uri; - /** Creates an instance of CustomModelJobOutput class. */ + /** + * Creates an instance of CustomModelJobOutput class. + */ public CustomModelJobOutput() { } + /** + * Get the assetName property: Output Asset Name. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Output Asset Name. + * + * @param assetName the assetName value to set. + * @return the CustomModelJobOutput object itself. + */ + public CustomModelJobOutput withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the assetVersion property: Output Asset Version. + * + * @return the assetVersion value. + */ + public String assetVersion() { + return this.assetVersion; + } + + /** + * Set the assetVersion property: Output Asset Version. + * + * @param assetVersion the assetVersion value to set. + * @return the CustomModelJobOutput object itself. + */ + public CustomModelJobOutput withAssetVersion(String assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @return the autoDeleteSetting value. + */ + public AutoDeleteSetting autoDeleteSetting() { + return this.autoDeleteSetting; + } + + /** + * Set the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @param autoDeleteSetting the autoDeleteSetting value to set. + * @return the CustomModelJobOutput object itself. + */ + public CustomModelJobOutput withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + this.autoDeleteSetting = autoDeleteSetting; + return this; + } + /** * Get the mode property: Output Asset Delivery Mode. - * + * * @return the mode value. */ public OutputDeliveryMode mode() { @@ -41,7 +129,7 @@ public OutputDeliveryMode mode() { /** * Set the mode property: Output Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the CustomModelJobOutput object itself. */ @@ -50,9 +138,29 @@ public CustomModelJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Output Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Output Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the CustomModelJobOutput object itself. + */ + public CustomModelJobOutput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: Output Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -61,7 +169,7 @@ public String uri() { /** * Set the uri property: Output Asset URI. - * + * * @param uri the uri value to set. * @return the CustomModelJobOutput object itself. */ @@ -70,7 +178,9 @@ public CustomModelJobOutput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CustomModelJobOutput withDescription(String description) { super.withDescription(description); @@ -79,11 +189,14 @@ public CustomModelJobOutput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (autoDeleteSetting() != null) { + autoDeleteSetting().validate(); + } } } 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..926349b10440c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java @@ -0,0 +1,224 @@ +// Copyright (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] ARM resource ID of the component resource 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; + + /* + * A list of metrics to calculate and their associated thresholds. + */ + @JsonProperty(value = "workspaceConnection") + private MonitoringWorkspaceConnection workspaceConnection; + + /** + * Creates an instance of CustomMonitoringSignal class. + */ + public CustomMonitoringSignal() { + } + + /** + * Get the componentId property: [Required] ARM resource ID of the component resource used to calculate the custom + * metrics. + * + * @return the componentId value. + */ + public String componentId() { + return this.componentId; + } + + /** + * Set the componentId property: [Required] ARM resource ID of the component resource 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; + } + + /** + * Get the workspaceConnection property: A list of metrics to calculate and their associated thresholds. + * + * @return the workspaceConnection value. + */ + public MonitoringWorkspaceConnection workspaceConnection() { + return this.workspaceConnection; + } + + /** + * Set the workspaceConnection property: A list of metrics to calculate and their associated thresholds. + * + * @param workspaceConnection the workspaceConnection value to set. + * @return the CustomMonitoringSignal object itself. + */ + public CustomMonitoringSignal withWorkspaceConnection(MonitoringWorkspaceConnection workspaceConnection) { + this.workspaceConnection = workspaceConnection; + 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()); + } + if (workspaceConnection() != null) { + workspaceConnection().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/CustomNCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java index fb61bff1cc77c..fe8de9ba9dfca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** N-Cross validations are specified by user. */ +/** + * N-Cross validations are specified by user. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Custom") @Fluent @@ -20,13 +22,15 @@ public final class CustomNCrossValidations extends NCrossValidations { @JsonProperty(value = "value", required = true) private int value; - /** Creates an instance of CustomNCrossValidations class. */ + /** + * Creates an instance of CustomNCrossValidations class. + */ public CustomNCrossValidations() { } /** * Get the value property: [Required] N-Cross validations value. - * + * * @return the value value. */ public int value() { @@ -35,7 +39,7 @@ public int value() { /** * Set the value property: [Required] N-Cross validations value. - * + * * @param value the value value to set. * @return the CustomNCrossValidations object itself. */ @@ -46,7 +50,7 @@ public CustomNCrossValidations withValue(int value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java index d9b507c43f124..618a7ca231af4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CustomSeasonality model. */ +/** + * The CustomSeasonality model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Custom") @Fluent @@ -20,13 +22,15 @@ public final class CustomSeasonality extends Seasonality { @JsonProperty(value = "value", required = true) private int value; - /** Creates an instance of CustomSeasonality class. */ + /** + * Creates an instance of CustomSeasonality class. + */ public CustomSeasonality() { } /** * Get the value property: [Required] Seasonality value. - * + * * @return the value value. */ public int value() { @@ -35,7 +39,7 @@ public int value() { /** * Set the value property: [Required] Seasonality value. - * + * * @param value the value value to set. * @return the CustomSeasonality object itself. */ @@ -46,7 +50,7 @@ public CustomSeasonality withValue(int value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..a34d88e005abb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java @@ -0,0 +1,275 @@ +// Copyright (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; + + /* + * Describes the jupyter kernel settings for the image if its a custom environment + */ + @JsonProperty(value = "kernel") + private JupyterKernelConfig kernel; + + /* + * 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 kernel property: Describes the jupyter kernel settings for the image if its a custom environment. + * + * @return the kernel value. + */ + public JupyterKernelConfig kernel() { + return this.kernel; + } + + /** + * Set the kernel property: Describes the jupyter kernel settings for the image if its a custom environment. + * + * @param kernel the kernel value to set. + * @return the CustomService object itself. + */ + public CustomService withKernel(JupyterKernelConfig kernel) { + this.kernel = kernel; + 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()); + } + if (kernel() != null) { + kernel().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java index 1c3a2db01db91..46822d7cc31e9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** The CustomTargetLags model. */ +/** + * The CustomTargetLags model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Custom") @Fluent @@ -22,13 +24,15 @@ public final class CustomTargetLags extends TargetLags { @JsonProperty(value = "values", required = true) private List values; - /** Creates an instance of CustomTargetLags class. */ + /** + * Creates an instance of CustomTargetLags class. + */ public CustomTargetLags() { } /** * Get the values property: [Required] Set target lags values. - * + * * @return the values value. */ public List values() { @@ -37,7 +41,7 @@ public List values() { /** * Set the values property: [Required] Set target lags values. - * + * * @param values the values value to set. * @return the CustomTargetLags object itself. */ @@ -48,16 +52,15 @@ public CustomTargetLags withValues(List values) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (values() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property values in model CustomTargetLags")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property values in model CustomTargetLags")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java index a6809abe95b3b..4dbbf3c499556 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The CustomTargetRollingWindowSize model. */ +/** + * The CustomTargetRollingWindowSize model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") @JsonTypeName("Custom") @Fluent @@ -20,13 +22,15 @@ public final class CustomTargetRollingWindowSize extends TargetRollingWindowSize @JsonProperty(value = "value", required = true) private int value; - /** Creates an instance of CustomTargetRollingWindowSize class. */ + /** + * Creates an instance of CustomTargetRollingWindowSize class. + */ public CustomTargetRollingWindowSize() { } /** * Get the value property: [Required] TargetRollingWindowSize value. - * + * * @return the value value. */ public int value() { @@ -35,7 +39,7 @@ public int value() { /** * Set the value property: [Required] TargetRollingWindowSize value. - * + * * @param value the value value to set. * @return the CustomTargetRollingWindowSize object itself. */ @@ -46,7 +50,7 @@ public CustomTargetRollingWindowSize withValue(int value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..375511e8a1ca1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/DataCollectionMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java new file mode 100644 index 0000000000000..2d2e6e9303c77 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.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 DataCollectionMode. + */ +public final class DataCollectionMode extends ExpandableStringEnum { + /** + * Static value Enabled for DataCollectionMode. + */ + public static final DataCollectionMode ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for DataCollectionMode. + */ + public static final DataCollectionMode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of DataCollectionMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataCollectionMode() { + } + + /** + * Creates or finds a DataCollectionMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataCollectionMode. + */ + @JsonCreator + public static DataCollectionMode fromString(String name) { + return fromString(name, DataCollectionMode.class); + } + + /** + * Gets known DataCollectionMode values. + * + * @return known DataCollectionMode values. + */ + public static Collection values() { + return values(DataCollectionMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java new file mode 100644 index 0000000000000..2aedca6a2de56 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java @@ -0,0 +1,152 @@ +// Copyright (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 DataCollector model. + */ +@Fluent +public final class DataCollector { + /* + * [Required] The collection configuration. Each collection has it own configuration to collect model data and the + * name of collection can be arbitrary string. + * Model data collector can be used for either payload logging or custom logging or both of them. Collection + * request and response are reserved for payload logging, others are for custom logging. + */ + @JsonProperty(value = "collections", required = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map collections; + + /* + * The request logging configuration for mdc, it includes advanced logging settings for all collections. It's + * optional. + */ + @JsonProperty(value = "requestLogging") + private RequestLogging requestLogging; + + /* + * When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of + * them in a single blob file. + * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. + * If it's day, all data will be collected in blob path /yyyy/MM/dd/. + * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very + * quickly. + */ + @JsonProperty(value = "rollingRate") + private RollingRateType rollingRate; + + /** + * Creates an instance of DataCollector class. + */ + public DataCollector() { + } + + /** + * Get the collections property: [Required] The collection configuration. Each collection has it own configuration + * to collect model data and the name of collection can be arbitrary string. + * Model data collector can be used for either payload logging or custom logging or both of them. Collection + * request and response are reserved for payload logging, others are for custom logging. + * + * @return the collections value. + */ + public Map collections() { + return this.collections; + } + + /** + * Set the collections property: [Required] The collection configuration. Each collection has it own configuration + * to collect model data and the name of collection can be arbitrary string. + * Model data collector can be used for either payload logging or custom logging or both of them. Collection + * request and response are reserved for payload logging, others are for custom logging. + * + * @param collections the collections value to set. + * @return the DataCollector object itself. + */ + public DataCollector withCollections(Map collections) { + this.collections = collections; + return this; + } + + /** + * Get the requestLogging property: The request logging configuration for mdc, it includes advanced logging + * settings for all collections. It's optional. + * + * @return the requestLogging value. + */ + public RequestLogging requestLogging() { + return this.requestLogging; + } + + /** + * Set the requestLogging property: The request logging configuration for mdc, it includes advanced logging + * settings for all collections. It's optional. + * + * @param requestLogging the requestLogging value to set. + * @return the DataCollector object itself. + */ + public DataCollector withRequestLogging(RequestLogging requestLogging) { + this.requestLogging = requestLogging; + return this; + } + + /** + * Get the rollingRate property: When model data is collected to blob storage, we need to roll the data to + * different path to avoid logging all of them in a single blob file. + * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. + * If it's day, all data will be collected in blob path /yyyy/MM/dd/. + * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very + * quickly. + * + * @return the rollingRate value. + */ + public RollingRateType rollingRate() { + return this.rollingRate; + } + + /** + * Set the rollingRate property: When model data is collected to blob storage, we need to roll the data to + * different path to avoid logging all of them in a single blob file. + * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. + * If it's day, all data will be collected in blob path /yyyy/MM/dd/. + * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very + * quickly. + * + * @param rollingRate the rollingRate value to set. + * @return the DataCollector object itself. + */ + public DataCollector withRollingRate(RollingRateType rollingRate) { + this.rollingRate = rollingRate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (collections() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property collections in model DataCollector")); + } else { + collections().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (requestLogging() != null) { + requestLogging().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DataCollector.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..930533a3aaa7e 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 @@ -8,90 +8,103 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -/** An immutable client-side representation of DataContainer. */ +/** + * An immutable client-side representation of DataContainer. + */ public interface DataContainer { /** * 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. */ DataContainerProperties 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.DataContainerInner object. - * + * * @return the inner object. */ DataContainerInner innerModel(); - /** The entirety of the DataContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the DataContainer definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The DataContainer definition stages. */ + + /** + * The DataContainer definition stages. + */ interface DefinitionStages { - /** The first stage of the DataContainer definition. */ + /** + * The first stage of the DataContainer definition. + */ interface Blank extends WithParentResource { } - /** The stage of the DataContainer definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the DataContainer 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(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. @@ -99,67 +112,76 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ DataContainer create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ DataContainer create(Context context); } } + /** * Begins update for the DataContainer resource. - * + * * @return the stage of resource update. */ DataContainer.Update update(); - /** The template for DataContainer update. */ + /** + * The template for DataContainer update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ DataContainer apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ DataContainer apply(Context context); } - /** The DataContainer update stages. */ + + /** + * The DataContainer update stages. + */ interface UpdateStages { - /** The stage of the DataContainer update allowing to specify properties. */ + /** + * The stage of the DataContainer 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(DataContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ DataContainer refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java index ef6dbc31be3de..8df74240490da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Container for data asset versions. */ +/** + * Container for data asset versions. + */ @Fluent public final class DataContainerProperties extends AssetContainer { /* @@ -18,13 +20,15 @@ public final class DataContainerProperties extends AssetContainer { @JsonProperty(value = "dataType", required = true) private DataType dataType; - /** Creates an instance of DataContainerProperties class. */ + /** + * Creates an instance of DataContainerProperties class. + */ public DataContainerProperties() { } /** * Get the dataType property: [Required] Specifies the type of data. - * + * * @return the dataType value. */ public DataType dataType() { @@ -33,7 +37,7 @@ public DataType dataType() { /** * Set the dataType property: [Required] Specifies the type of data. - * + * * @param dataType the dataType value to set. * @return the DataContainerProperties object itself. */ @@ -42,28 +46,36 @@ public DataContainerProperties withDataType(DataType dataType) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataContainerProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataContainerProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataContainerProperties withTags(Map tags) { super.withTags(tags); @@ -72,17 +84,15 @@ public DataContainerProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (dataType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataType in model DataContainerProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataType in model DataContainerProperties")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java index df54e8cfb2e15..6d30a8d3a3b36 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of DataContainer entities. */ +/** + * A paginated list of DataContainer entities. + */ @Fluent public final class DataContainerResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class DataContainerResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of DataContainerResourceArmPaginatedResult class. */ + /** + * Creates an instance of DataContainerResourceArmPaginatedResult class. + */ public DataContainerResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional * pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional * pages. - * + * * @param nextLink the nextLink value to set. * @return the DataContainerResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public DataContainerResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type DataContainer. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type DataContainer. - * + * * @param value the value value to set. * @return the DataContainerResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public DataContainerResourceArmPaginatedResult withValue(List list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, 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. @@ -54,7 +57,7 @@ PagedIterable list( /** * 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. @@ -66,7 +69,7 @@ PagedIterable list( /** * 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. @@ -76,12 +79,12 @@ PagedIterable list( * @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 workspaceName, String name, Context context); + Response getWithResponse(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. @@ -93,55 +96,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. - * - * @param id the resource ID. + * 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. + * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + DataContainerInner body, 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. + * 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. + * @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..7bfc24164239f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java @@ -0,0 +1,71 @@ +// Copyright (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..135c5a451722a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java @@ -0,0 +1,270 @@ +// Copyright (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 { + /* + * The data segment used for scoping on a subset of the data population. + */ + @JsonProperty(value = "dataSegment") + private MonitoringDataSegment dataSegment; + + /* + * 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 dataSegment property: The data segment used for scoping on a subset of the data population. + * + * @return the dataSegment value. + */ + public MonitoringDataSegment dataSegment() { + return this.dataSegment; + } + + /** + * Set the dataSegment property: The data segment used for scoping on a subset of the data population. + * + * @param dataSegment the dataSegment value to set. + * @return the DataDriftMonitoringSignal object itself. + */ + public DataDriftMonitoringSignal withDataSegment(MonitoringDataSegment dataSegment) { + this.dataSegment = dataSegment; + return this; + } + + /** + * 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 (dataSegment() != null) { + dataSegment().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/DataFactory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java index 408de6370a324..0cb0902ab53cd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java @@ -8,37 +8,49 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A DataFactory compute. */ +/** + * A DataFactory compute. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("DataFactory") @Fluent public final class DataFactory extends Compute { - /** Creates an instance of DataFactory class. */ + /** + * Creates an instance of DataFactory class. + */ public DataFactory() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataFactory withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataFactory withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataFactory withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataFactory withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -47,7 +59,7 @@ public DataFactory withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImport.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImport.java new file mode 100644 index 0000000000000..f56bdec53698b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImport.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.Map; + +/** + * The DataImport model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") +@JsonTypeName("uri_folder") +@Fluent +public final class DataImport extends DataVersionBaseProperties { + /* + * Name of the asset for data import job to create + */ + @JsonProperty(value = "assetName") + private String assetName; + + /* + * Source data of the asset to import from + */ + @JsonProperty(value = "source") + private DataImportSource source; + + /** + * Creates an instance of DataImport class. + */ + public DataImport() { + } + + /** + * Get the assetName property: Name of the asset for data import job to create. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Name of the asset for data import job to create. + * + * @param assetName the assetName value to set. + * @return the DataImport object itself. + */ + public DataImport withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the source property: Source data of the asset to import from. + * + * @return the source value. + */ + public DataImportSource source() { + return this.source; + } + + /** + * Set the source property: Source data of the asset to import from. + * + * @param source the source value to set. + * @return the DataImport object itself. + */ + public DataImport withSource(DataImportSource source) { + this.source = source; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataImport withDataUri(String dataUri) { + super.withDataUri(dataUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataImport withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataImport withStage(String stage) { + super.withStage(stage); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataImport withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataImport withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataImport withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataImport withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataImport withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataImport 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 (source() != null) { + source().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImportSource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImportSource.java new file mode 100644 index 0000000000000..e96410ff4b20a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImportSource.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 DataImportSource model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "sourceType", + defaultImpl = DataImportSource.class) +@JsonTypeName("DataImportSource") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "database", value = DatabaseSource.class), + @JsonSubTypes.Type(name = "file_system", value = FileSystemSource.class) }) +@Fluent +public class DataImportSource { + /* + * Workspace connection for data import source storage + */ + @JsonProperty(value = "connection") + private String connection; + + /** + * Creates an instance of DataImportSource class. + */ + public DataImportSource() { + } + + /** + * Get the connection property: Workspace connection for data import source storage. + * + * @return the connection value. + */ + public String connection() { + return this.connection; + } + + /** + * Set the connection property: Workspace connection for data import source storage. + * + * @param connection the connection value to set. + * @return the DataImportSource object itself. + */ + public DataImportSource withConnection(String connection) { + this.connection = connection; + 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/DataImportSourceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImportSourceType.java new file mode 100644 index 0000000000000..96586425877cf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataImportSourceType.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 type of data. + */ +public final class DataImportSourceType extends ExpandableStringEnum { + /** + * Static value database for DataImportSourceType. + */ + public static final DataImportSourceType DATABASE = fromString("database"); + + /** + * Static value file_system for DataImportSourceType. + */ + public static final DataImportSourceType FILE_SYSTEM = fromString("file_system"); + + /** + * Creates a new instance of DataImportSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataImportSourceType() { + } + + /** + * Creates or finds a DataImportSourceType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataImportSourceType. + */ + @JsonCreator + public static DataImportSourceType fromString(String name) { + return fromString(name, DataImportSourceType.class); + } + + /** + * Gets known DataImportSourceType values. + * + * @return known DataImportSourceType values. + */ + public static Collection values() { + return values(DataImportSourceType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java index 93ab2b848c2d9..7830d4aa09b8e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A DataLakeAnalytics compute. */ +/** + * A DataLakeAnalytics compute. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("DataLakeAnalytics") @Fluent @@ -20,13 +22,15 @@ public final class DataLakeAnalytics extends Compute { @JsonProperty(value = "properties") private DataLakeAnalyticsSchemaProperties properties; - /** Creates an instance of DataLakeAnalytics class. */ + /** + * Creates an instance of DataLakeAnalytics class. + */ public DataLakeAnalytics() { } /** * Get the properties property: The properties property. - * + * * @return the properties value. */ public DataLakeAnalyticsSchemaProperties properties() { @@ -35,7 +39,7 @@ public DataLakeAnalyticsSchemaProperties properties() { /** * Set the properties property: The properties property. - * + * * @param properties the properties value to set. * @return the DataLakeAnalytics object itself. */ @@ -44,28 +48,36 @@ public DataLakeAnalytics withProperties(DataLakeAnalyticsSchemaProperties proper return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataLakeAnalytics withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataLakeAnalytics withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataLakeAnalytics withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataLakeAnalytics withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -74,7 +86,7 @@ public DataLakeAnalytics withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java index 8d9dd38b62f8a..33dd2c16ace23 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The DataLakeAnalyticsSchema model. */ +/** + * The DataLakeAnalyticsSchema model. + */ @Fluent public class DataLakeAnalyticsSchema { /* @@ -16,13 +18,15 @@ public class DataLakeAnalyticsSchema { @JsonProperty(value = "properties") private DataLakeAnalyticsSchemaProperties properties; - /** Creates an instance of DataLakeAnalyticsSchema class. */ + /** + * Creates an instance of DataLakeAnalyticsSchema class. + */ public DataLakeAnalyticsSchema() { } /** * Get the properties property: The properties property. - * + * * @return the properties value. */ public DataLakeAnalyticsSchemaProperties properties() { @@ -31,7 +35,7 @@ public DataLakeAnalyticsSchemaProperties properties() { /** * Set the properties property: The properties property. - * + * * @param properties the properties value to set. * @return the DataLakeAnalyticsSchema object itself. */ @@ -42,7 +46,7 @@ public DataLakeAnalyticsSchema withProperties(DataLakeAnalyticsSchemaProperties /** * 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/DataLakeAnalyticsSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java index 645bc27f9f93e..519488b3bf8f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The DataLakeAnalyticsSchemaProperties model. */ +/** + * The DataLakeAnalyticsSchemaProperties model. + */ @Fluent public final class DataLakeAnalyticsSchemaProperties { /* @@ -16,13 +18,15 @@ public final class DataLakeAnalyticsSchemaProperties { @JsonProperty(value = "dataLakeStoreAccountName") private String dataLakeStoreAccountName; - /** Creates an instance of DataLakeAnalyticsSchemaProperties class. */ + /** + * Creates an instance of DataLakeAnalyticsSchemaProperties class. + */ public DataLakeAnalyticsSchemaProperties() { } /** * Get the dataLakeStoreAccountName property: DataLake Store Account Name. - * + * * @return the dataLakeStoreAccountName value. */ public String dataLakeStoreAccountName() { @@ -31,7 +35,7 @@ public String dataLakeStoreAccountName() { /** * Set the dataLakeStoreAccountName property: DataLake Store Account Name. - * + * * @param dataLakeStoreAccountName the dataLakeStoreAccountName value to set. * @return the DataLakeAnalyticsSchemaProperties object itself. */ @@ -42,7 +46,7 @@ public DataLakeAnalyticsSchemaProperties withDataLakeStoreAccountName(String dat /** * 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/DataPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java index f9425ac02511a..8dc968d4bcd50 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Reference to an asset via its path in a datastore. */ +/** + * Reference to an asset via its path in a datastore. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") @JsonTypeName("DataPath") @Fluent @@ -26,13 +28,15 @@ public final class DataPathAssetReference extends AssetReferenceBase { @JsonProperty(value = "path") private String path; - /** Creates an instance of DataPathAssetReference class. */ + /** + * Creates an instance of DataPathAssetReference class. + */ public DataPathAssetReference() { } /** * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. - * + * * @return the datastoreId value. */ public String datastoreId() { @@ -41,7 +45,7 @@ public String datastoreId() { /** * Set the datastoreId property: ARM resource ID of the datastore where the asset is located. - * + * * @param datastoreId the datastoreId value to set. * @return the DataPathAssetReference object itself. */ @@ -52,7 +56,7 @@ public DataPathAssetReference withDatastoreId(String datastoreId) { /** * Get the path property: The path of the file/directory in the datastore. - * + * * @return the path value. */ public String path() { @@ -61,7 +65,7 @@ public String path() { /** * Set the path property: The path of the file/directory in the datastore. - * + * * @param path the path value to set. * @return the DataPathAssetReference object itself. */ @@ -72,7 +76,7 @@ public DataPathAssetReference withPath(String path) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..281e55e45369a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java @@ -0,0 +1,71 @@ +// Copyright (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..285ef0c879de0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java @@ -0,0 +1,243 @@ +// Copyright (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..3b149a4597383 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.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.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..0bae9b5b83fb6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/DataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java index 3b8eae0a61d62..8cf5865c427aa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine the type of data. */ +/** + * Enum to determine the type of data. + */ public final class DataType extends ExpandableStringEnum { - /** Static value uri_file for DataType. */ + /** + * Static value uri_file for DataType. + */ public static final DataType URI_FILE = fromString("uri_file"); - /** Static value uri_folder for DataType. */ + /** + * Static value uri_folder for DataType. + */ public static final DataType URI_FOLDER = fromString("uri_folder"); - /** Static value mltable for DataType. */ + /** + * Static value mltable for DataType. + */ public static final DataType MLTABLE = fromString("mltable"); /** * Creates a new instance of DataType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public DataType() { /** * Creates or finds a DataType from its string representation. - * + * * @param name a name to look for. * @return the corresponding DataType. */ @@ -41,7 +49,7 @@ public static DataType fromString(String name) { /** * Gets known DataType values. - * + * * @return known DataType values. */ public static Collection values() { 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..ac80ba0b6f227 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,95 +4,109 @@ 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; -/** An immutable client-side representation of DataVersionBase. */ +/** + * An immutable client-side representation of DataVersionBase. + */ public interface DataVersionBase { /** * 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. */ DataVersionBaseProperties 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.DataVersionBaseInner object. - * + * * @return the inner object. */ DataVersionBaseInner innerModel(); - /** The entirety of the DataVersionBase definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the DataVersionBase definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The DataVersionBase definition stages. */ + + /** + * The DataVersionBase definition stages. + */ interface DefinitionStages { - /** The first stage of the DataVersionBase definition. */ + /** + * The first stage of the DataVersionBase definition. + */ interface Blank extends WithParentResource { } - /** The stage of the DataVersionBase definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the DataVersionBase 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(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. @@ -100,69 +114,102 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ DataVersionBase create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ DataVersionBase create(Context context); } } + /** * Begins update for the DataVersionBase resource. - * + * * @return the stage of resource update. */ DataVersionBase.Update update(); - /** The template for DataVersionBase update. */ + /** + * The template for DataVersionBase update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ DataVersionBase apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ DataVersionBase apply(Context context); } - /** The DataVersionBase update stages. */ + + /** + * The DataVersionBase update stages. + */ interface UpdateStages { - /** The stage of the DataVersionBase update allowing to specify properties. */ + /** + * The stage of the DataVersionBase 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(DataVersionBaseProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ DataVersionBase refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @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..6e64735d2c689 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 @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Data version base definition. */ +/** + * Data version base definition. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -20,27 +22,39 @@ defaultImpl = DataVersionBaseProperties.class) @JsonTypeName("DataVersionBaseProperties") @JsonSubTypes({ + @JsonSubTypes.Type(name = "uri_folder", value = DataImport.class), @JsonSubTypes.Type(name = "mltable", value = MLTableData.class), @JsonSubTypes.Type(name = "uri_file", value = UriFileDataVersion.class), - @JsonSubTypes.Type(name = "uri_folder", value = UriFolderDataVersion.class) -}) + @JsonSubTypes.Type(name = "uri_folder", value = UriFolderDataVersion.class) }) @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; - /** Creates an instance of DataVersionBaseProperties class. */ + /* + * Intellectual Property details. Used if data is an Intellectual Property. + */ + @JsonProperty(value = "intellectualProperty") + private IntellectualProperty intellectualProperty; + + /* + * Stage in the data lifecycle assigned to this data asset + */ + @JsonProperty(value = "stage") + private String stage; + + /** + * Creates an instance of DataVersionBaseProperties class. + */ 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. */ public String dataUri() { @@ -48,9 +62,8 @@ 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. */ @@ -59,35 +72,94 @@ public DataVersionBaseProperties withDataUri(String dataUri) { return this; } - /** {@inheritDoc} */ + /** + * Get the intellectualProperty property: Intellectual Property details. Used if data is an Intellectual Property. + * + * @return the intellectualProperty value. + */ + public IntellectualProperty intellectualProperty() { + return this.intellectualProperty; + } + + /** + * Set the intellectualProperty property: Intellectual Property details. Used if data is an Intellectual Property. + * + * @param intellectualProperty the intellectualProperty value to set. + * @return the DataVersionBaseProperties object itself. + */ + public DataVersionBaseProperties withIntellectualProperty(IntellectualProperty intellectualProperty) { + this.intellectualProperty = intellectualProperty; + return this; + } + + /** + * Get the stage property: Stage in the data lifecycle assigned to this data asset. + * + * @return the stage value. + */ + public String stage() { + return this.stage; + } + + /** + * Set the stage property: Stage in the data lifecycle assigned to this data asset. + * + * @param stage the stage value to set. + * @return the DataVersionBaseProperties object itself. + */ + public DataVersionBaseProperties withStage(String stage) { + this.stage = stage; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DataVersionBaseProperties withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + return this; + } + + /** + * {@inheritDoc} + */ @Override public DataVersionBaseProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataVersionBaseProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataVersionBaseProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataVersionBaseProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DataVersionBaseProperties withTags(Map tags) { super.withTags(tags); @@ -96,17 +168,18 @@ public DataVersionBaseProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (dataUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataUri in model DataVersionBaseProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataUri in model DataVersionBaseProperties")); + } + if (intellectualProperty() != null) { + intellectualProperty().validate(); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java index 6e8048afa408a..510ca94363835 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of DataVersionBase entities. */ +/** + * A paginated list of DataVersionBase entities. + */ @Fluent public final class DataVersionBaseResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class DataVersionBaseResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of DataVersionBaseResourceArmPaginatedResult class. */ + /** + * Creates an instance of DataVersionBaseResourceArmPaginatedResult class. + */ public DataVersionBaseResourceArmPaginatedResult() { } /** - * Get the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional - * pages. - * + * Get the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no + * additional pages. + * * @return the nextLink value. */ public String nextLink() { @@ -39,9 +43,9 @@ public String nextLink() { } /** - * Set the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional - * pages. - * + * Set the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no + * additional pages. + * * @param nextLink the nextLink value to set. * @return the DataVersionBaseResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public DataVersionBaseResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type DataVersionBase. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type DataVersionBase. - * + * * @param value the value value to set. * @return the DataVersionBaseResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public DataVersionBaseResourceArmPaginatedResult withValue(List list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, String tags, ListViewType listViewType, 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. @@ -66,12 +62,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -84,7 +80,7 @@ Response deleteWithResponse( /** * 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. @@ -95,12 +91,12 @@ Response deleteWithResponse( * @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); + 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. @@ -113,55 +109,65 @@ Response getWithResponse( DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. - * - * @param id the resource ID. + * 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. + * @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. - * - * @param id the resource ID. - * @param context The context to associate with this operation. + * 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. + * @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. - * - * @param id the resource ID. + * 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. */ - void deleteById(String id); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); /** - * Delete version. - * - * @param id the resource ID. + * 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 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/DatabaseSource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabaseSource.java new file mode 100644 index 0000000000000..5ff1bd968f7a4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabaseSource.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.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; +import java.util.List; +import java.util.Map; + +/** + * The DatabaseSource model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "sourceType") +@JsonTypeName("database") +@Fluent +public final class DatabaseSource extends DataImportSource { + /* + * SQL Query statement for data import Database source + */ + @JsonProperty(value = "query") + private String query; + + /* + * SQL StoredProcedure on data import Database source + */ + @JsonProperty(value = "storedProcedure") + private String storedProcedure; + + /* + * SQL StoredProcedure parameters + */ + @JsonProperty(value = "storedProcedureParams") + private List> storedProcedureParams; + + /* + * Name of the table on data import Database source + */ + @JsonProperty(value = "tableName") + private String tableName; + + /** + * Creates an instance of DatabaseSource class. + */ + public DatabaseSource() { + } + + /** + * Get the query property: SQL Query statement for data import Database source. + * + * @return the query value. + */ + public String query() { + return this.query; + } + + /** + * Set the query property: SQL Query statement for data import Database source. + * + * @param query the query value to set. + * @return the DatabaseSource object itself. + */ + public DatabaseSource withQuery(String query) { + this.query = query; + return this; + } + + /** + * Get the storedProcedure property: SQL StoredProcedure on data import Database source. + * + * @return the storedProcedure value. + */ + public String storedProcedure() { + return this.storedProcedure; + } + + /** + * Set the storedProcedure property: SQL StoredProcedure on data import Database source. + * + * @param storedProcedure the storedProcedure value to set. + * @return the DatabaseSource object itself. + */ + public DatabaseSource withStoredProcedure(String storedProcedure) { + this.storedProcedure = storedProcedure; + return this; + } + + /** + * Get the storedProcedureParams property: SQL StoredProcedure parameters. + * + * @return the storedProcedureParams value. + */ + public List> storedProcedureParams() { + return this.storedProcedureParams; + } + + /** + * Set the storedProcedureParams property: SQL StoredProcedure parameters. + * + * @param storedProcedureParams the storedProcedureParams value to set. + * @return the DatabaseSource object itself. + */ + public DatabaseSource withStoredProcedureParams(List> storedProcedureParams) { + this.storedProcedureParams = storedProcedureParams; + return this; + } + + /** + * Get the tableName property: Name of the table on data import Database source. + * + * @return the tableName value. + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the tableName property: Name of the table on data import Database source. + * + * @param tableName the tableName value to set. + * @return the DatabaseSource object itself. + */ + public DatabaseSource withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DatabaseSource withConnection(String connection) { + super.withConnection(connection); + 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/Databricks.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java index a0f94b61afd0e..4ddad9d790fce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A DataFactory compute. */ +/** + * A DataFactory compute. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("Databricks") @Fluent @@ -20,13 +22,15 @@ public final class Databricks extends Compute { @JsonProperty(value = "properties") private DatabricksProperties properties; - /** Creates an instance of Databricks class. */ + /** + * Creates an instance of Databricks class. + */ public Databricks() { } /** * Get the properties property: Properties of Databricks. - * + * * @return the properties value. */ public DatabricksProperties properties() { @@ -35,7 +39,7 @@ public DatabricksProperties properties() { /** * Set the properties property: Properties of Databricks. - * + * * @param properties the properties value to set. * @return the Databricks object itself. */ @@ -44,28 +48,36 @@ public Databricks withProperties(DatabricksProperties properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Databricks withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Databricks withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Databricks withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Databricks withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -74,7 +86,7 @@ public Databricks withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java index bd9f0dfb69f7f..c9bc65bbfaa71 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Secrets related to a Machine Learning compute based on Databricks. */ +/** + * Secrets related to a Machine Learning compute based on Databricks. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("Databricks") @Fluent @@ -21,13 +23,15 @@ public final class DatabricksComputeSecrets extends ComputeSecretsInner { @JsonProperty(value = "databricksAccessToken") private String databricksAccessToken; - /** Creates an instance of DatabricksComputeSecrets class. */ + /** + * Creates an instance of DatabricksComputeSecrets class. + */ public DatabricksComputeSecrets() { } /** * Get the databricksAccessToken property: access token for databricks account. - * + * * @return the databricksAccessToken value. */ public String databricksAccessToken() { @@ -36,7 +40,7 @@ public String databricksAccessToken() { /** * Set the databricksAccessToken property: access token for databricks account. - * + * * @param databricksAccessToken the databricksAccessToken value to set. * @return the DatabricksComputeSecrets object itself. */ @@ -47,7 +51,7 @@ public DatabricksComputeSecrets withDatabricksAccessToken(String databricksAcces /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java index 3415468a00779..31ca2c0bfb6c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of Databricks Compute Secrets. */ +/** + * Properties of Databricks Compute Secrets. + */ @Fluent public class DatabricksComputeSecretsProperties { /* @@ -16,13 +18,15 @@ public class DatabricksComputeSecretsProperties { @JsonProperty(value = "databricksAccessToken") private String databricksAccessToken; - /** Creates an instance of DatabricksComputeSecretsProperties class. */ + /** + * Creates an instance of DatabricksComputeSecretsProperties class. + */ public DatabricksComputeSecretsProperties() { } /** * Get the databricksAccessToken property: access token for databricks account. - * + * * @return the databricksAccessToken value. */ public String databricksAccessToken() { @@ -31,7 +35,7 @@ public String databricksAccessToken() { /** * Set the databricksAccessToken property: access token for databricks account. - * + * * @param databricksAccessToken the databricksAccessToken value to set. * @return the DatabricksComputeSecretsProperties object itself. */ @@ -42,7 +46,7 @@ public DatabricksComputeSecretsProperties withDatabricksAccessToken(String datab /** * 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/DatabricksProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java index 5fff72428cc6f..e32a8c46112a6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of Databricks. */ +/** + * Properties of Databricks. + */ @Fluent public final class DatabricksProperties { /* @@ -22,13 +24,15 @@ public final class DatabricksProperties { @JsonProperty(value = "workspaceUrl") private String workspaceUrl; - /** Creates an instance of DatabricksProperties class. */ + /** + * Creates an instance of DatabricksProperties class. + */ public DatabricksProperties() { } /** * Get the databricksAccessToken property: Databricks access token. - * + * * @return the databricksAccessToken value. */ public String databricksAccessToken() { @@ -37,7 +41,7 @@ public String databricksAccessToken() { /** * Set the databricksAccessToken property: Databricks access token. - * + * * @param databricksAccessToken the databricksAccessToken value to set. * @return the DatabricksProperties object itself. */ @@ -48,7 +52,7 @@ public DatabricksProperties withDatabricksAccessToken(String databricksAccessTok /** * Get the workspaceUrl property: Workspace Url. - * + * * @return the workspaceUrl value. */ public String workspaceUrl() { @@ -57,7 +61,7 @@ public String workspaceUrl() { /** * Set the workspaceUrl property: Workspace Url. - * + * * @param workspaceUrl the workspaceUrl value to set. * @return the DatabricksProperties object itself. */ @@ -68,7 +72,7 @@ public DatabricksProperties withWorkspaceUrl(String workspaceUrl) { /** * 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/DatabricksSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java index b67e4f9483433..2b288072cd6b4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The DatabricksSchema model. */ +/** + * The DatabricksSchema model. + */ @Fluent public class DatabricksSchema { /* @@ -16,13 +18,15 @@ public class DatabricksSchema { @JsonProperty(value = "properties") private DatabricksProperties properties; - /** Creates an instance of DatabricksSchema class. */ + /** + * Creates an instance of DatabricksSchema class. + */ public DatabricksSchema() { } /** * Get the properties property: Properties of Databricks. - * + * * @return the properties value. */ public DatabricksProperties properties() { @@ -31,7 +35,7 @@ public DatabricksProperties properties() { /** * Set the properties property: Properties of Databricks. - * + * * @param properties the properties value to set. * @return the DatabricksSchema object itself. */ @@ -42,7 +46,7 @@ public DatabricksSchema withProperties(DatabricksProperties properties) { /** * 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/DatasetExportSummary.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetExportSummary.java new file mode 100644 index 0000000000000..27b8ef9d2aed9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetExportSummary.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.Immutable; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The DatasetExportSummary model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "format") +@JsonTypeName("Dataset") +@Immutable +public final class DatasetExportSummary extends ExportSummaryInner { + /* + * The unique name of the labeled data asset. + */ + @JsonProperty(value = "labeledAssetName", access = JsonProperty.Access.WRITE_ONLY) + private String labeledAssetName; + + /** + * Creates an instance of DatasetExportSummary class. + */ + public DatasetExportSummary() { + } + + /** + * Get the labeledAssetName property: The unique name of the labeled data asset. + * + * @return the labeledAssetName value. + */ + public String labeledAssetName() { + return this.labeledAssetName; + } + + /** + * 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/Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java index 7b181093c6e26..b2134852d1456 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 @@ -9,90 +9,103 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -/** An immutable client-side representation of Datastore. */ +/** + * An immutable client-side representation of Datastore. + */ public interface Datastore { /** * 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. */ DatastoreProperties 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.DatastoreInner object. - * + * * @return the inner object. */ DatastoreInner innerModel(); - /** The entirety of the Datastore definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the Datastore definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The Datastore definition stages. */ + + /** + * The Datastore definition stages. + */ interface DefinitionStages { - /** The first stage of the Datastore definition. */ + /** + * The first stage of the Datastore definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Datastore definition allowing to specify parent resource. */ + + /** + * The stage of the Datastore 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 Datastore definition allowing to specify properties. */ + + /** + * The stage of the Datastore 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(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. @@ -100,87 +113,102 @@ interface WithProperties { interface WithCreate extends DefinitionStages.WithSkipValidation { /** * Executes the create request. - * + * * @return the created resource. */ Datastore create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Datastore create(Context context); } - /** The stage of the Datastore definition allowing to specify skipValidation. */ + + /** + * The stage of the Datastore definition allowing to specify skipValidation. + */ interface WithSkipValidation { /** * Specifies the skipValidation property: Flag to skip validation.. - * + * * @param skipValidation Flag to skip validation. * @return the next definition stage. */ WithCreate withSkipValidation(Boolean skipValidation); } } + /** * Begins update for the Datastore resource. - * + * * @return the stage of resource update. */ Datastore.Update update(); - /** The template for Datastore update. */ + /** + * The template for Datastore update. + */ interface Update extends UpdateStages.WithProperties, UpdateStages.WithSkipValidation { /** * Executes the update request. - * + * * @return the updated resource. */ Datastore apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Datastore apply(Context context); } - /** The Datastore update stages. */ + + /** + * The Datastore update stages. + */ interface UpdateStages { - /** The stage of the Datastore update allowing to specify properties. */ + /** + * The stage of the Datastore 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(DatastoreProperties properties); } - /** The stage of the Datastore update allowing to specify skipValidation. */ + + /** + * The stage of the Datastore update allowing to specify skipValidation. + */ interface WithSkipValidation { /** * Specifies the skipValidation property: Flag to skip validation.. - * + * * @param skipValidation Flag to skip validation. * @return the next definition stage. */ Update withSkipValidation(Boolean skipValidation); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Datastore refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -188,7 +216,7 @@ interface WithSkipValidation { /** * Get datastore secrets. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -199,7 +227,7 @@ interface WithSkipValidation { /** * Get datastore secrets. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return datastore secrets. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java index abb8e62f1cc3d..5772c6f798876 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base definition for datastore credentials. */ +/** + * Base definition for datastore credentials. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,19 +21,22 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "AccountKey", value = AccountKeyDatastoreCredentials.class), @JsonSubTypes.Type(name = "Certificate", value = CertificateDatastoreCredentials.class), + @JsonSubTypes.Type(name = "KerberosKeytab", value = KerberosKeytabCredentials.class), + @JsonSubTypes.Type(name = "KerberosPassword", value = KerberosPasswordCredentials.class), @JsonSubTypes.Type(name = "None", value = NoneDatastoreCredentials.class), @JsonSubTypes.Type(name = "Sas", value = SasDatastoreCredentials.class), - @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreCredentials.class) -}) + @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreCredentials.class) }) @Immutable public class DatastoreCredentials { - /** Creates an instance of DatastoreCredentials class. */ + /** + * Creates an instance of DatastoreCredentials class. + */ public DatastoreCredentials() { } /** * 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/DatastoreProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java index 053662bb3d116..3d1a98ed71b60 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Base definition for datastore contents configuration. */ +/** + * Base definition for datastore contents configuration. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -23,8 +25,9 @@ @JsonSubTypes.Type(name = "AzureBlob", value = AzureBlobDatastore.class), @JsonSubTypes.Type(name = "AzureDataLakeGen1", value = AzureDataLakeGen1Datastore.class), @JsonSubTypes.Type(name = "AzureDataLakeGen2", value = AzureDataLakeGen2Datastore.class), - @JsonSubTypes.Type(name = "AzureFile", value = AzureFileDatastore.class) -}) + @JsonSubTypes.Type(name = "AzureFile", value = AzureFileDatastore.class), + @JsonSubTypes.Type(name = "Hdfs", value = HdfsDatastore.class), + @JsonSubTypes.Type(name = "OneLake", value = OneLakeDatastore.class) }) @Fluent public class DatastoreProperties extends ResourceBase { /* @@ -33,19 +36,27 @@ public class DatastoreProperties extends ResourceBase { @JsonProperty(value = "credentials", required = true) private DatastoreCredentials credentials; + /* + * Intellectual Property details. + */ + @JsonProperty(value = "intellectualProperty") + private IntellectualProperty intellectualProperty; + /* * Readonly property to indicate if datastore is the workspace default datastore */ @JsonProperty(value = "isDefault", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDefault; - /** Creates an instance of DatastoreProperties class. */ + /** + * Creates an instance of DatastoreProperties class. + */ public DatastoreProperties() { } /** * Get the credentials property: [Required] Account credentials. - * + * * @return the credentials value. */ public DatastoreCredentials credentials() { @@ -54,7 +65,7 @@ public DatastoreCredentials credentials() { /** * Set the credentials property: [Required] Account credentials. - * + * * @param credentials the credentials value to set. * @return the DatastoreProperties object itself. */ @@ -63,30 +74,56 @@ public DatastoreProperties withCredentials(DatastoreCredentials credentials) { return this; } + /** + * Get the intellectualProperty property: Intellectual Property details. + * + * @return the intellectualProperty value. + */ + public IntellectualProperty intellectualProperty() { + return this.intellectualProperty; + } + + /** + * Set the intellectualProperty property: Intellectual Property details. + * + * @param intellectualProperty the intellectualProperty value to set. + * @return the DatastoreProperties object itself. + */ + public DatastoreProperties withIntellectualProperty(IntellectualProperty intellectualProperty) { + this.intellectualProperty = intellectualProperty; + return this; + } + /** * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * + * * @return the isDefault value. */ public Boolean isDefault() { return this.isDefault; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DatastoreProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DatastoreProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DatastoreProperties withTags(Map tags) { super.withTags(tags); @@ -95,19 +132,21 @@ public DatastoreProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (credentials() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property credentials in model DatastoreProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property credentials in model DatastoreProperties")); } else { credentials().validate(); } + if (intellectualProperty() != null) { + intellectualProperty().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(DatastoreProperties.class); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java index 9acb559cf7ec1..908cd39cad490 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of Datastore entities. */ +/** + * A paginated list of Datastore entities. + */ @Fluent public final class DatastoreResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class DatastoreResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of DatastoreResourceArmPaginatedResult class. */ + /** + * Creates an instance of DatastoreResourceArmPaginatedResult class. + */ public DatastoreResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of Datastore objects. If null, there are no additional * pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of Datastore objects. If null, there are no additional * pages. - * + * * @param nextLink the nextLink value to set. * @return the DatastoreResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public DatastoreResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type Datastore. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type Datastore. - * + * * @param value the value value to set. * @return the DatastoreResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public DatastoreResourceArmPaginatedResult withValue(List 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/DatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java index 67b7f3d7b5483..5823a05b2b256 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java @@ -6,11 +6,13 @@ import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -/** An immutable client-side representation of DatastoreSecrets. */ +/** + * An immutable client-side representation of DatastoreSecrets. + */ public interface DatastoreSecrets { /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner object. - * + * * @return the inner object. */ DatastoreSecretsInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java index 0258a7e012f8c..eb8fcf3c7ef8f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java @@ -8,23 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine the datastore contents type. */ +/** + * Enum to determine the datastore contents type. + */ public final class DatastoreType extends ExpandableStringEnum { - /** Static value AzureBlob for DatastoreType. */ + /** + * Static value AzureBlob for DatastoreType. + */ public static final DatastoreType AZURE_BLOB = fromString("AzureBlob"); - /** Static value AzureDataLakeGen1 for DatastoreType. */ + /** + * Static value AzureDataLakeGen1 for DatastoreType. + */ public static final DatastoreType AZURE_DATA_LAKE_GEN1 = fromString("AzureDataLakeGen1"); - /** Static value AzureDataLakeGen2 for DatastoreType. */ + /** + * Static value AzureDataLakeGen2 for DatastoreType. + */ public static final DatastoreType AZURE_DATA_LAKE_GEN2 = fromString("AzureDataLakeGen2"); - /** Static value AzureFile for DatastoreType. */ + /** + * Static value AzureFile for DatastoreType. + */ public static final DatastoreType AZURE_FILE = fromString("AzureFile"); + /** + * Static value Hdfs for DatastoreType. + */ + public static final DatastoreType HDFS = fromString("Hdfs"); + + /** + * Static value OneLake for DatastoreType. + */ + public static final DatastoreType ONE_LAKE = fromString("OneLake"); + /** * Creates a new instance of DatastoreType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +53,7 @@ public DatastoreType() { /** * Creates or finds a DatastoreType from its string representation. - * + * * @param name a name to look for. * @return the corresponding DatastoreType. */ @@ -44,7 +64,7 @@ public static DatastoreType fromString(String name) { /** * Gets known DatastoreType values. - * + * * @return known DatastoreType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java index d3adbfe3d9cd6..eae2adceb76d5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java @@ -9,11 +9,13 @@ import com.azure.core.util.Context; import java.util.List; -/** Resource collection API of Datastores. */ +/** + * Resource collection API of Datastores. + */ public interface Datastores { /** * List datastores. - * + * * @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. @@ -25,7 +27,7 @@ public interface Datastores { /** * List datastores. - * + * * @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. @@ -41,21 +43,12 @@ public interface Datastores { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context); /** * Delete datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -69,7 +62,7 @@ PagedIterable list( /** * Delete datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -81,7 +74,7 @@ PagedIterable list( /** * Get datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -95,7 +88,7 @@ PagedIterable list( /** * Get datastore. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -108,7 +101,7 @@ PagedIterable list( /** * Get datastore secrets. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -118,12 +111,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return datastore secrets along with {@link Response}. */ - Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); + Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** * Get datastore secrets. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Datastore name. @@ -136,7 +129,7 @@ Response listSecretsWithResponse( /** * Get datastore. - * + * * @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. @@ -147,7 +140,7 @@ Response listSecretsWithResponse( /** * Get datastore. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -159,7 +152,7 @@ Response listSecretsWithResponse( /** * Delete datastore. - * + * * @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. @@ -169,7 +162,7 @@ Response listSecretsWithResponse( /** * Delete datastore. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,7 +174,7 @@ Response listSecretsWithResponse( /** * Begins definition for a new Datastore resource. - * + * * @param name resource name. * @return the first stage of the new Datastore definition. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java new file mode 100644 index 0000000000000..e8a11d43319ff --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for DefaultResourceProvisioningState. + */ +public final class DefaultResourceProvisioningState extends ExpandableStringEnum { + /** + * Static value NotStarted for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState NOT_STARTED = fromString("NotStarted"); + + /** + * Static value Failed for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Creating for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Succeeded for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Deleting for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Canceled for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of DefaultResourceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DefaultResourceProvisioningState() { + } + + /** + * Creates or finds a DefaultResourceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultResourceProvisioningState. + */ + @JsonCreator + public static DefaultResourceProvisioningState fromString(String name) { + return fromString(name, DefaultResourceProvisioningState.class); + } + + /** + * Gets known DefaultResourceProvisioningState values. + * + * @return known DefaultResourceProvisioningState values. + */ + public static Collection values() { + return values(DefaultResourceProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java index 0dbc03ac65382..db25ce86fe321 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The DefaultScaleSettings model. */ +/** + * The DefaultScaleSettings model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scaleType") @JsonTypeName("Default") @Immutable public final class DefaultScaleSettings extends OnlineScaleSettings { - /** Creates an instance of DefaultScaleSettings class. */ + /** + * Creates an instance of DefaultScaleSettings class. + */ public DefaultScaleSettings() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java index a16cf2ec0073d..b2144defa3e01 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -/** An immutable client-side representation of DeploymentLogs. */ +/** + * An immutable client-side representation of DeploymentLogs. + */ public interface DeploymentLogs { /** * Gets the content property: The retrieved online deployment logs. - * + * * @return the content value. */ String content(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner object. - * + * * @return the inner object. */ DeploymentLogsInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java index 12a5f06c5c2e9..5acf976f13c73 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The DeploymentLogsRequest model. */ +/** + * The DeploymentLogsRequest model. + */ @Fluent public final class DeploymentLogsRequest { /* @@ -22,13 +24,15 @@ public final class DeploymentLogsRequest { @JsonProperty(value = "tail") private Integer tail; - /** Creates an instance of DeploymentLogsRequest class. */ + /** + * Creates an instance of DeploymentLogsRequest class. + */ public DeploymentLogsRequest() { } /** * Get the containerType property: The type of container to retrieve logs from. - * + * * @return the containerType value. */ public ContainerType containerType() { @@ -37,7 +41,7 @@ public ContainerType containerType() { /** * Set the containerType property: The type of container to retrieve logs from. - * + * * @param containerType the containerType value to set. * @return the DeploymentLogsRequest object itself. */ @@ -48,7 +52,7 @@ public DeploymentLogsRequest withContainerType(ContainerType containerType) { /** * Get the tail property: The maximum number of lines to tail. - * + * * @return the tail value. */ public Integer tail() { @@ -57,7 +61,7 @@ public Integer tail() { /** * Set the tail property: The maximum number of lines to tail. - * + * * @param tail the tail value to set. * @return the DeploymentLogsRequest object itself. */ @@ -68,7 +72,7 @@ public DeploymentLogsRequest withTail(Integer tail) { /** * 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/DeploymentModel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModel.java new file mode 100644 index 0000000000000..cc1b9f199809f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModel.java @@ -0,0 +1,156 @@ +// Copyright (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; + +/** + * Properties of Cognitive Services account deployment model. + */ +@Fluent +public class DeploymentModel { + /* + * Deployment model format. + */ + @JsonProperty(value = "format") + private String format; + + /* + * Deployment model name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Optional. Deployment model version. If version is not specified, a default version will be assigned. The default + * version is different for different models and might change when there is new version available for a model. + * Default version for a model could be found from list models API. + */ + @JsonProperty(value = "version") + private String version; + + /* + * Optional. Deployment model source ARM resource ID. + */ + @JsonProperty(value = "source") + private String source; + + /* + * The call rate limit Cognitive Services account. + */ + @JsonProperty(value = "callRateLimit", access = JsonProperty.Access.WRITE_ONLY) + private CallRateLimit callRateLimit; + + /** + * Creates an instance of DeploymentModel class. + */ + public DeploymentModel() { + } + + /** + * Get the format property: Deployment model format. + * + * @return the format value. + */ + public String format() { + return this.format; + } + + /** + * Set the format property: Deployment model format. + * + * @param format the format value to set. + * @return the DeploymentModel object itself. + */ + public DeploymentModel withFormat(String format) { + this.format = format; + return this; + } + + /** + * Get the name property: Deployment model name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Deployment model name. + * + * @param name the name value to set. + * @return the DeploymentModel object itself. + */ + public DeploymentModel withName(String name) { + this.name = name; + return this; + } + + /** + * Get the version property: Optional. Deployment model version. If version is not specified, a default version + * will be assigned. The default version is different for different models and might change when there is new + * version available for a model. Default version for a model could be found from list models API. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Optional. Deployment model version. If version is not specified, a default version + * will be assigned. The default version is different for different models and might change when there is new + * version available for a model. Default version for a model could be found from list models API. + * + * @param version the version value to set. + * @return the DeploymentModel object itself. + */ + public DeploymentModel withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the source property: Optional. Deployment model source ARM resource ID. + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Optional. Deployment model source ARM resource ID. + * + * @param source the source value to set. + * @return the DeploymentModel object itself. + */ + public DeploymentModel withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the callRateLimit property: The call rate limit Cognitive Services account. + * + * @return the callRateLimit value. + */ + public CallRateLimit callRateLimit() { + return this.callRateLimit; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (callRateLimit() != null) { + callRateLimit().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.java new file mode 100644 index 0000000000000..3414f0f27fd42 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Deployment model version upgrade option. + */ +public final class DeploymentModelVersionUpgradeOption + extends ExpandableStringEnum { + /** + * Static value OnceNewDefaultVersionAvailable for DeploymentModelVersionUpgradeOption. + */ + public static final DeploymentModelVersionUpgradeOption ONCE_NEW_DEFAULT_VERSION_AVAILABLE + = fromString("OnceNewDefaultVersionAvailable"); + + /** + * Static value OnceCurrentVersionExpired for DeploymentModelVersionUpgradeOption. + */ + public static final DeploymentModelVersionUpgradeOption ONCE_CURRENT_VERSION_EXPIRED + = fromString("OnceCurrentVersionExpired"); + + /** + * Static value NoAutoUpgrade for DeploymentModelVersionUpgradeOption. + */ + public static final DeploymentModelVersionUpgradeOption NO_AUTO_UPGRADE = fromString("NoAutoUpgrade"); + + /** + * Creates a new instance of DeploymentModelVersionUpgradeOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentModelVersionUpgradeOption() { + } + + /** + * Creates or finds a DeploymentModelVersionUpgradeOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentModelVersionUpgradeOption. + */ + @JsonCreator + public static DeploymentModelVersionUpgradeOption fromString(String name) { + return fromString(name, DeploymentModelVersionUpgradeOption.class); + } + + /** + * Gets known DeploymentModelVersionUpgradeOption values. + * + * @return known DeploymentModelVersionUpgradeOption values. + */ + public static Collection values() { + return values(DeploymentModelVersionUpgradeOption.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java index 1f8856ab72e00..f3ede0e2186ea 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Possible values for DeploymentProvisioningState. */ +/** + * Possible values for DeploymentProvisioningState. + */ public final class DeploymentProvisioningState extends ExpandableStringEnum { - /** Static value Creating for DeploymentProvisioningState. */ + /** + * Static value Creating for DeploymentProvisioningState. + */ public static final DeploymentProvisioningState CREATING = fromString("Creating"); - /** Static value Deleting for DeploymentProvisioningState. */ + /** + * Static value Deleting for DeploymentProvisioningState. + */ public static final DeploymentProvisioningState DELETING = fromString("Deleting"); - /** Static value Scaling for DeploymentProvisioningState. */ + /** + * Static value Scaling for DeploymentProvisioningState. + */ public static final DeploymentProvisioningState SCALING = fromString("Scaling"); - /** Static value Updating for DeploymentProvisioningState. */ + /** + * Static value Updating for DeploymentProvisioningState. + */ public static final DeploymentProvisioningState UPDATING = fromString("Updating"); - /** Static value Succeeded for DeploymentProvisioningState. */ + /** + * Static value Succeeded for DeploymentProvisioningState. + */ public static final DeploymentProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for DeploymentProvisioningState. */ + /** + * Static value Failed for DeploymentProvisioningState. + */ public static final DeploymentProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for DeploymentProvisioningState. */ + /** + * Static value Canceled for DeploymentProvisioningState. + */ public static final DeploymentProvisioningState CANCELED = fromString("Canceled"); /** * Creates a new instance of DeploymentProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public DeploymentProvisioningState() { /** * Creates or finds a DeploymentProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding DeploymentProvisioningState. */ @@ -53,7 +69,7 @@ public static DeploymentProvisioningState fromString(String name) { /** * Gets known DeploymentProvisioningState values. - * + * * @return known DeploymentProvisioningState values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java index 652e1c26d99eb..39e97ca5917a2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java @@ -5,30 +5,59 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import java.util.List; import java.util.Map; -/** The DeploymentResourceConfiguration model. */ +/** + * The DeploymentResourceConfiguration model. + */ @Fluent public final class DeploymentResourceConfiguration extends ResourceConfiguration { - /** Creates an instance of DeploymentResourceConfiguration class. */ + /** + * Creates an instance of DeploymentResourceConfiguration class. + */ public DeploymentResourceConfiguration() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeploymentResourceConfiguration withInstanceCount(Integer instanceCount) { super.withInstanceCount(instanceCount); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DeploymentResourceConfiguration withInstanceType(String instanceType) { super.withInstanceType(instanceType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public DeploymentResourceConfiguration withLocations(List locations) { + super.withLocations(locations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DeploymentResourceConfiguration withMaxInstanceCount(Integer maxInstanceCount) { + super.withMaxInstanceCount(maxInstanceCount); + return this; + } + + /** + * {@inheritDoc} + */ @Override public DeploymentResourceConfiguration withProperties(Map properties) { super.withProperties(properties); @@ -37,7 +66,7 @@ public DeploymentResourceConfiguration withProperties(Map proper /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..6a622c7595544 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.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; + +/** + * 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/DiagnoseRequestProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java index cb9851aa8b82c..357daf9e5648d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java @@ -9,29 +9,24 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The DiagnoseRequestProperties model. */ +/** + * The DiagnoseRequestProperties model. + */ @Fluent public final class DiagnoseRequestProperties { /* - * Setting for diagnosing user defined routing - */ - @JsonProperty(value = "udr") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map udr; - - /* - * Setting for diagnosing network security group + * Setting for diagnosing dependent application insights */ - @JsonProperty(value = "nsg") + @JsonProperty(value = "applicationInsights") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map nsg; + private Map applicationInsights; /* - * Setting for diagnosing resource lock + * Setting for diagnosing dependent container registry */ - @JsonProperty(value = "resourceLock") + @JsonProperty(value = "containerRegistry") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map resourceLock; + private Map containerRegistry; /* * Setting for diagnosing dns resolution @@ -41,107 +36,103 @@ public final class DiagnoseRequestProperties { private Map dnsResolution; /* - * Setting for diagnosing dependent storage account + * Setting for diagnosing dependent key vault */ - @JsonProperty(value = "storageAccount") + @JsonProperty(value = "keyVault") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map storageAccount; + private Map keyVault; /* - * Setting for diagnosing dependent key vault + * Setting for diagnosing network security group */ - @JsonProperty(value = "keyVault") + @JsonProperty(value = "nsg") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map keyVault; + private Map nsg; /* - * Setting for diagnosing dependent container registry + * Setting for diagnosing unclassified category of problems */ - @JsonProperty(value = "containerRegistry") + @JsonProperty(value = "others") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map containerRegistry; + private Map others; /* - * Setting for diagnosing dependent application insights + * Setting for diagnosing the presence of required resource providers in the workspace. */ - @JsonProperty(value = "applicationInsights") + @JsonProperty(value = "requiredResourceProviders") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map applicationInsights; + private Map requiredResourceProviders; /* - * Setting for diagnosing unclassified category of problems + * Setting for diagnosing resource lock */ - @JsonProperty(value = "others") + @JsonProperty(value = "resourceLock") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map others; + private Map resourceLock; - /** Creates an instance of DiagnoseRequestProperties class. */ - public DiagnoseRequestProperties() { - } + /* + * Setting for diagnosing dependent storage account + */ + @JsonProperty(value = "storageAccount") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map storageAccount; - /** - * Get the udr property: Setting for diagnosing user defined routing. - * - * @return the udr value. + /* + * Setting for diagnosing user defined routing */ - public Map udr() { - return this.udr; - } + @JsonProperty(value = "udr") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map udr; /** - * Set the udr property: Setting for diagnosing user defined routing. - * - * @param udr the udr value to set. - * @return the DiagnoseRequestProperties object itself. + * Creates an instance of DiagnoseRequestProperties class. */ - public DiagnoseRequestProperties withUdr(Map udr) { - this.udr = udr; - return this; + public DiagnoseRequestProperties() { } /** - * Get the nsg property: Setting for diagnosing network security group. - * - * @return the nsg value. + * Get the applicationInsights property: Setting for diagnosing dependent application insights. + * + * @return the applicationInsights value. */ - public Map nsg() { - return this.nsg; + public Map applicationInsights() { + return this.applicationInsights; } /** - * Set the nsg property: Setting for diagnosing network security group. - * - * @param nsg the nsg value to set. + * Set the applicationInsights property: Setting for diagnosing dependent application insights. + * + * @param applicationInsights the applicationInsights value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withNsg(Map nsg) { - this.nsg = nsg; + public DiagnoseRequestProperties withApplicationInsights(Map applicationInsights) { + this.applicationInsights = applicationInsights; return this; } /** - * Get the resourceLock property: Setting for diagnosing resource lock. - * - * @return the resourceLock value. + * Get the containerRegistry property: Setting for diagnosing dependent container registry. + * + * @return the containerRegistry value. */ - public Map resourceLock() { - return this.resourceLock; + public Map containerRegistry() { + return this.containerRegistry; } /** - * Set the resourceLock property: Setting for diagnosing resource lock. - * - * @param resourceLock the resourceLock value to set. + * Set the containerRegistry property: Setting for diagnosing dependent container registry. + * + * @param containerRegistry the containerRegistry value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withResourceLock(Map resourceLock) { - this.resourceLock = resourceLock; + public DiagnoseRequestProperties withContainerRegistry(Map containerRegistry) { + this.containerRegistry = containerRegistry; return this; } /** * Get the dnsResolution property: Setting for diagnosing dns resolution. - * + * * @return the dnsResolution value. */ public Map dnsResolution() { @@ -150,7 +141,7 @@ public Map dnsResolution() { /** * Set the dnsResolution property: Setting for diagnosing dns resolution. - * + * * @param dnsResolution the dnsResolution value to set. * @return the DiagnoseRequestProperties object itself. */ @@ -160,108 +151,150 @@ public DiagnoseRequestProperties withDnsResolution(Map dnsResolu } /** - * Get the storageAccount property: Setting for diagnosing dependent storage account. - * - * @return the storageAccount value. + * Get the keyVault property: Setting for diagnosing dependent key vault. + * + * @return the keyVault value. */ - public Map storageAccount() { - return this.storageAccount; + public Map keyVault() { + return this.keyVault; } /** - * Set the storageAccount property: Setting for diagnosing dependent storage account. - * - * @param storageAccount the storageAccount value to set. + * Set the keyVault property: Setting for diagnosing dependent key vault. + * + * @param keyVault the keyVault value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withStorageAccount(Map storageAccount) { - this.storageAccount = storageAccount; + public DiagnoseRequestProperties withKeyVault(Map keyVault) { + this.keyVault = keyVault; return this; } /** - * Get the keyVault property: Setting for diagnosing dependent key vault. - * - * @return the keyVault value. + * Get the nsg property: Setting for diagnosing network security group. + * + * @return the nsg value. */ - public Map keyVault() { - return this.keyVault; + public Map nsg() { + return this.nsg; } /** - * Set the keyVault property: Setting for diagnosing dependent key vault. - * - * @param keyVault the keyVault value to set. + * Set the nsg property: Setting for diagnosing network security group. + * + * @param nsg the nsg value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withKeyVault(Map keyVault) { - this.keyVault = keyVault; + public DiagnoseRequestProperties withNsg(Map nsg) { + this.nsg = nsg; return this; } /** - * Get the containerRegistry property: Setting for diagnosing dependent container registry. - * - * @return the containerRegistry value. + * Get the others property: Setting for diagnosing unclassified category of problems. + * + * @return the others value. */ - public Map containerRegistry() { - return this.containerRegistry; + public Map others() { + return this.others; } /** - * Set the containerRegistry property: Setting for diagnosing dependent container registry. - * - * @param containerRegistry the containerRegistry value to set. + * Set the others property: Setting for diagnosing unclassified category of problems. + * + * @param others the others value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withContainerRegistry(Map containerRegistry) { - this.containerRegistry = containerRegistry; + public DiagnoseRequestProperties withOthers(Map others) { + this.others = others; return this; } /** - * Get the applicationInsights property: Setting for diagnosing dependent application insights. - * - * @return the applicationInsights value. + * Get the requiredResourceProviders property: Setting for diagnosing the presence of required resource providers + * in the workspace. + * + * @return the requiredResourceProviders value. */ - public Map applicationInsights() { - return this.applicationInsights; + public Map requiredResourceProviders() { + return this.requiredResourceProviders; } /** - * Set the applicationInsights property: Setting for diagnosing dependent application insights. - * - * @param applicationInsights the applicationInsights value to set. + * Set the requiredResourceProviders property: Setting for diagnosing the presence of required resource providers + * in the workspace. + * + * @param requiredResourceProviders the requiredResourceProviders value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withApplicationInsights(Map applicationInsights) { - this.applicationInsights = applicationInsights; + public DiagnoseRequestProperties withRequiredResourceProviders(Map requiredResourceProviders) { + this.requiredResourceProviders = requiredResourceProviders; return this; } /** - * Get the others property: Setting for diagnosing unclassified category of problems. - * - * @return the others value. + * Get the resourceLock property: Setting for diagnosing resource lock. + * + * @return the resourceLock value. */ - public Map others() { - return this.others; + public Map resourceLock() { + return this.resourceLock; } /** - * Set the others property: Setting for diagnosing unclassified category of problems. - * - * @param others the others value to set. + * Set the resourceLock property: Setting for diagnosing resource lock. + * + * @param resourceLock the resourceLock value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withOthers(Map others) { - this.others = others; + public DiagnoseRequestProperties withResourceLock(Map resourceLock) { + this.resourceLock = resourceLock; + return this; + } + + /** + * Get the storageAccount property: Setting for diagnosing dependent storage account. + * + * @return the storageAccount value. + */ + public Map storageAccount() { + return this.storageAccount; + } + + /** + * Set the storageAccount property: Setting for diagnosing dependent storage account. + * + * @param storageAccount the storageAccount value to set. + * @return the DiagnoseRequestProperties object itself. + */ + public DiagnoseRequestProperties withStorageAccount(Map storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * Get the udr property: Setting for diagnosing user defined routing. + * + * @return the udr value. + */ + public Map udr() { + return this.udr; + } + + /** + * Set the udr property: Setting for diagnosing user defined routing. + * + * @param udr the udr value to set. + * @return the DiagnoseRequestProperties object itself. + */ + public DiagnoseRequestProperties withUdr(Map udr) { + this.udr = udr; 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/DiagnoseResponseResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java index 403b22180639f..6dc007e7d30e0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner; -/** An immutable client-side representation of DiagnoseResponseResult. */ +/** + * An immutable client-side representation of DiagnoseResponseResult. + */ public interface DiagnoseResponseResult { /** * Gets the value property: The value property. - * + * * @return the value value. */ DiagnoseResponseResultValue value(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner object. - * + * * @return the inner object. */ DiagnoseResponseResultInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java index 81e242c0c4cae..f6d4d8c489690 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The DiagnoseResponseResultValue model. */ +/** + * The DiagnoseResponseResultValue model. + */ @Fluent public final class DiagnoseResponseResultValue { /* @@ -65,13 +67,15 @@ public final class DiagnoseResponseResultValue { @JsonProperty(value = "otherResults") private List otherResults; - /** Creates an instance of DiagnoseResponseResultValue class. */ + /** + * Creates an instance of DiagnoseResponseResultValue class. + */ public DiagnoseResponseResultValue() { } /** * Get the userDefinedRouteResults property: The userDefinedRouteResults property. - * + * * @return the userDefinedRouteResults value. */ public List userDefinedRouteResults() { @@ -80,7 +84,7 @@ public List userDefinedRouteResults() { /** * Set the userDefinedRouteResults property: The userDefinedRouteResults property. - * + * * @param userDefinedRouteResults the userDefinedRouteResults value to set. * @return the DiagnoseResponseResultValue object itself. */ @@ -91,7 +95,7 @@ public DiagnoseResponseResultValue withUserDefinedRouteResults(List networkSecurityRuleResults() { @@ -100,7 +104,7 @@ public List networkSecurityRuleResults() { /** * Set the networkSecurityRuleResults property: The networkSecurityRuleResults property. - * + * * @param networkSecurityRuleResults the networkSecurityRuleResults value to set. * @return the DiagnoseResponseResultValue object itself. */ @@ -111,7 +115,7 @@ public DiagnoseResponseResultValue withNetworkSecurityRuleResults(List resourceLockResults() { @@ -120,7 +124,7 @@ public List resourceLockResults() { /** * Set the resourceLockResults property: The resourceLockResults property. - * + * * @param resourceLockResults the resourceLockResults value to set. * @return the DiagnoseResponseResultValue object itself. */ @@ -131,7 +135,7 @@ public DiagnoseResponseResultValue withResourceLockResults(List /** * Get the dnsResolutionResults property: The dnsResolutionResults property. - * + * * @return the dnsResolutionResults value. */ public List dnsResolutionResults() { @@ -140,7 +144,7 @@ public List dnsResolutionResults() { /** * Set the dnsResolutionResults property: The dnsResolutionResults property. - * + * * @param dnsResolutionResults the dnsResolutionResults value to set. * @return the DiagnoseResponseResultValue object itself. */ @@ -151,7 +155,7 @@ public DiagnoseResponseResultValue withDnsResolutionResults(List /** * Get the storageAccountResults property: The storageAccountResults property. - * + * * @return the storageAccountResults value. */ public List storageAccountResults() { @@ -160,7 +164,7 @@ public List storageAccountResults() { /** * Set the storageAccountResults property: The storageAccountResults property. - * + * * @param storageAccountResults the storageAccountResults value to set. * @return the DiagnoseResponseResultValue object itself. */ @@ -171,7 +175,7 @@ public DiagnoseResponseResultValue withStorageAccountResults(List keyVaultResults() { @@ -180,7 +184,7 @@ public List keyVaultResults() { /** * Set the keyVaultResults property: The keyVaultResults property. - * + * * @param keyVaultResults the keyVaultResults value to set. * @return the DiagnoseResponseResultValue object itself. */ @@ -191,7 +195,7 @@ public DiagnoseResponseResultValue withKeyVaultResults(List keyV /** * Get the containerRegistryResults property: The containerRegistryResults property. - * + * * @return the containerRegistryResults value. */ public List containerRegistryResults() { @@ -200,7 +204,7 @@ public List containerRegistryResults() { /** * Set the containerRegistryResults property: The containerRegistryResults property. - * + * * @param containerRegistryResults the containerRegistryResults value to set. * @return the DiagnoseResponseResultValue object itself. */ @@ -211,7 +215,7 @@ public DiagnoseResponseResultValue withContainerRegistryResults(List applicationInsightsResults() { @@ -220,7 +224,7 @@ public List applicationInsightsResults() { /** * Set the applicationInsightsResults property: The applicationInsightsResults property. - * + * * @param applicationInsightsResults the applicationInsightsResults value to set. * @return the DiagnoseResponseResultValue object itself. */ @@ -231,7 +235,7 @@ public DiagnoseResponseResultValue withApplicationInsightsResults(List otherResults() { @@ -240,7 +244,7 @@ public List otherResults() { /** * Set the otherResults property: The otherResults property. - * + * * @param otherResults the otherResults value to set. * @return the DiagnoseResponseResultValue object itself. */ @@ -251,7 +255,7 @@ public DiagnoseResponseResultValue withOtherResults(List otherRe /** * 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/DiagnoseResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java index f7eb4471ab307..0d79e4db15b49 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Result of Diagnose. */ +/** + * Result of Diagnose. + */ @Immutable public final class DiagnoseResult { /* @@ -28,13 +30,15 @@ public final class DiagnoseResult { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; - /** Creates an instance of DiagnoseResult class. */ + /** + * Creates an instance of DiagnoseResult class. + */ public DiagnoseResult() { } /** * Get the code property: Code for workspace setup error. - * + * * @return the code value. */ public String code() { @@ -43,7 +47,7 @@ public String code() { /** * Get the level property: Level of workspace setup error. - * + * * @return the level value. */ public DiagnoseResultLevel level() { @@ -52,7 +56,7 @@ public DiagnoseResultLevel level() { /** * Get the message property: Message of workspace setup error. - * + * * @return the message value. */ public String message() { @@ -61,7 +65,7 @@ public String message() { /** * 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/DiagnoseResultLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java index fe22e4e3f9f55..9a862c0c34628 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Level of workspace setup error. */ +/** + * Level of workspace setup error. + */ public final class DiagnoseResultLevel extends ExpandableStringEnum { - /** Static value Warning for DiagnoseResultLevel. */ + /** + * Static value Warning for DiagnoseResultLevel. + */ public static final DiagnoseResultLevel WARNING = fromString("Warning"); - /** Static value Error for DiagnoseResultLevel. */ + /** + * Static value Error for DiagnoseResultLevel. + */ public static final DiagnoseResultLevel ERROR = fromString("Error"); - /** Static value Information for DiagnoseResultLevel. */ + /** + * Static value Information for DiagnoseResultLevel. + */ public static final DiagnoseResultLevel INFORMATION = fromString("Information"); /** * Creates a new instance of DiagnoseResultLevel value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public DiagnoseResultLevel() { /** * Creates or finds a DiagnoseResultLevel from its string representation. - * + * * @param name a name to look for. * @return the corresponding DiagnoseResultLevel. */ @@ -41,7 +49,7 @@ public static DiagnoseResultLevel fromString(String name) { /** * Gets known DiagnoseResultLevel values. - * + * * @return known DiagnoseResultLevel values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java index f0a37ececc467..350e8bf389335 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java @@ -7,22 +7,26 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Parameters to diagnose a workspace. */ +/** + * Parameters to diagnose a workspace. + */ @Fluent public final class DiagnoseWorkspaceParameters { /* - * Value of Parameters + * The value property. */ @JsonProperty(value = "value") private DiagnoseRequestProperties value; - /** Creates an instance of DiagnoseWorkspaceParameters class. */ + /** + * Creates an instance of DiagnoseWorkspaceParameters class. + */ public DiagnoseWorkspaceParameters() { } /** - * Get the value property: Value of Parameters. - * + * Get the value property: The value property. + * * @return the value value. */ public DiagnoseRequestProperties value() { @@ -30,8 +34,8 @@ public DiagnoseRequestProperties value() { } /** - * Set the value property: Value of Parameters. - * + * Set the value property: The value property. + * * @param value the value value to set. * @return the DiagnoseWorkspaceParameters object itself. */ @@ -42,7 +46,7 @@ public DiagnoseWorkspaceParameters withValue(DiagnoseRequestProperties 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/DistributionConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java index 059ddfa4210a4..c44d076195cbd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base definition for job distribution configuration. */ +/** + * Base definition for job distribution configuration. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,17 +21,19 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "Mpi", value = Mpi.class), @JsonSubTypes.Type(name = "PyTorch", value = PyTorch.class), - @JsonSubTypes.Type(name = "TensorFlow", value = TensorFlow.class) -}) + @JsonSubTypes.Type(name = "Ray", value = Ray.class), + @JsonSubTypes.Type(name = "TensorFlow", value = TensorFlow.class) }) @Immutable public class DistributionConfiguration { - /** Creates an instance of DistributionConfiguration class. */ + /** + * Creates an instance of DistributionConfiguration class. + */ public DistributionConfiguration() { } /** * 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/DistributionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java index 79c7b8c646ad9..baf31be584e2c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java @@ -8,20 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine the job distribution type. */ +/** + * Enum to determine the job distribution type. + */ public final class DistributionType extends ExpandableStringEnum { - /** Static value PyTorch for DistributionType. */ + /** + * Static value PyTorch for DistributionType. + */ public static final DistributionType PY_TORCH = fromString("PyTorch"); - /** Static value TensorFlow for DistributionType. */ + /** + * Static value TensorFlow for DistributionType. + */ public static final DistributionType TENSOR_FLOW = fromString("TensorFlow"); - /** Static value Mpi for DistributionType. */ + /** + * Static value Mpi for DistributionType. + */ public static final DistributionType MPI = fromString("Mpi"); + /** + * Static value Ray for DistributionType. + */ + public static final DistributionType RAY = fromString("Ray"); + /** * Creates a new instance of DistributionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +43,7 @@ public DistributionType() { /** * Creates or finds a DistributionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding DistributionType. */ @@ -41,7 +54,7 @@ public static DistributionType fromString(String name) { /** * Gets known DistributionType values. - * + * * @return known DistributionType values. */ public static Collection values() { 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..0a871a5cb365e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java @@ -0,0 +1,94 @@ +// Copyright (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; + +/** + * The Docker model. + */ +@Fluent +public final class Docker { + /* + * Indicate whether container shall run in privileged or non-privileged mode. + */ + @JsonProperty(value = "privileged") + private Boolean privileged; + + /* + * Dictionary of + */ + @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: Dictionary of <any>. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Dictionary of <any>. + * + * @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..24b957121e7be --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.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.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/EarlyTerminationPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java index 2137966297643..35c1d96673ea0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Early termination policies enable canceling poor-performing runs before they complete. */ +/** + * Early termination policies enable canceling poor-performing runs before they complete. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -20,8 +22,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "Bandit", value = BanditPolicy.class), @JsonSubTypes.Type(name = "MedianStopping", value = MedianStoppingPolicy.class), - @JsonSubTypes.Type(name = "TruncationSelection", value = TruncationSelectionPolicy.class) -}) + @JsonSubTypes.Type(name = "TruncationSelection", value = TruncationSelectionPolicy.class) }) @Fluent public class EarlyTerminationPolicy { /* @@ -36,13 +37,15 @@ public class EarlyTerminationPolicy { @JsonProperty(value = "evaluationInterval") private Integer evaluationInterval; - /** Creates an instance of EarlyTerminationPolicy class. */ + /** + * Creates an instance of EarlyTerminationPolicy class. + */ public EarlyTerminationPolicy() { } /** * Get the delayEvaluation property: Number of intervals by which to delay the first evaluation. - * + * * @return the delayEvaluation value. */ public Integer delayEvaluation() { @@ -51,7 +54,7 @@ public Integer delayEvaluation() { /** * Set the delayEvaluation property: Number of intervals by which to delay the first evaluation. - * + * * @param delayEvaluation the delayEvaluation value to set. * @return the EarlyTerminationPolicy object itself. */ @@ -62,7 +65,7 @@ public EarlyTerminationPolicy withDelayEvaluation(Integer delayEvaluation) { /** * Get the evaluationInterval property: Interval (number of runs) between policy evaluations. - * + * * @return the evaluationInterval value. */ public Integer evaluationInterval() { @@ -71,7 +74,7 @@ public Integer evaluationInterval() { /** * Set the evaluationInterval property: Interval (number of runs) between policy evaluations. - * + * * @param evaluationInterval the evaluationInterval value to set. * @return the EarlyTerminationPolicy object itself. */ @@ -82,7 +85,7 @@ public EarlyTerminationPolicy withEvaluationInterval(Integer evaluationInterval) /** * 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/EarlyTerminationPolicyType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.java index 1ab6e1510118d..90156c3c1b41a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EarlyTerminationPolicyType. */ +/** + * Defines values for EarlyTerminationPolicyType. + */ public final class EarlyTerminationPolicyType extends ExpandableStringEnum { - /** Static value Bandit for EarlyTerminationPolicyType. */ + /** + * Static value Bandit for EarlyTerminationPolicyType. + */ public static final EarlyTerminationPolicyType BANDIT = fromString("Bandit"); - /** Static value MedianStopping for EarlyTerminationPolicyType. */ + /** + * Static value MedianStopping for EarlyTerminationPolicyType. + */ public static final EarlyTerminationPolicyType MEDIAN_STOPPING = fromString("MedianStopping"); - /** Static value TruncationSelection for EarlyTerminationPolicyType. */ + /** + * Static value TruncationSelection for EarlyTerminationPolicyType. + */ public static final EarlyTerminationPolicyType TRUNCATION_SELECTION = fromString("TruncationSelection"); /** * Creates a new instance of EarlyTerminationPolicyType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public EarlyTerminationPolicyType() { /** * Creates or finds a EarlyTerminationPolicyType from its string representation. - * + * * @param name a name to look for. * @return the corresponding EarlyTerminationPolicyType. */ @@ -41,7 +49,7 @@ public static EarlyTerminationPolicyType fromString(String name) { /** * Gets known EarlyTerminationPolicyType values. - * + * * @return known EarlyTerminationPolicyType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java index e19a06ff3f63d..0a8c52c2b3356 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. */ +/** + * Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. + */ public final class EgressPublicNetworkAccessType extends ExpandableStringEnum { - /** Static value Enabled for EgressPublicNetworkAccessType. */ + /** + * Static value Enabled for EgressPublicNetworkAccessType. + */ public static final EgressPublicNetworkAccessType ENABLED = fromString("Enabled"); - /** Static value Disabled for EgressPublicNetworkAccessType. */ + /** + * Static value Disabled for EgressPublicNetworkAccessType. + */ public static final EgressPublicNetworkAccessType DISABLED = fromString("Disabled"); /** * Creates a new instance of EgressPublicNetworkAccessType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EgressPublicNetworkAccessType() { /** * Creates or finds a EgressPublicNetworkAccessType from its string representation. - * + * * @param name a name to look for. * @return the corresponding EgressPublicNetworkAccessType. */ @@ -38,7 +44,7 @@ public static EgressPublicNetworkAccessType fromString(String name) { /** * Gets known EgressPublicNetworkAccessType values. - * + * * @return known EgressPublicNetworkAccessType values. */ public static Collection values() { 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..2e2fed723cb3a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.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.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/EncryptionKeyVaultProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.java deleted file mode 100644 index b5dece8ac6eee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The EncryptionKeyVaultProperties model. */ -@Fluent -public final class EncryptionKeyVaultProperties { - /* - * The ArmId of the keyVault where the customer owned encryption key is present. - */ - @JsonProperty(value = "keyVaultArmId", required = true) - private String keyVaultArmId; - - /* - * Key vault uri to access the encryption key. - */ - @JsonProperty(value = "keyIdentifier", required = true) - private String keyIdentifier; - - /* - * For future use - The client id of the identity which will be used to access key vault. - */ - @JsonProperty(value = "identityClientId") - private String identityClientId; - - /** Creates an instance of EncryptionKeyVaultProperties class. */ - public EncryptionKeyVaultProperties() { - } - - /** - * Get the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @return the keyVaultArmId value. - */ - public String keyVaultArmId() { - return this.keyVaultArmId; - } - - /** - * Set the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @param keyVaultArmId the keyVaultArmId value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withKeyVaultArmId(String keyVaultArmId) { - this.keyVaultArmId = keyVaultArmId; - return this; - } - - /** - * Get the keyIdentifier property: Key vault uri to access the encryption key. - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: Key vault uri to access the encryption key. - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @return the identityClientId value. - */ - public String identityClientId() { - return this.identityClientId; - } - - /** - * Set the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @param identityClientId the identityClientId value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withIdentityClientId(String identityClientId) { - this.identityClientId = identityClientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultArmId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyVaultArmId in model EncryptionKeyVaultProperties")); - } - if (keyIdentifier() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyIdentifier in model EncryptionKeyVaultProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyVaultProperties.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java new file mode 100644 index 0000000000000..40a3a0a0f93fd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The EncryptionKeyVaultUpdateProperties model. + */ +@Fluent +public final class EncryptionKeyVaultUpdateProperties { + /* + * The keyIdentifier property. + */ + @JsonProperty(value = "keyIdentifier", required = true) + private String keyIdentifier; + + /** + * Creates an instance of EncryptionKeyVaultUpdateProperties class. + */ + public EncryptionKeyVaultUpdateProperties() { + } + + /** + * Get the keyIdentifier property: The keyIdentifier property. + * + * @return the keyIdentifier value. + */ + public String keyIdentifier() { + return this.keyIdentifier; + } + + /** + * Set the keyIdentifier property: The keyIdentifier property. + * + * @param keyIdentifier the keyIdentifier value to set. + * @return the EncryptionKeyVaultUpdateProperties object itself. + */ + public EncryptionKeyVaultUpdateProperties withKeyIdentifier(String keyIdentifier) { + this.keyIdentifier = keyIdentifier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyIdentifier() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property keyIdentifier in model EncryptionKeyVaultUpdateProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyVaultUpdateProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java index a56f01ee36e6f..5637f4a0a1e77 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java @@ -8,54 +8,81 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The EncryptionProperty model. */ +/** + * The EncryptionProperty model. + */ @Fluent public final class EncryptionProperty { /* - * Indicates whether or not the encryption is enabled for the workspace. + * The byok cosmosdb account that customer brings to store customer's data + * with encryption */ - @JsonProperty(value = "status", required = true) - private EncryptionStatus status; + @JsonProperty(value = "cosmosDbResourceId") + private String cosmosDbResourceId; /* - * The identity that will be used to access the key vault for encryption at rest. + * Identity to be used with the keyVault */ @JsonProperty(value = "identity") private IdentityForCmk identity; /* - * Customer Key vault properties. + * KeyVault details to do the encryption */ @JsonProperty(value = "keyVaultProperties", required = true) - private EncryptionKeyVaultProperties keyVaultProperties; + private KeyVaultProperties keyVaultProperties; - /** Creates an instance of EncryptionProperty class. */ + /* + * The byok search account that customer brings to store customer's data + * with encryption + */ + @JsonProperty(value = "searchAccountResourceId") + private String searchAccountResourceId; + + /* + * Indicates whether or not the encryption is enabled for the workspace. + */ + @JsonProperty(value = "status", required = true) + private EncryptionStatus status; + + /* + * The byok storage account that customer brings to store customer's data + * with encryption + */ + @JsonProperty(value = "storageAccountResourceId") + private String storageAccountResourceId; + + /** + * Creates an instance of EncryptionProperty class. + */ public EncryptionProperty() { } /** - * Get the status property: Indicates whether or not the encryption is enabled for the workspace. - * - * @return the status value. + * Get the cosmosDbResourceId property: The byok cosmosdb account that customer brings to store customer's data + * with encryption. + * + * @return the cosmosDbResourceId value. */ - public EncryptionStatus status() { - return this.status; + public String cosmosDbResourceId() { + return this.cosmosDbResourceId; } /** - * Set the status property: Indicates whether or not the encryption is enabled for the workspace. - * - * @param status the status value to set. + * Set the cosmosDbResourceId property: The byok cosmosdb account that customer brings to store customer's data + * with encryption. + * + * @param cosmosDbResourceId the cosmosDbResourceId value to set. * @return the EncryptionProperty object itself. */ - public EncryptionProperty withStatus(EncryptionStatus status) { - this.status = status; + public EncryptionProperty withCosmosDbResourceId(String cosmosDbResourceId) { + this.cosmosDbResourceId = cosmosDbResourceId; return this; } /** - * Get the identity property: The identity that will be used to access the key vault for encryption at rest. - * + * Get the identity property: Identity to be used with the keyVault. + * * @return the identity value. */ public IdentityForCmk identity() { @@ -63,8 +90,8 @@ public IdentityForCmk identity() { } /** - * Set the identity property: The identity that will be used to access the key vault for encryption at rest. - * + * Set the identity property: Identity to be used with the keyVault. + * * @param identity the identity value to set. * @return the EncryptionProperty object itself. */ @@ -74,47 +101,110 @@ public EncryptionProperty withIdentity(IdentityForCmk identity) { } /** - * Get the keyVaultProperties property: Customer Key vault properties. - * + * Get the keyVaultProperties property: KeyVault details to do the encryption. + * * @return the keyVaultProperties value. */ - public EncryptionKeyVaultProperties keyVaultProperties() { + public KeyVaultProperties keyVaultProperties() { return this.keyVaultProperties; } /** - * Set the keyVaultProperties property: Customer Key vault properties. - * + * Set the keyVaultProperties property: KeyVault details to do the encryption. + * * @param keyVaultProperties the keyVaultProperties value to set. * @return the EncryptionProperty object itself. */ - public EncryptionProperty withKeyVaultProperties(EncryptionKeyVaultProperties keyVaultProperties) { + public EncryptionProperty withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { this.keyVaultProperties = keyVaultProperties; return this; } + /** + * Get the searchAccountResourceId property: The byok search account that customer brings to store customer's data + * with encryption. + * + * @return the searchAccountResourceId value. + */ + public String searchAccountResourceId() { + return this.searchAccountResourceId; + } + + /** + * Set the searchAccountResourceId property: The byok search account that customer brings to store customer's data + * with encryption. + * + * @param searchAccountResourceId the searchAccountResourceId value to set. + * @return the EncryptionProperty object itself. + */ + public EncryptionProperty withSearchAccountResourceId(String searchAccountResourceId) { + this.searchAccountResourceId = searchAccountResourceId; + return this; + } + + /** + * Get the status property: Indicates whether or not the encryption is enabled for the workspace. + * + * @return the status value. + */ + public EncryptionStatus status() { + return this.status; + } + + /** + * Set the status property: Indicates whether or not the encryption is enabled for the workspace. + * + * @param status the status value to set. + * @return the EncryptionProperty object itself. + */ + public EncryptionProperty withStatus(EncryptionStatus status) { + this.status = status; + return this; + } + + /** + * Get the storageAccountResourceId property: The byok storage account that customer brings to store customer's + * data + * with encryption. + * + * @return the storageAccountResourceId value. + */ + public String storageAccountResourceId() { + return this.storageAccountResourceId; + } + + /** + * Set the storageAccountResourceId property: The byok storage account that customer brings to store customer's + * data + * with encryption. + * + * @param storageAccountResourceId the storageAccountResourceId value to set. + * @return the EncryptionProperty object itself. + */ + public EncryptionProperty withStorageAccountResourceId(String storageAccountResourceId) { + this.storageAccountResourceId = storageAccountResourceId; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property status in model EncryptionProperty")); - } if (identity() != null) { identity().validate(); } if (keyVaultProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyVaultProperties in model EncryptionProperty")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property keyVaultProperties in model EncryptionProperty")); } else { keyVaultProperties().validate(); } + if (status() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property status in model EncryptionProperty")); + } } private static final ClientLogger LOGGER = new ClientLogger(EncryptionProperty.class); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java index abfb234a26af6..7a5104fb8703b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates whether or not the encryption is enabled for the workspace. */ +/** + * Indicates whether or not the encryption is enabled for the workspace. + */ public final class EncryptionStatus extends ExpandableStringEnum { - /** Static value Enabled for EncryptionStatus. */ + /** + * Static value Enabled for EncryptionStatus. + */ public static final EncryptionStatus ENABLED = fromString("Enabled"); - /** Static value Disabled for EncryptionStatus. */ + /** + * Static value Disabled for EncryptionStatus. + */ public static final EncryptionStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of EncryptionStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EncryptionStatus() { /** * Creates or finds a EncryptionStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding EncryptionStatus. */ @@ -38,7 +44,7 @@ public static EncryptionStatus fromString(String name) { /** * Gets known EncryptionStatus values. - * + * * @return known EncryptionStatus values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java new file mode 100644 index 0000000000000..1df9fae4e077c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The EncryptionUpdateProperties model. + */ +@Fluent +public final class EncryptionUpdateProperties { + /* + * The keyVaultProperties property. + */ + @JsonProperty(value = "keyVaultProperties", required = true) + private EncryptionKeyVaultUpdateProperties keyVaultProperties; + + /** + * Creates an instance of EncryptionUpdateProperties class. + */ + public EncryptionUpdateProperties() { + } + + /** + * Get the keyVaultProperties property: The keyVaultProperties property. + * + * @return the keyVaultProperties value. + */ + public EncryptionKeyVaultUpdateProperties keyVaultProperties() { + return this.keyVaultProperties; + } + + /** + * Set the keyVaultProperties property: The keyVaultProperties property. + * + * @param keyVaultProperties the keyVaultProperties value to set. + * @return the EncryptionUpdateProperties object itself. + */ + public EncryptionUpdateProperties withKeyVaultProperties(EncryptionKeyVaultUpdateProperties keyVaultProperties) { + this.keyVaultProperties = keyVaultProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyVaultProperties() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property keyVaultProperties in model EncryptionUpdateProperties")); + } else { + keyVaultProperties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EncryptionUpdateProperties.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..4454b505bd0ac --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Endpoint model. + */ +@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/EndpointAuthKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java index 0d6b4eba1bf55..91480236604d9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -/** An immutable client-side representation of EndpointAuthKeys. */ +/** + * An immutable client-side representation of EndpointAuthKeys. + */ public interface EndpointAuthKeys { /** * Gets the primaryKey property: The primary key. - * + * * @return the primaryKey value. */ String primaryKey(); /** * Gets the secondaryKey property: The secondary key. - * + * * @return the secondaryKey value. */ String secondaryKey(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner object. - * + * * @return the inner object. */ EndpointAuthKeysInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java index c52e770ee18d8..14196600abb6d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine endpoint authentication mode. */ +/** + * Enum to determine endpoint authentication mode. + */ public final class EndpointAuthMode extends ExpandableStringEnum { - /** Static value AMLToken for EndpointAuthMode. */ + /** + * Static value AMLToken for EndpointAuthMode. + */ public static final EndpointAuthMode AMLTOKEN = fromString("AMLToken"); - /** Static value Key for EndpointAuthMode. */ + /** + * Static value Key for EndpointAuthMode. + */ public static final EndpointAuthMode KEY = fromString("Key"); - /** Static value AADToken for EndpointAuthMode. */ + /** + * Static value AADToken for EndpointAuthMode. + */ public static final EndpointAuthMode AADTOKEN = fromString("AADToken"); /** * Creates a new instance of EndpointAuthMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public EndpointAuthMode() { /** * Creates or finds a EndpointAuthMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding EndpointAuthMode. */ @@ -41,7 +49,7 @@ public static EndpointAuthMode fromString(String name) { /** * Gets known EndpointAuthMode values. - * + * * @return known EndpointAuthMode values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java index 327ea7b62a73a..d5ad66f4e7deb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -/** An immutable client-side representation of EndpointAuthToken. */ +/** + * An immutable client-side representation of EndpointAuthToken. + */ public interface EndpointAuthToken { /** * Gets the accessToken property: Access token for endpoint authentication. - * + * * @return the accessToken value. */ String accessToken(); /** * Gets the expiryTimeUtc property: Access token expiry time (UTC). - * + * * @return the expiryTimeUtc value. */ Long expiryTimeUtc(); /** * Gets the refreshAfterTimeUtc property: Refresh access token after time (UTC). - * + * * @return the refreshAfterTimeUtc value. */ Long refreshAfterTimeUtc(); /** * Gets the tokenType property: Access token type. - * + * * @return the tokenType value. */ String tokenType(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner object. - * + * * @return the inner object. */ EndpointAuthTokenInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java index e80c9ec955ccd..59cd3de3a51f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine endpoint compute type. */ +/** + * Enum to determine endpoint compute type. + */ public final class EndpointComputeType extends ExpandableStringEnum { - /** Static value Managed for EndpointComputeType. */ + /** + * Static value Managed for EndpointComputeType. + */ public static final EndpointComputeType MANAGED = fromString("Managed"); - /** Static value Kubernetes for EndpointComputeType. */ + /** + * Static value Kubernetes for EndpointComputeType. + */ public static final EndpointComputeType KUBERNETES = fromString("Kubernetes"); - /** Static value AzureMLCompute for EndpointComputeType. */ + /** + * Static value AzureMLCompute for EndpointComputeType. + */ public static final EndpointComputeType AZURE_MLCOMPUTE = fromString("AzureMLCompute"); /** * Creates a new instance of EndpointComputeType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public EndpointComputeType() { /** * Creates or finds a EndpointComputeType from its string representation. - * + * * @param name a name to look for. * @return the corresponding EndpointComputeType. */ @@ -41,7 +49,7 @@ public static EndpointComputeType fromString(String name) { /** * Gets known EndpointComputeType values. - * + * * @return known EndpointComputeType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java new file mode 100644 index 0000000000000..830828add971a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java @@ -0,0 +1,132 @@ +// Copyright (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 EndpointDeploymentModel model. + */ +@Fluent +public final class EndpointDeploymentModel { + /* + * Model format + */ + @JsonProperty(value = "format") + private String format; + + /* + * Model name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Optional. Deployment model source ARM resource ID. + */ + @JsonProperty(value = "source") + private String source; + + /* + * Model version. + */ + @JsonProperty(value = "version") + private String version; + + /** + * Creates an instance of EndpointDeploymentModel class. + */ + public EndpointDeploymentModel() { + } + + /** + * Get the format property: Model format. + * + * @return the format value. + */ + public String format() { + return this.format; + } + + /** + * Set the format property: Model format. + * + * @param format the format value to set. + * @return the EndpointDeploymentModel object itself. + */ + public EndpointDeploymentModel withFormat(String format) { + this.format = format; + return this; + } + + /** + * Get the name property: Model name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Model name. + * + * @param name the name value to set. + * @return the EndpointDeploymentModel object itself. + */ + public EndpointDeploymentModel withName(String name) { + this.name = name; + return this; + } + + /** + * Get the source property: Optional. Deployment model source ARM resource ID. + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Optional. Deployment model source ARM resource ID. + * + * @param source the source value to set. + * @return the EndpointDeploymentModel object itself. + */ + public EndpointDeploymentModel withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the version property: Model version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Model version. + * + * @param version the version value to set. + * @return the EndpointDeploymentModel object itself. + */ + public EndpointDeploymentModel withVersion(String version) { + this.version = version; + 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/EndpointDeploymentPropertiesBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java index 9f210ec5de03b..62eb13c207e24 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Base definition for endpoint deployment. */ +/** + * Base definition for endpoint deployment. + */ @Fluent public class EndpointDeploymentPropertiesBase { /* @@ -25,7 +27,7 @@ public class EndpointDeploymentPropertiesBase { private String description; /* - * ARM resource ID or AssetId of the environment specification for the endpoint deployment. + * ARM resource ID of the environment specification for the endpoint deployment. */ @JsonProperty(value = "environmentId") private String environmentId; @@ -44,13 +46,15 @@ public class EndpointDeploymentPropertiesBase { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map properties; - /** Creates an instance of EndpointDeploymentPropertiesBase class. */ + /** + * Creates an instance of EndpointDeploymentPropertiesBase class. + */ public EndpointDeploymentPropertiesBase() { } /** * Get the codeConfiguration property: Code configuration for the endpoint deployment. - * + * * @return the codeConfiguration value. */ public CodeConfiguration codeConfiguration() { @@ -59,7 +63,7 @@ public CodeConfiguration codeConfiguration() { /** * Set the codeConfiguration property: Code configuration for the endpoint deployment. - * + * * @param codeConfiguration the codeConfiguration value to set. * @return the EndpointDeploymentPropertiesBase object itself. */ @@ -70,7 +74,7 @@ public EndpointDeploymentPropertiesBase withCodeConfiguration(CodeConfiguration /** * Get the description property: Description of the endpoint deployment. - * + * * @return the description value. */ public String description() { @@ -79,7 +83,7 @@ public String description() { /** * Set the description property: Description of the endpoint deployment. - * + * * @param description the description value to set. * @return the EndpointDeploymentPropertiesBase object itself. */ @@ -89,9 +93,8 @@ public EndpointDeploymentPropertiesBase withDescription(String description) { } /** - * Get the environmentId property: ARM resource ID or AssetId of the environment specification for the endpoint - * deployment. - * + * Get the environmentId property: ARM resource ID of the environment specification for the endpoint deployment. + * * @return the environmentId value. */ public String environmentId() { @@ -99,9 +102,8 @@ public String environmentId() { } /** - * Set the environmentId property: ARM resource ID or AssetId of the environment specification for the endpoint - * deployment. - * + * Set the environmentId property: ARM resource ID of the environment specification for the endpoint deployment. + * * @param environmentId the environmentId value to set. * @return the EndpointDeploymentPropertiesBase object itself. */ @@ -112,7 +114,7 @@ public EndpointDeploymentPropertiesBase withEnvironmentId(String environmentId) /** * Get the environmentVariables property: Environment variables configuration for the deployment. - * + * * @return the environmentVariables value. */ public Map environmentVariables() { @@ -121,7 +123,7 @@ public Map environmentVariables() { /** * Set the environmentVariables property: Environment variables configuration for the deployment. - * + * * @param environmentVariables the environmentVariables value to set. * @return the EndpointDeploymentPropertiesBase object itself. */ @@ -132,7 +134,7 @@ public EndpointDeploymentPropertiesBase withEnvironmentVariables(Map properties() { @@ -141,7 +143,7 @@ public Map 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 EndpointDeploymentPropertiesBase object itself. */ @@ -152,7 +154,7 @@ public EndpointDeploymentPropertiesBase withProperties(Map prope /** * 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/EndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.java new file mode 100644 index 0000000000000..f9826380767d1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.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.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The EndpointDeploymentResourceProperties model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = EndpointDeploymentResourceProperties.class) +@JsonTypeName("EndpointDeploymentResourceProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Azure.ContentSafety", value = ContentSafetyEndpointDeploymentResourceProperties.class), + @JsonSubTypes.Type(name = "managedOnlineEndpoint", value = ManagedOnlineEndpointDeploymentResourceProperties.class), + @JsonSubTypes.Type(name = "Azure.OpenAI", value = OpenAIEndpointDeploymentResourceProperties.class), + @JsonSubTypes.Type(name = "Azure.Speech", value = SpeechEndpointDeploymentResourceProperties.class) }) +@Fluent +public class EndpointDeploymentResourceProperties { + /* + * The failure reason if the creation failed. + */ + @JsonProperty(value = "failureReason") + private String failureReason; + + /* + * Read-only provision state status property. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DefaultResourceProvisioningState provisioningState; + + /** + * Creates an instance of EndpointDeploymentResourceProperties class. + */ + public EndpointDeploymentResourceProperties() { + } + + /** + * Get the failureReason property: The failure reason if the creation failed. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Set the failureReason property: The failure reason if the creation failed. + * + * @param failureReason the failureReason value to set. + * @return the EndpointDeploymentResourceProperties object itself. + */ + public EndpointDeploymentResourceProperties withFailureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + /** + * Get the provisioningState property: Read-only provision state status property. + * + * @return the provisioningState value. + */ + public DefaultResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * 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/EndpointDeploymentResourcePropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java new file mode 100644 index 0000000000000..b44a4753904fd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java @@ -0,0 +1,194 @@ +// Copyright (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.EndpointDeploymentResourcePropertiesBasicResourceInner; + +/** + * An immutable client-side representation of EndpointDeploymentResourcePropertiesBasicResource. + */ +public interface EndpointDeploymentResourcePropertiesBasicResource { + /** + * 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: The properties property. + * + * @return the properties value. + */ + EndpointDeploymentResourceProperties 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.EndpointDeploymentResourcePropertiesBasicResourceInner + * object. + * + * @return the inner object. + */ + EndpointDeploymentResourcePropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the EndpointDeploymentResourcePropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The EndpointDeploymentResourcePropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the EndpointDeploymentResourcePropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource definition allowing to specify parent + * resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, endpointName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @return the next definition stage. + */ + WithProperties withExistingEndpoint(String resourceGroupName, String workspaceName, String endpointName); + } + + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties property.. + * + * @param properties The properties property. + * @return the next definition stage. + */ + WithCreate withProperties(EndpointDeploymentResourceProperties properties); + } + + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource 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. + */ + EndpointDeploymentResourcePropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + EndpointDeploymentResourcePropertiesBasicResource create(Context context); + } + } + + /** + * Begins update for the EndpointDeploymentResourcePropertiesBasicResource resource. + * + * @return the stage of resource update. + */ + EndpointDeploymentResourcePropertiesBasicResource.Update update(); + + /** + * The template for EndpointDeploymentResourcePropertiesBasicResource update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + EndpointDeploymentResourcePropertiesBasicResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + EndpointDeploymentResourcePropertiesBasicResource apply(Context context); + } + + /** + * The EndpointDeploymentResourcePropertiesBasicResource update stages. + */ + interface UpdateStages { + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties property.. + * + * @param properties The properties property. + * @return the next definition stage. + */ + Update withProperties(EndpointDeploymentResourceProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + EndpointDeploymentResourcePropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + EndpointDeploymentResourcePropertiesBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..2c015249221fc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.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.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult model. + */ +@Fluent +public final class EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult { + /* + * The nextLink property. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * The value property. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult class. + */ + public EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The nextLink property. + * + * @param nextLink the nextLink value to set. + * @return the EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult object itself. + */ + public EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult object itself. + */ + public EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult + 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/EndpointDeployments.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.java new file mode 100644 index 0000000000000..693e363db5acc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.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; + +/** + * Resource collection API of EndpointDeployments. + */ +public interface EndpointDeployments { + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName); + + /** + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName, EndpointType endpointType, String skip, Context context); + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName); + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName, Context context); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Context context); + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name. + */ + EndpointDeploymentResourcePropertiesBasicResource get(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName); + + /** + * Get deployments under endpoint resource by name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name along with {@link Response}. + */ + EndpointDeploymentResourcePropertiesBasicResource getById(String id); + + /** + * Get deployments under endpoint resource by name. + * + * @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 deployments under endpoint resource by name along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete endpoint deployment resource by name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete endpoint deployment resource by name. + * + * @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 EndpointDeploymentResourcePropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new EndpointDeploymentResourcePropertiesBasicResource definition. + */ + EndpointDeploymentResourcePropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java new file mode 100644 index 0000000000000..2ff238c3d1fa4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.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.EndpointKeysInner; + +/** + * An immutable client-side representation of EndpointKeys. + */ +public interface EndpointKeys { + /** + * Gets the keys property: Dictionary of Keys for the endpoint. + * + * @return the keys value. + */ + AccountApiKeys keys(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner object. + * + * @return the inner object. + */ + EndpointKeysInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java new file mode 100644 index 0000000000000..1875f42447b48 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountModelInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The EndpointModels model. + */ +@Fluent +public final class EndpointModels { + /* + * The link to the next page constructed using the continuationToken. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * List of models. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of EndpointModels class. + */ + public EndpointModels() { + } + + /** + * 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 EndpointModels object itself. + */ + public EndpointModels withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: List of models. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of models. + * + * @param value the value value to set. + * @return the EndpointModels object itself. + */ + public EndpointModels 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/EndpointPropertiesBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java index 0251403b9fe8e..d3c899248d138 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java @@ -7,55 +7,57 @@ import com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner; import java.util.Map; -/** An immutable client-side representation of EndpointPropertiesBase. */ +/** + * An immutable client-side representation of EndpointPropertiesBase. + */ public interface EndpointPropertiesBase { /** * Gets the authMode property: [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine * Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - * + * * @return the authMode value. */ EndpointAuthMode authMode(); /** * Gets the description property: Description of the inference endpoint. - * + * * @return the description value. */ String description(); /** - * Gets the keys property: EndpointAuthKeys to set initially on an Endpoint. This property will always be returned - * as null. AuthKey values must be retrieved using the ListKeys API. - * + * Gets the keys property: EndpointAuthKeys to set initially on an Endpoint. + * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + * * @return the keys value. */ EndpointAuthKeys keys(); /** * Gets the properties property: Property dictionary. Properties can be added, but not removed or altered. - * + * * @return the properties value. */ Map properties(); /** * Gets the scoringUri property: Endpoint URI. - * + * * @return the scoringUri value. */ String scoringUri(); /** * Gets the swaggerUri property: Endpoint Swagger URI. - * + * * @return the swaggerUri value. */ String swaggerUri(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner object. - * + * * @return the inner object. */ EndpointPropertiesBaseInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java index 01be8b4cabf38..1db9cd56aadc4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** State of endpoint provisioning. */ +/** + * State of endpoint provisioning. + */ public final class EndpointProvisioningState extends ExpandableStringEnum { - /** Static value Creating for EndpointProvisioningState. */ + /** + * Static value Creating for EndpointProvisioningState. + */ public static final EndpointProvisioningState CREATING = fromString("Creating"); - /** Static value Deleting for EndpointProvisioningState. */ + /** + * Static value Deleting for EndpointProvisioningState. + */ public static final EndpointProvisioningState DELETING = fromString("Deleting"); - /** Static value Succeeded for EndpointProvisioningState. */ + /** + * Static value Succeeded for EndpointProvisioningState. + */ public static final EndpointProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for EndpointProvisioningState. */ + /** + * Static value Failed for EndpointProvisioningState. + */ public static final EndpointProvisioningState FAILED = fromString("Failed"); - /** Static value Updating for EndpointProvisioningState. */ + /** + * Static value Updating for EndpointProvisioningState. + */ public static final EndpointProvisioningState UPDATING = fromString("Updating"); - /** Static value Canceled for EndpointProvisioningState. */ + /** + * Static value Canceled for EndpointProvisioningState. + */ public static final EndpointProvisioningState CANCELED = fromString("Canceled"); /** * Creates a new instance of EndpointProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public EndpointProvisioningState() { /** * Creates or finds a EndpointProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding EndpointProvisioningState. */ @@ -50,7 +64,7 @@ public static EndpointProvisioningState fromString(String name) { /** * Gets known EndpointProvisioningState values. - * + * * @return known EndpointProvisioningState values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java new file mode 100644 index 0000000000000..6a704837e503e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java @@ -0,0 +1,161 @@ +// Copyright (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 EndpointResourceProperties model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "endpointType", + defaultImpl = EndpointResourceProperties.class) +@JsonTypeName("EndpointResourceProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Azure.ContentSafety", value = ContentSafetyEndpointResourceProperties.class), + @JsonSubTypes.Type(name = "managedOnlineEndpoint", value = ManagedOnlineEndpointResourceProperties.class), + @JsonSubTypes.Type(name = "Azure.OpenAI", value = OpenAIEndpointResourceProperties.class), + @JsonSubTypes.Type(name = "Azure.Speech", value = SpeechEndpointResourceProperties.class) }) +@Fluent +public class EndpointResourceProperties { + /* + * Byo resource id for creating the built-in model service endpoints. + */ + @JsonProperty(value = "associatedResourceId") + private String associatedResourceId; + + /* + * Uri of the endpoint. + */ + @JsonProperty(value = "endpointUri") + private String endpointUri; + + /* + * The failure reason if the creation failed. + */ + @JsonProperty(value = "failureReason") + private String failureReason; + + /* + * Name of the endpoint. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Read-only provision state status property. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DefaultResourceProvisioningState provisioningState; + + /** + * Creates an instance of EndpointResourceProperties class. + */ + public EndpointResourceProperties() { + } + + /** + * Get the associatedResourceId property: Byo resource id for creating the built-in model service endpoints. + * + * @return the associatedResourceId value. + */ + public String associatedResourceId() { + return this.associatedResourceId; + } + + /** + * Set the associatedResourceId property: Byo resource id for creating the built-in model service endpoints. + * + * @param associatedResourceId the associatedResourceId value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + this.associatedResourceId = associatedResourceId; + return this; + } + + /** + * Get the endpointUri property: Uri of the endpoint. + * + * @return the endpointUri value. + */ + public String endpointUri() { + return this.endpointUri; + } + + /** + * Set the endpointUri property: Uri of the endpoint. + * + * @param endpointUri the endpointUri value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withEndpointUri(String endpointUri) { + this.endpointUri = endpointUri; + return this; + } + + /** + * Get the failureReason property: The failure reason if the creation failed. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Set the failureReason property: The failure reason if the creation failed. + * + * @param failureReason the failureReason value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withFailureReason(String failureReason) { + this.failureReason = failureReason; + 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 EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the provisioningState property: Read-only provision state status property. + * + * @return the provisioningState value. + */ + public DefaultResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * 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/EndpointResourcePropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java new file mode 100644 index 0000000000000..5608fd1d30c9e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java @@ -0,0 +1,234 @@ +// Copyright (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.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; + +/** + * An immutable client-side representation of EndpointResourcePropertiesBasicResource. + */ +public interface EndpointResourcePropertiesBasicResource { + /** + * 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: The properties property. + * + * @return the properties value. + */ + EndpointResourceProperties 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.EndpointResourcePropertiesBasicResourceInner object. + * + * @return the inner object. + */ + EndpointResourcePropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the EndpointResourcePropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The EndpointResourcePropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the EndpointResourcePropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the EndpointResourcePropertiesBasicResource 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 Azure Machine Learning Workspace Name. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the EndpointResourcePropertiesBasicResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties property.. + * + * @param properties The properties property. + * @return the next definition stage. + */ + WithCreate withProperties(EndpointResourceProperties properties); + } + + /** + * The stage of the EndpointResourcePropertiesBasicResource 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. + */ + EndpointResourcePropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + EndpointResourcePropertiesBasicResource create(Context context); + } + } + + /** + * Begins update for the EndpointResourcePropertiesBasicResource resource. + * + * @return the stage of resource update. + */ + EndpointResourcePropertiesBasicResource.Update update(); + + /** + * The template for EndpointResourcePropertiesBasicResource update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + EndpointResourcePropertiesBasicResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + EndpointResourcePropertiesBasicResource apply(Context context); + } + + /** + * The EndpointResourcePropertiesBasicResource update stages. + */ + interface UpdateStages { + /** + * The stage of the EndpointResourcePropertiesBasicResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties property.. + * + * @param properties The properties property. + * @return the next definition stage. + */ + Update withProperties(EndpointResourceProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + EndpointResourcePropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + EndpointResourcePropertiesBasicResource refresh(Context context); + + /** + * List keys for the endpoint resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response listKeysWithResponse(Context context); + + /** + * List keys for the endpoint resource. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + EndpointKeys listKeys(); + + /** + * Regenerate account keys. + * + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 regenerateKeysWithResponse(RegenerateServiceAccountKeyContent body, Context context); + + /** + * Regenerate account keys. + * + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + AccountApiKeys regenerateKeys(RegenerateServiceAccountKeyContent body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..34d3e3a46404b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.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.EndpointResourcePropertiesBasicResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The EndpointResourcePropertiesBasicResourceArmPaginatedResult model. + */ +@Fluent +public final class EndpointResourcePropertiesBasicResourceArmPaginatedResult { + /* + * The nextLink property. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * The value property. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of EndpointResourcePropertiesBasicResourceArmPaginatedResult class. + */ + public EndpointResourcePropertiesBasicResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The nextLink property. + * + * @param nextLink the nextLink value to set. + * @return the EndpointResourcePropertiesBasicResourceArmPaginatedResult object itself. + */ + public EndpointResourcePropertiesBasicResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the EndpointResourcePropertiesBasicResourceArmPaginatedResult object itself. + */ + public EndpointResourcePropertiesBasicResourceArmPaginatedResult + 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/EndpointScheduleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java index 1fc068802e760..29824247fe118 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The EndpointScheduleAction model. */ +/** + * The EndpointScheduleAction model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") @JsonTypeName("InvokeBatchEndpoint") @Fluent @@ -22,14 +24,16 @@ public final class EndpointScheduleAction extends ScheduleActionBase { @JsonProperty(value = "endpointInvocationDefinition", required = true) private Object endpointInvocationDefinition; - /** Creates an instance of EndpointScheduleAction class. */ + /** + * Creates an instance of EndpointScheduleAction class. + */ public EndpointScheduleAction() { } /** - * Get the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. <see - * href="TBD" />. - * + * Get the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. + * <see href="TBD" />. + * * @return the endpointInvocationDefinition value. */ public Object endpointInvocationDefinition() { @@ -37,9 +41,9 @@ public Object endpointInvocationDefinition() { } /** - * Set the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. <see - * href="TBD" />. - * + * Set the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. + * <see href="TBD" />. + * * @param endpointInvocationDefinition the endpointInvocationDefinition value to set. * @return the EndpointScheduleAction object itself. */ @@ -50,17 +54,15 @@ public EndpointScheduleAction withEndpointInvocationDefinition(Object endpointIn /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (endpointInvocationDefinition() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endpointInvocationDefinition in model EndpointScheduleAction")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property endpointInvocationDefinition in model EndpointScheduleAction")); } } 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..6312c83accedd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.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.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"); + + /** + * Static value Timeout for EndpointServiceConnectionStatus. + */ + public static final EndpointServiceConnectionStatus TIMEOUT = fromString("Timeout"); + + /** + * 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/EndpointType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.java new file mode 100644 index 0000000000000..d9c97626c410e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of the endpoint. + */ +public final class EndpointType extends ExpandableStringEnum { + /** + * Static value Azure.OpenAI for EndpointType. + */ + public static final EndpointType AZURE_OPEN_AI = fromString("Azure.OpenAI"); + + /** + * Static value Azure.Speech for EndpointType. + */ + public static final EndpointType AZURE_SPEECH = fromString("Azure.Speech"); + + /** + * Static value Azure.ContentSafety for EndpointType. + */ + public static final EndpointType AZURE_CONTENT_SAFETY = fromString("Azure.ContentSafety"); + + /** + * Static value Azure.Llama for EndpointType. + */ + public static final EndpointType AZURE_LLAMA = fromString("Azure.Llama"); + + /** + * Static value managedOnlineEndpoint for EndpointType. + */ + public static final EndpointType MANAGED_ONLINE_ENDPOINT = fromString("managedOnlineEndpoint"); + + /** + * Creates a new instance of EndpointType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EndpointType() { + } + + /** + * Creates or finds a EndpointType from its string representation. + * + * @param name a name to look for. + * @return the corresponding EndpointType. + */ + @JsonCreator + public static EndpointType fromString(String name) { + return fromString(name, EndpointType.class); + } + + /** + * Gets known EndpointType values. + * + * @return known EndpointType values. + */ + public static Collection values() { + return values(EndpointType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.java new file mode 100644 index 0000000000000..b6ee72b70fa92 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Endpoints. + */ +public interface Endpoints { + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @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 the paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + EndpointType endpointType, String skip, Context context); + + /** + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context); + + /** + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource. + */ + EndpointResourcePropertiesBasicResource get(String resourceGroupName, String workspaceName, String endpointName); + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + EndpointKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + PagedIterable getModels(String resourceGroupName, String workspaceName, String endpointName); + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + PagedIterable getModels(String resourceGroupName, String workspaceName, String endpointName, + Context context); + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body, Context context); + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + AccountApiKeys regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateServiceAccountKeyContent body); + + /** + * Gets endpoint resource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource along with {@link Response}. + */ + EndpointResourcePropertiesBasicResource getById(String id); + + /** + * Gets endpoint resource. + * + * @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 endpoint resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EndpointResourcePropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new EndpointResourcePropertiesBasicResource definition. + */ + EndpointResourcePropertiesBasicResource.DefinitionStages.Blank define(String name); +} 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..1ccabda295cf5 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 @@ -8,90 +8,103 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -/** An immutable client-side representation of EnvironmentContainer. */ +/** + * An immutable client-side representation of EnvironmentContainer. + */ public interface EnvironmentContainer { /** * 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. */ EnvironmentContainerProperties 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.EnvironmentContainerInner object. - * + * * @return the inner object. */ EnvironmentContainerInner innerModel(); - /** The entirety of the EnvironmentContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the EnvironmentContainer definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The EnvironmentContainer definition stages. */ + + /** + * The EnvironmentContainer definition stages. + */ interface DefinitionStages { - /** The first stage of the EnvironmentContainer definition. */ + /** + * The first stage of the EnvironmentContainer definition. + */ interface Blank extends WithParentResource { } - /** The stage of the EnvironmentContainer definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the EnvironmentContainer 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(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. @@ -99,67 +112,76 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ EnvironmentContainer create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ EnvironmentContainer create(Context context); } } + /** * Begins update for the EnvironmentContainer resource. - * + * * @return the stage of resource update. */ EnvironmentContainer.Update update(); - /** The template for EnvironmentContainer update. */ + /** + * The template for EnvironmentContainer update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ EnvironmentContainer apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ EnvironmentContainer apply(Context context); } - /** The EnvironmentContainer update stages. */ + + /** + * The EnvironmentContainer update stages. + */ interface UpdateStages { - /** The stage of the EnvironmentContainer update allowing to specify properties. */ + /** + * The stage of the EnvironmentContainer 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(EnvironmentContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ EnvironmentContainer refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/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..2cdeed6a34314 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,37 +5,65 @@ 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. */ +/** + * Container for environment specification versions. + */ @Fluent public final class EnvironmentContainerProperties extends AssetContainer { - /** Creates an instance of EnvironmentContainerProperties class. */ + /* + * 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() { } - /** {@inheritDoc} */ + /** + * 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) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public EnvironmentContainerProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public EnvironmentContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public EnvironmentContainerProperties withTags(Map tags) { super.withTags(tags); @@ -44,7 +72,7 @@ public EnvironmentContainerProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java index 80da987c4f2f1..64cfd50d1ab1f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of EnvironmentContainer entities. */ +/** + * A paginated list of EnvironmentContainer entities. + */ @Fluent public final class EnvironmentContainerResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class EnvironmentContainerResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of EnvironmentContainerResourceArmPaginatedResult class. */ + /** + * Creates an instance of EnvironmentContainerResourceArmPaginatedResult class. + */ public EnvironmentContainerResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no * additional pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no * additional pages. - * + * * @param nextLink the nextLink value to set. * @return the EnvironmentContainerResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public EnvironmentContainerResourceArmPaginatedResult withNextLink(String nextLi /** * Get the value property: An array of objects of type EnvironmentContainer. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type EnvironmentContainer. - * + * * @param value the value value to set. * @return the EnvironmentContainerResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public EnvironmentContainerResourceArmPaginatedResult withValue(List list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, 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. @@ -54,7 +57,7 @@ PagedIterable list( /** * 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. @@ -66,7 +69,7 @@ PagedIterable list( /** * 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. @@ -76,12 +79,12 @@ PagedIterable list( * @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 workspaceName, String name, Context context); + Response getWithResponse(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. @@ -93,55 +96,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. - * - * @param id the resource ID. + * 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 container along with {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, EnvironmentContainerInner body, 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. + * 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 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/EnvironmentType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java index f500324ca53a2..8be247c55dfe8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Environment type is either user created or curated by Azure ML service. */ +/** + * Environment type is either user created or curated by Azure ML service. + */ public final class EnvironmentType extends ExpandableStringEnum { - /** Static value Curated for EnvironmentType. */ + /** + * Static value Curated for EnvironmentType. + */ public static final EnvironmentType CURATED = fromString("Curated"); - /** Static value UserCreated for EnvironmentType. */ + /** + * Static value UserCreated for EnvironmentType. + */ public static final EnvironmentType USER_CREATED = fromString("UserCreated"); /** * Creates a new instance of EnvironmentType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EnvironmentType() { /** * Creates or finds a EnvironmentType from its string representation. - * + * * @param name a name to look for. * @return the corresponding EnvironmentType. */ @@ -38,7 +44,7 @@ public static EnvironmentType fromString(String name) { /** * Gets known EnvironmentType values. - * + * * @return known EnvironmentType values. */ public static Collection values() { 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..ff32a87b93901 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * The EnvironmentVariable model. + */ +@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; + + /* + * Dictionary of + */ + @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: Dictionary of <any>. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Dictionary of <any>. + * + * @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..2c4607ca50da2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.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 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..d369104be6e6a 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 @@ -8,91 +8,105 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -/** An immutable client-side representation of EnvironmentVersion. */ +/** + * An immutable client-side representation of EnvironmentVersion. + */ public interface EnvironmentVersion { /** * 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. */ EnvironmentVersionProperties 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.EnvironmentVersionInner object. - * + * * @return the inner object. */ EnvironmentVersionInner innerModel(); - /** The entirety of the EnvironmentVersion definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the EnvironmentVersion definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The EnvironmentVersion definition stages. */ + + /** + * The EnvironmentVersion definition stages. + */ interface DefinitionStages { - /** The first stage of the EnvironmentVersion definition. */ + /** + * The first stage of the EnvironmentVersion definition. + */ interface Blank extends WithParentResource { } - /** The stage of the EnvironmentVersion definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the EnvironmentVersion 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(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. @@ -100,67 +114,76 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ EnvironmentVersion create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ EnvironmentVersion create(Context context); } } + /** * Begins update for the EnvironmentVersion resource. - * + * * @return the stage of resource update. */ EnvironmentVersion.Update update(); - /** The template for EnvironmentVersion update. */ + /** + * The template for EnvironmentVersion update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ EnvironmentVersion apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ EnvironmentVersion apply(Context context); } - /** The EnvironmentVersion update stages. */ + + /** + * The EnvironmentVersion update stages. + */ interface UpdateStages { - /** The stage of the EnvironmentVersion update allowing to specify properties. */ + /** + * The stage of the EnvironmentVersion 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(EnvironmentVersionProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ EnvironmentVersion refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/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..66bac8773da81 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Environment version details. */ +/** + * Environment version details. + */ @Fluent public final class EnvironmentVersionProperties extends AssetBase { /* @@ -43,8 +45,8 @@ public final class EnvironmentVersionProperties extends AssetBase { /* * Name of the image that will be used for the environment. * */ @JsonProperty(value = "image") @@ -56,19 +58,39 @@ public final class EnvironmentVersionProperties extends AssetBase { @JsonProperty(value = "inferenceConfig") private InferenceContainerProperties inferenceConfig; + /* + * Intellectual Property details. Used if environment is an Intellectual Property. + */ + @JsonProperty(value = "intellectualProperty") + private IntellectualProperty intellectualProperty; + /* * The OS type of the environment. */ @JsonProperty(value = "osType") private OperatingSystemType osType; - /** Creates an instance of EnvironmentVersionProperties class. */ + /* + * 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() { } /** * Get the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. - * + * * @return the autoRebuild value. */ public AutoRebuildSetting autoRebuild() { @@ -77,7 +99,7 @@ public AutoRebuildSetting autoRebuild() { /** * Set the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. - * + * * @param autoRebuild the autoRebuild value to set. * @return the EnvironmentVersionProperties object itself. */ @@ -88,7 +110,7 @@ public EnvironmentVersionProperties withAutoRebuild(AutoRebuildSetting autoRebui /** * Get the build property: Configuration settings for Docker build context. - * + * * @return the build value. */ public BuildContext build() { @@ -97,7 +119,7 @@ public BuildContext build() { /** * Set the build property: Configuration settings for Docker build context. - * + * * @param build the build value to set. * @return the EnvironmentVersionProperties object itself. */ @@ -108,10 +130,11 @@ public EnvironmentVersionProperties withBuild(BuildContext build) { /** * Get the condaFile property: Standard configuration file used by Conda that lets you install any kind of package, - * including Python, R, and C/C++ packages. <see + * including Python, R, and C/C++ packages. + * <see * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" * />. - * + * * @return the condaFile value. */ public String condaFile() { @@ -120,10 +143,11 @@ public String condaFile() { /** * Set the condaFile property: Standard configuration file used by Conda that lets you install any kind of package, - * including Python, R, and C/C++ packages. <see + * including Python, R, and C/C++ packages. + * <see * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" * />. - * + * * @param condaFile the condaFile value to set. * @return the EnvironmentVersionProperties object itself. */ @@ -135,7 +159,7 @@ public EnvironmentVersionProperties withCondaFile(String condaFile) { /** * Get the environmentType property: Environment type is either user managed or curated by the Azure ML service * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" />. - * + * * @return the environmentType value. */ public EnvironmentType environmentType() { @@ -143,11 +167,11 @@ 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" + * 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" * />. - * + * * @return the image value. */ public String image() { @@ -155,11 +179,11 @@ 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" + * 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" * />. - * + * * @param image the image value to set. * @return the EnvironmentVersionProperties object itself. */ @@ -170,7 +194,7 @@ public EnvironmentVersionProperties withImage(String image) { /** * Get the inferenceConfig property: Defines configuration specific to inference. - * + * * @return the inferenceConfig value. */ public InferenceContainerProperties inferenceConfig() { @@ -179,7 +203,7 @@ public InferenceContainerProperties inferenceConfig() { /** * Set the inferenceConfig property: Defines configuration specific to inference. - * + * * @param inferenceConfig the inferenceConfig value to set. * @return the EnvironmentVersionProperties object itself. */ @@ -188,9 +212,31 @@ public EnvironmentVersionProperties withInferenceConfig(InferenceContainerProper return this; } + /** + * Get the intellectualProperty property: Intellectual Property details. Used if environment is an Intellectual + * Property. + * + * @return the intellectualProperty value. + */ + public IntellectualProperty intellectualProperty() { + return this.intellectualProperty; + } + + /** + * Set the intellectualProperty property: Intellectual Property details. Used if environment is an Intellectual + * Property. + * + * @param intellectualProperty the intellectualProperty value to set. + * @return the EnvironmentVersionProperties object itself. + */ + public EnvironmentVersionProperties withIntellectualProperty(IntellectualProperty intellectualProperty) { + this.intellectualProperty = intellectualProperty; + return this; + } + /** * Get the osType property: The OS type of the environment. - * + * * @return the osType value. */ public OperatingSystemType osType() { @@ -199,7 +245,7 @@ public OperatingSystemType osType() { /** * Set the osType property: The OS type of the environment. - * + * * @param osType the osType value to set. * @return the EnvironmentVersionProperties object itself. */ @@ -208,35 +254,83 @@ public EnvironmentVersionProperties withOsType(OperatingSystemType osType) { return this; } - /** {@inheritDoc} */ + /** + * 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 withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + return this; + } + + /** + * {@inheritDoc} + */ @Override public EnvironmentVersionProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public EnvironmentVersionProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public EnvironmentVersionProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public EnvironmentVersionProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public EnvironmentVersionProperties withTags(Map tags) { super.withTags(tags); @@ -245,7 +339,7 @@ public EnvironmentVersionProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -257,5 +351,8 @@ public void validate() { if (inferenceConfig() != null) { inferenceConfig().validate(); } + if (intellectualProperty() != null) { + intellectualProperty().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java index a0c6920ca097b..8750fc80d8f2b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of EnvironmentVersion entities. */ +/** + * A paginated list of EnvironmentVersion entities. + */ @Fluent public final class EnvironmentVersionResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class EnvironmentVersionResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of EnvironmentVersionResourceArmPaginatedResult class. */ + /** + * Creates an instance of EnvironmentVersionResourceArmPaginatedResult class. + */ public EnvironmentVersionResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no * additional pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no * additional pages. - * + * * @param nextLink the nextLink value to set. * @return the EnvironmentVersionResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public EnvironmentVersionResourceArmPaginatedResult withNextLink(String nextLink /** * Get the value property: An array of objects of type EnvironmentVersion. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type EnvironmentVersion. - * + * * @param value the value value to set. * @return the EnvironmentVersionResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public EnvironmentVersionResourceArmPaginatedResult withValue(List list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, ListViewType listViewType, 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. @@ -62,12 +59,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -80,7 +77,7 @@ Response deleteWithResponse( /** * 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. @@ -91,12 +88,12 @@ Response deleteWithResponse( * @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); + 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. @@ -109,55 +106,65 @@ Response getWithResponse( EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. - * - * @param id the resource ID. + * Creates or updates an EnvironmentVersion. + * + * @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. - * - * @param id the resource ID. - * @param context The context to associate with this operation. + * Creates or updates an EnvironmentVersion. + * + * @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. - * - * @param id the resource ID. + * 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. */ - void deleteById(String id); + void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body); /** - * Delete version. - * - * @param id the resource ID. + * 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 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/EstimatedVMPrice.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java index a4fe18a7395df..ae87d88c90d7a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java @@ -8,12 +8,14 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The estimated price info for using a VM of a particular OS type, tier, etc. */ +/** + * The estimated price info for using a VM of a particular OS type, tier, etc. + */ @Fluent public final class EstimatedVMPrice { /* * Retail price - * + * * The price charged for using the VM. */ @JsonProperty(value = "retailPrice", required = true) @@ -21,7 +23,7 @@ public final class EstimatedVMPrice { /* * OS type - * + * * Operating system type used by the VM. */ @JsonProperty(value = "osType", required = true) @@ -29,21 +31,23 @@ public final class EstimatedVMPrice { /* * VM tier - * + * * The type of the VM. */ @JsonProperty(value = "vmTier", required = true) private VMTier vmTier; - /** Creates an instance of EstimatedVMPrice class. */ + /** + * Creates an instance of EstimatedVMPrice class. + */ public EstimatedVMPrice() { } /** * Get the retailPrice property: Retail price - * - *

The price charged for using the VM. - * + * + * The price charged for using the VM. + * * @return the retailPrice value. */ public double retailPrice() { @@ -52,9 +56,9 @@ public double retailPrice() { /** * Set the retailPrice property: Retail price - * - *

The price charged for using the VM. - * + * + * The price charged for using the VM. + * * @param retailPrice the retailPrice value to set. * @return the EstimatedVMPrice object itself. */ @@ -65,9 +69,9 @@ public EstimatedVMPrice withRetailPrice(double retailPrice) { /** * Get the osType property: OS type - * - *

Operating system type used by the VM. - * + * + * Operating system type used by the VM. + * * @return the osType value. */ public VMPriceOSType osType() { @@ -76,9 +80,9 @@ public VMPriceOSType osType() { /** * Set the osType property: OS type - * - *

Operating system type used by the VM. - * + * + * Operating system type used by the VM. + * * @param osType the osType value to set. * @return the EstimatedVMPrice object itself. */ @@ -89,9 +93,9 @@ public EstimatedVMPrice withOsType(VMPriceOSType osType) { /** * Get the vmTier property: VM tier - * - *

The type of the VM. - * + * + * The type of the VM. + * * @return the vmTier value. */ public VMTier vmTier() { @@ -100,9 +104,9 @@ public VMTier vmTier() { /** * Set the vmTier property: VM tier - * - *

The type of the VM. - * + * + * The type of the VM. + * * @param vmTier the vmTier value to set. * @return the EstimatedVMPrice object itself. */ @@ -113,19 +117,17 @@ public EstimatedVMPrice withVmTier(VMTier vmTier) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (osType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property osType in model EstimatedVMPrice")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property osType in model EstimatedVMPrice")); } if (vmTier() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property vmTier in model EstimatedVMPrice")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property vmTier in model EstimatedVMPrice")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java index 577bbbb091f91..093959f7fed42 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java @@ -9,12 +9,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The estimated price info for using a VM. */ +/** + * The estimated price info for using a VM. + */ @Fluent public final class EstimatedVMPrices { /* * Billing currency - * + * * Three lettered code specifying the currency of the VM price. Example: USD */ @JsonProperty(value = "billingCurrency", required = true) @@ -22,7 +24,7 @@ public final class EstimatedVMPrices { /* * Unit of time measure - * + * * The unit of time measurement for the specified VM price. Example: OneHour */ @JsonProperty(value = "unitOfMeasure", required = true) @@ -30,21 +32,23 @@ public final class EstimatedVMPrices { /* * List of estimated VM prices. - * + * * The list of estimated prices for using a VM of a particular OS type, tier, etc. */ @JsonProperty(value = "values", required = true) private List values; - /** Creates an instance of EstimatedVMPrices class. */ + /** + * Creates an instance of EstimatedVMPrices class. + */ public EstimatedVMPrices() { } /** * Get the billingCurrency property: Billing currency - * - *

Three lettered code specifying the currency of the VM price. Example: USD. - * + * + * Three lettered code specifying the currency of the VM price. Example: USD. + * * @return the billingCurrency value. */ public BillingCurrency billingCurrency() { @@ -53,9 +57,9 @@ public BillingCurrency billingCurrency() { /** * Set the billingCurrency property: Billing currency - * - *

Three lettered code specifying the currency of the VM price. Example: USD. - * + * + * Three lettered code specifying the currency of the VM price. Example: USD. + * * @param billingCurrency the billingCurrency value to set. * @return the EstimatedVMPrices object itself. */ @@ -66,9 +70,9 @@ public EstimatedVMPrices withBillingCurrency(BillingCurrency billingCurrency) { /** * Get the unitOfMeasure property: Unit of time measure - * - *

The unit of time measurement for the specified VM price. Example: OneHour. - * + * + * The unit of time measurement for the specified VM price. Example: OneHour. + * * @return the unitOfMeasure value. */ public UnitOfMeasure unitOfMeasure() { @@ -77,9 +81,9 @@ public UnitOfMeasure unitOfMeasure() { /** * Set the unitOfMeasure property: Unit of time measure - * - *

The unit of time measurement for the specified VM price. Example: OneHour. - * + * + * The unit of time measurement for the specified VM price. Example: OneHour. + * * @param unitOfMeasure the unitOfMeasure value to set. * @return the EstimatedVMPrices object itself. */ @@ -90,9 +94,9 @@ public EstimatedVMPrices withUnitOfMeasure(UnitOfMeasure unitOfMeasure) { /** * Get the values property: List of estimated VM prices. - * - *

The list of estimated prices for using a VM of a particular OS type, tier, etc. - * + * + * The list of estimated prices for using a VM of a particular OS type, tier, etc. + * * @return the values value. */ public List values() { @@ -101,9 +105,9 @@ public List values() { /** * Set the values property: List of estimated VM prices. - * - *

The list of estimated prices for using a VM of a particular OS type, tier, etc. - * + * + * The list of estimated prices for using a VM of a particular OS type, tier, etc. + * * @param values the values value to set. * @return the EstimatedVMPrices object itself. */ @@ -114,25 +118,21 @@ public EstimatedVMPrices withValues(List values) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (billingCurrency() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property billingCurrency in model EstimatedVMPrices")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property billingCurrency in model EstimatedVMPrices")); } if (unitOfMeasure() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property unitOfMeasure in model EstimatedVMPrices")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property unitOfMeasure in model EstimatedVMPrices")); } if (values() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property values in model EstimatedVMPrices")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property values in model EstimatedVMPrices")); } else { values().forEach(e -> e.validate()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportFormatType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportFormatType.java new file mode 100644 index 0000000000000..5943d949f806b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportFormatType.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The format of exported labels. + */ +public final class ExportFormatType extends ExpandableStringEnum { + /** + * Static value Dataset for ExportFormatType. + */ + public static final ExportFormatType DATASET = fromString("Dataset"); + + /** + * Static value Coco for ExportFormatType. + */ + public static final ExportFormatType COCO = fromString("Coco"); + + /** + * Static value CSV for ExportFormatType. + */ + public static final ExportFormatType CSV = fromString("CSV"); + + /** + * Creates a new instance of ExportFormatType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExportFormatType() { + } + + /** + * Creates or finds a ExportFormatType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExportFormatType. + */ + @JsonCreator + public static ExportFormatType fromString(String name) { + return fromString(name, ExportFormatType.class); + } + + /** + * Gets known ExportFormatType values. + * + * @return known ExportFormatType values. + */ + public static Collection values() { + return values(ExportFormatType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportSummary.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportSummary.java new file mode 100644 index 0000000000000..09b17c3dd22ce --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExportSummary.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.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of ExportSummary. + */ +public interface ExportSummary { + /** + * Gets the endDateTime property: The time when the export was completed. + * + * @return the endDateTime value. + */ + OffsetDateTime endDateTime(); + + /** + * Gets the exportedRowCount property: The total number of labeled datapoints exported. + * + * @return the exportedRowCount value. + */ + Long exportedRowCount(); + + /** + * Gets the labelingJobId property: Name and identifier of the job containing exported labels. + * + * @return the labelingJobId value. + */ + String labelingJobId(); + + /** + * Gets the startDateTime property: The time when the export was requested. + * + * @return the startDateTime value. + */ + OffsetDateTime startDateTime(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner object. + * + * @return the inner object. + */ + ExportSummaryInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java index 6483d490175f8..4491b20a4f8da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; import java.util.List; -/** An immutable client-side representation of ExternalFqdnResponse. */ +/** + * An immutable client-side representation of ExternalFqdnResponse. + */ public interface ExternalFqdnResponse { /** * Gets the value property: The value property. - * + * * @return the value value. */ - List value(); + List value(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner object. - * + * * @return the inner object. */ ExternalFqdnResponseInner innerModel(); 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..74378e4c955da --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.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.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..68ca40bea40b2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java @@ -0,0 +1,217 @@ +// Copyright (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..a41e1945d0ba3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.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.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..0b2825a03da6f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java @@ -0,0 +1,92 @@ +// Copyright (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..94d9fade3a1c6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.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.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..0baf561551180 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.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 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..8bf632af05d66 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/FeatureLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java index a20e4611f93e3..da37ecba81d17 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Flag for generating lags for the numeric features. */ +/** + * Flag for generating lags for the numeric features. + */ public final class FeatureLags extends ExpandableStringEnum { - /** Static value None for FeatureLags. */ + /** + * Static value None for FeatureLags. + */ public static final FeatureLags NONE = fromString("None"); - /** Static value Auto for FeatureLags. */ + /** + * Static value Auto for FeatureLags. + */ public static final FeatureLags AUTO = fromString("Auto"); /** * Creates a new instance of FeatureLags value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public FeatureLags() { /** * Creates or finds a FeatureLags from its string representation. - * + * * @param name a name to look for. * @return the corresponding FeatureLags. */ @@ -38,7 +44,7 @@ public static FeatureLags fromString(String name) { /** * Gets known FeatureLags values. - * + * * @return known FeatureLags values. */ public static Collection values() { 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..eee859d2ba432 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.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.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..73650b27cae26 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.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.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/FeatureStoreSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java new file mode 100644 index 0000000000000..0f3bc15b6bc6b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.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; + +/** + * The FeatureStoreSettings model. + */ +@Fluent +public final class FeatureStoreSettings { + /* + * The computeRuntime property. + */ + @JsonProperty(value = "computeRuntime") + private ComputeRuntimeDto computeRuntime; + + /* + * The offlineStoreConnectionName property. + */ + @JsonProperty(value = "offlineStoreConnectionName") + private String offlineStoreConnectionName; + + /* + * The onlineStoreConnectionName property. + */ + @JsonProperty(value = "onlineStoreConnectionName") + private String onlineStoreConnectionName; + + /** + * Creates an instance of FeatureStoreSettings class. + */ + public FeatureStoreSettings() { + } + + /** + * Get the computeRuntime property: The computeRuntime property. + * + * @return the computeRuntime value. + */ + public ComputeRuntimeDto computeRuntime() { + return this.computeRuntime; + } + + /** + * Set the computeRuntime property: The computeRuntime property. + * + * @param computeRuntime the computeRuntime value to set. + * @return the FeatureStoreSettings object itself. + */ + public FeatureStoreSettings withComputeRuntime(ComputeRuntimeDto computeRuntime) { + this.computeRuntime = computeRuntime; + return this; + } + + /** + * Get the offlineStoreConnectionName property: The offlineStoreConnectionName property. + * + * @return the offlineStoreConnectionName value. + */ + public String offlineStoreConnectionName() { + return this.offlineStoreConnectionName; + } + + /** + * Set the offlineStoreConnectionName property: The offlineStoreConnectionName property. + * + * @param offlineStoreConnectionName the offlineStoreConnectionName value to set. + * @return the FeatureStoreSettings object itself. + */ + public FeatureStoreSettings withOfflineStoreConnectionName(String offlineStoreConnectionName) { + this.offlineStoreConnectionName = offlineStoreConnectionName; + return this; + } + + /** + * Get the onlineStoreConnectionName property: The onlineStoreConnectionName property. + * + * @return the onlineStoreConnectionName value. + */ + public String onlineStoreConnectionName() { + return this.onlineStoreConnectionName; + } + + /** + * Set the onlineStoreConnectionName property: The onlineStoreConnectionName property. + * + * @param onlineStoreConnectionName the onlineStoreConnectionName value to set. + * @return the FeatureStoreSettings object itself. + */ + public FeatureStoreSettings withOnlineStoreConnectionName(String onlineStoreConnectionName) { + this.onlineStoreConnectionName = onlineStoreConnectionName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (computeRuntime() != null) { + computeRuntime().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..ced579d0d7124 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.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.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..ab9ca810ca574 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.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.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..1269d823bacf9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.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.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..0ca4d3b601f3f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java @@ -0,0 +1,189 @@ +// Copyright (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..2c0b81c27af6e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.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 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..323833b3cd92e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..7b22836acf160 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java @@ -0,0 +1,154 @@ +// Copyright (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..91e7ae8047fd5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.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; + +/** + * 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..5ee17b1b2555b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.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.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..ac9e37d6d52f6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java @@ -0,0 +1,275 @@ +// Copyright (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..87510c5b97688 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..802701aedee15 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + 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..b5ac32bbed42a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..6cd4b95f7a0c3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.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.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..4dfbe2c9ee578 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java @@ -0,0 +1,189 @@ +// Copyright (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..a8932007664e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.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 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..ea1aacf58b1bf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java @@ -0,0 +1,88 @@ +// Copyright (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..a25dc10b4434c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java @@ -0,0 +1,156 @@ +// Copyright (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..43e8e959e830c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.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.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..c3b529c52d056 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java @@ -0,0 +1,156 @@ +// Copyright (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 withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + 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..e082915b5eb28 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..66b3383d2c865 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.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 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/FeaturizationMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java index 8ca6e116bb449..ec2d30263c18e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Featurization mode - determines data featurization mode. */ +/** + * Featurization mode - determines data featurization mode. + */ public final class FeaturizationMode extends ExpandableStringEnum { - /** Static value Auto for FeaturizationMode. */ + /** + * Static value Auto for FeaturizationMode. + */ public static final FeaturizationMode AUTO = fromString("Auto"); - /** Static value Custom for FeaturizationMode. */ + /** + * Static value Custom for FeaturizationMode. + */ public static final FeaturizationMode CUSTOM = fromString("Custom"); - /** Static value Off for FeaturizationMode. */ + /** + * Static value Off for FeaturizationMode. + */ public static final FeaturizationMode OFF = fromString("Off"); /** * Creates a new instance of FeaturizationMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public FeaturizationMode() { /** * Creates or finds a FeaturizationMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding FeaturizationMode. */ @@ -41,7 +49,7 @@ public static FeaturizationMode fromString(String name) { /** * Gets known FeaturizationMode values. - * + * * @return known FeaturizationMode values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java index 49b68df8ae441..961c2c1849652 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Featurization Configuration. */ +/** + * Featurization Configuration. + */ @Fluent public class FeaturizationSettings { /* @@ -16,13 +18,15 @@ public class FeaturizationSettings { @JsonProperty(value = "datasetLanguage") private String datasetLanguage; - /** Creates an instance of FeaturizationSettings class. */ + /** + * Creates an instance of FeaturizationSettings class. + */ public FeaturizationSettings() { } /** * Get the datasetLanguage property: Dataset language, useful for the text data. - * + * * @return the datasetLanguage value. */ public String datasetLanguage() { @@ -31,7 +35,7 @@ public String datasetLanguage() { /** * Set the datasetLanguage property: Dataset language, useful for the text data. - * + * * @param datasetLanguage the datasetLanguage value to set. * @return the FeaturizationSettings object itself. */ @@ -42,7 +46,7 @@ public FeaturizationSettings withDatasetLanguage(String datasetLanguage) { /** * 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/FileSystemSource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FileSystemSource.java new file mode 100644 index 0000000000000..45d1b524c9d59 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FileSystemSource.java @@ -0,0 +1,69 @@ +// Copyright (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 FileSystemSource model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "sourceType") +@JsonTypeName("file_system") +@Fluent +public final class FileSystemSource extends DataImportSource { + /* + * Path on data import FileSystem source + */ + @JsonProperty(value = "path") + private String path; + + /** + * Creates an instance of FileSystemSource class. + */ + public FileSystemSource() { + } + + /** + * Get the path property: Path on data import FileSystem source. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: Path on data import FileSystem source. + * + * @param path the path value to set. + * @return the FileSystemSource object itself. + */ + public FileSystemSource withPath(String path) { + this.path = path; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FileSystemSource withConnection(String connection) { + super.withConnection(connection); + 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/FineTuningJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java new file mode 100644 index 0000000000000..c28734b32e632 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.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.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.Map; + +/** + * FineTuning Job definition. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") +@JsonTypeName("FineTuning") +@Fluent +public final class FineTuningJob extends JobBaseProperties { + /* + * [Required] + */ + @JsonProperty(value = "fineTuningDetails", required = true) + private FineTuningVertical fineTuningDetails; + + /* + * [Required] + */ + @JsonProperty(value = "outputs", required = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map outputs; + + /** + * Creates an instance of FineTuningJob class. + */ + public FineTuningJob() { + } + + /** + * Get the fineTuningDetails property: [Required]. + * + * @return the fineTuningDetails value. + */ + public FineTuningVertical fineTuningDetails() { + return this.fineTuningDetails; + } + + /** + * Set the fineTuningDetails property: [Required]. + * + * @param fineTuningDetails the fineTuningDetails value to set. + * @return the FineTuningJob object itself. + */ + public FineTuningJob withFineTuningDetails(FineTuningVertical fineTuningDetails) { + this.fineTuningDetails = fineTuningDetails; + return this; + } + + /** + * Get the outputs property: [Required]. + * + * @return the outputs value. + */ + public Map outputs() { + return this.outputs; + } + + /** + * Set the outputs property: [Required]. + * + * @param outputs the outputs value to set. + * @return the FineTuningJob object itself. + */ + public FineTuningJob withOutputs(Map outputs) { + this.outputs = outputs; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withComputeId(String computeId) { + super.withComputeId(computeId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withSecretsConfiguration(Map secretsConfiguration) { + super.withSecretsConfiguration(secretsConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withServices(Map services) { + super.withServices(services); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob 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 (fineTuningDetails() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property fineTuningDetails in model FineTuningJob")); + } else { + fineTuningDetails().validate(); + } + if (outputs() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property outputs in model FineTuningJob")); + } else { + outputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FineTuningJob.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java new file mode 100644 index 0000000000000..9c68aa96ad1f2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for FineTuningTaskType. + */ +public final class FineTuningTaskType extends ExpandableStringEnum { + /** + * Static value ChatCompletion for FineTuningTaskType. + */ + public static final FineTuningTaskType CHAT_COMPLETION = fromString("ChatCompletion"); + + /** + * Static value TextCompletion for FineTuningTaskType. + */ + public static final FineTuningTaskType TEXT_COMPLETION = fromString("TextCompletion"); + + /** + * Static value TextClassification for FineTuningTaskType. + */ + public static final FineTuningTaskType TEXT_CLASSIFICATION = fromString("TextClassification"); + + /** + * Static value QuestionAnswering for FineTuningTaskType. + */ + public static final FineTuningTaskType QUESTION_ANSWERING = fromString("QuestionAnswering"); + + /** + * Static value TextSummarization for FineTuningTaskType. + */ + public static final FineTuningTaskType TEXT_SUMMARIZATION = fromString("TextSummarization"); + + /** + * Static value TokenClassification for FineTuningTaskType. + */ + public static final FineTuningTaskType TOKEN_CLASSIFICATION = fromString("TokenClassification"); + + /** + * Static value TextTranslation for FineTuningTaskType. + */ + public static final FineTuningTaskType TEXT_TRANSLATION = fromString("TextTranslation"); + + /** + * Static value ImageClassification for FineTuningTaskType. + */ + public static final FineTuningTaskType IMAGE_CLASSIFICATION = fromString("ImageClassification"); + + /** + * Static value ImageInstanceSegmentation for FineTuningTaskType. + */ + public static final FineTuningTaskType IMAGE_INSTANCE_SEGMENTATION = fromString("ImageInstanceSegmentation"); + + /** + * Static value ImageObjectDetection for FineTuningTaskType. + */ + public static final FineTuningTaskType IMAGE_OBJECT_DETECTION = fromString("ImageObjectDetection"); + + /** + * Static value VideoMultiObjectTracking for FineTuningTaskType. + */ + public static final FineTuningTaskType VIDEO_MULTI_OBJECT_TRACKING = fromString("VideoMultiObjectTracking"); + + /** + * Creates a new instance of FineTuningTaskType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FineTuningTaskType() { + } + + /** + * Creates or finds a FineTuningTaskType from its string representation. + * + * @param name a name to look for. + * @return the corresponding FineTuningTaskType. + */ + @JsonCreator + public static FineTuningTaskType fromString(String name) { + return fromString(name, FineTuningTaskType.class); + } + + /** + * Gets known FineTuningTaskType values. + * + * @return known FineTuningTaskType values. + */ + public static Collection values() { + return values(FineTuningTaskType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java new file mode 100644 index 0000000000000..72986481a3e8a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.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.azure.core.util.logging.ClientLogger; +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 FineTuningVertical model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "modelProvider", + defaultImpl = FineTuningVertical.class) +@JsonTypeName("FineTuningVertical") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AzureOpenAI", value = AzureOpenAiFineTuning.class), + @JsonSubTypes.Type(name = "Custom", value = CustomModelFineTuning.class) }) +@Fluent +public class FineTuningVertical { + /* + * [Required] Input model for fine tuning. + */ + @JsonProperty(value = "model", required = true) + private MLFlowModelJobInput model; + + /* + * [Required] Fine tuning task type. + */ + @JsonProperty(value = "taskType", required = true) + private FineTuningTaskType taskType; + + /* + * [Required] Training data for fine tuning. + */ + @JsonProperty(value = "trainingData", required = true) + private JobInput trainingData; + + /* + * Validation data for fine tuning. + */ + @JsonProperty(value = "validationData") + private JobInput validationData; + + /** + * Creates an instance of FineTuningVertical class. + */ + public FineTuningVertical() { + } + + /** + * Get the model property: [Required] Input model for fine tuning. + * + * @return the model value. + */ + public MLFlowModelJobInput model() { + return this.model; + } + + /** + * Set the model property: [Required] Input model for fine tuning. + * + * @param model the model value to set. + * @return the FineTuningVertical object itself. + */ + public FineTuningVertical withModel(MLFlowModelJobInput model) { + this.model = model; + return this; + } + + /** + * Get the taskType property: [Required] Fine tuning task type. + * + * @return the taskType value. + */ + public FineTuningTaskType taskType() { + return this.taskType; + } + + /** + * Set the taskType property: [Required] Fine tuning task type. + * + * @param taskType the taskType value to set. + * @return the FineTuningVertical object itself. + */ + public FineTuningVertical withTaskType(FineTuningTaskType taskType) { + this.taskType = taskType; + return this; + } + + /** + * Get the trainingData property: [Required] Training data for fine tuning. + * + * @return the trainingData value. + */ + public JobInput trainingData() { + return this.trainingData; + } + + /** + * Set the trainingData property: [Required] Training data for fine tuning. + * + * @param trainingData the trainingData value to set. + * @return the FineTuningVertical object itself. + */ + public FineTuningVertical withTrainingData(JobInput trainingData) { + this.trainingData = trainingData; + return this; + } + + /** + * Get the validationData property: Validation data for fine tuning. + * + * @return the validationData value. + */ + public JobInput validationData() { + return this.validationData; + } + + /** + * Set the validationData property: Validation data for fine tuning. + * + * @param validationData the validationData value to set. + * @return the FineTuningVertical object itself. + */ + public FineTuningVertical withValidationData(JobInput validationData) { + this.validationData = validationData; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (model() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property model in model FineTuningVertical")); + } else { + model().validate(); + } + if (taskType() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property taskType in model FineTuningVertical")); + } + if (trainingData() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property trainingData in model FineTuningVertical")); + } else { + trainingData().validate(); + } + if (validationData() != null) { + validationData().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FineTuningVertical.class); +} 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..663897ddbc604 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.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.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/FlavorData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java index 24c41610e5530..6c43369ec54ed 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The FlavorData model. */ +/** + * The FlavorData model. + */ @Fluent public final class FlavorData { /* @@ -19,13 +21,15 @@ public final class FlavorData { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map data; - /** Creates an instance of FlavorData class. */ + /** + * Creates an instance of FlavorData class. + */ public FlavorData() { } /** * Get the data property: Model flavor-specific data. - * + * * @return the data value. */ public Map data() { @@ -34,7 +38,7 @@ public Map data() { /** * Set the data property: Model flavor-specific data. - * + * * @param data the data value to set. * @return the FlavorData object itself. */ @@ -45,7 +49,7 @@ public FlavorData withData(Map data) { /** * 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/ForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java index 6bb995553e44d..8c5ba759644a7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The desired maximum forecast horizon in units of time-series frequency. */ +/** + * The desired maximum forecast horizon in units of time-series frequency. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,17 +20,18 @@ @JsonTypeName("ForecastHorizon") @JsonSubTypes({ @JsonSubTypes.Type(name = "Auto", value = AutoForecastHorizon.class), - @JsonSubTypes.Type(name = "Custom", value = CustomForecastHorizon.class) -}) + @JsonSubTypes.Type(name = "Custom", value = CustomForecastHorizon.class) }) @Immutable public class ForecastHorizon { - /** Creates an instance of ForecastHorizon class. */ + /** + * Creates an instance of ForecastHorizon class. + */ public ForecastHorizon() { } /** * 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/ForecastHorizonMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java index f1a66b8d5fb61..0b35e1e582e79 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine forecast horizon selection mode. */ +/** + * Enum to determine forecast horizon selection mode. + */ public final class ForecastHorizonMode extends ExpandableStringEnum { - /** Static value Auto for ForecastHorizonMode. */ + /** + * Static value Auto for ForecastHorizonMode. + */ public static final ForecastHorizonMode AUTO = fromString("Auto"); - /** Static value Custom for ForecastHorizonMode. */ + /** + * Static value Custom for ForecastHorizonMode. + */ public static final ForecastHorizonMode CUSTOM = fromString("Custom"); /** * Creates a new instance of ForecastHorizonMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ForecastHorizonMode() { /** * Creates or finds a ForecastHorizonMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding ForecastHorizonMode. */ @@ -38,7 +44,7 @@ public static ForecastHorizonMode fromString(String name) { /** * Gets known ForecastHorizonMode values. - * + * * @return known ForecastHorizonMode values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java index 0f9bf8e05d7ed..20402b7ecf1b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Forecasting task in AutoML Table vertical. */ +/** + * Forecasting task in AutoML Table vertical. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Forecasting") @Fluent @@ -45,6 +47,12 @@ public final class Forecasting extends AutoMLVertical { @JsonProperty(value = "featurizationSettings") private TableVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private TableFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @@ -58,6 +66,18 @@ public final class Forecasting extends AutoMLVertical { @JsonProperty(value = "nCrossValidations") private NCrossValidations nCrossValidations; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private TableSweepSettings sweepSettings; + /* * Test data input. */ @@ -93,13 +113,15 @@ public final class Forecasting extends AutoMLVertical { @JsonProperty(value = "weightColumnName") private String weightColumnName; - /** Creates an instance of Forecasting class. */ + /** + * Creates an instance of Forecasting class. + */ public Forecasting() { } /** * Get the forecastingSettings property: Forecasting task specific inputs. - * + * * @return the forecastingSettings value. */ public ForecastingSettings forecastingSettings() { @@ -108,7 +130,7 @@ public ForecastingSettings forecastingSettings() { /** * Set the forecastingSettings property: Forecasting task specific inputs. - * + * * @param forecastingSettings the forecastingSettings value to set. * @return the Forecasting object itself. */ @@ -119,7 +141,7 @@ public Forecasting withForecastingSettings(ForecastingSettings forecastingSettin /** * Get the primaryMetric property: Primary metric for forecasting task. - * + * * @return the primaryMetric value. */ public ForecastingPrimaryMetrics primaryMetric() { @@ -128,7 +150,7 @@ public ForecastingPrimaryMetrics primaryMetric() { /** * Set the primaryMetric property: Primary metric for forecasting task. - * + * * @param primaryMetric the primaryMetric value to set. * @return the Forecasting object itself. */ @@ -139,7 +161,7 @@ public Forecasting withPrimaryMetric(ForecastingPrimaryMetrics primaryMetric) { /** * Get the trainingSettings property: Inputs for training phase for an AutoML Job. - * + * * @return the trainingSettings value. */ public ForecastingTrainingSettings trainingSettings() { @@ -148,7 +170,7 @@ public ForecastingTrainingSettings trainingSettings() { /** * Set the trainingSettings property: Inputs for training phase for an AutoML Job. - * + * * @param trainingSettings the trainingSettings value to set. * @return the Forecasting object itself. */ @@ -159,7 +181,7 @@ public Forecasting withTrainingSettings(ForecastingTrainingSettings trainingSett /** * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * + * * @return the cvSplitColumnNames value. */ public List cvSplitColumnNames() { @@ -168,7 +190,7 @@ public List cvSplitColumnNames() { /** * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * + * * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the Forecasting object itself. */ @@ -179,7 +201,7 @@ public Forecasting withCvSplitColumnNames(List cvSplitColumnNames) { /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @return the featurizationSettings value. */ public TableVerticalFeaturizationSettings featurizationSettings() { @@ -188,7 +210,7 @@ public TableVerticalFeaturizationSettings featurizationSettings() { /** * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @param featurizationSettings the featurizationSettings value to set. * @return the Forecasting object itself. */ @@ -197,9 +219,29 @@ public Forecasting withFeaturizationSettings(TableVerticalFeaturizationSettings return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public TableFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the Forecasting object itself. + */ + public Forecasting withFixedParameters(TableFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. - * + * * @return the limitSettings value. */ public TableVerticalLimitSettings limitSettings() { @@ -208,7 +250,7 @@ public TableVerticalLimitSettings limitSettings() { /** * Set the limitSettings property: Execution constraints for AutoMLJob. - * + * * @param limitSettings the limitSettings value to set. * @return the Forecasting object itself. */ @@ -218,9 +260,9 @@ public Forecasting withLimitSettings(TableVerticalLimitSettings limitSettings) { } /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * + * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. + * * @return the nCrossValidations value. */ public NCrossValidations nCrossValidations() { @@ -228,9 +270,9 @@ public NCrossValidations nCrossValidations() { } /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * + * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. + * * @param nCrossValidations the nCrossValidations value to set. * @return the Forecasting object itself. */ @@ -239,9 +281,51 @@ public Forecasting withNCrossValidations(NCrossValidations nCrossValidations) { return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the Forecasting object itself. + */ + public Forecasting withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public TableSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the Forecasting object itself. + */ + public Forecasting withSweepSettings(TableSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + /** * Get the testData property: Test data input. - * + * * @return the testData value. */ public MLTableJobInput testData() { @@ -250,7 +334,7 @@ public MLTableJobInput testData() { /** * Set the testData property: Test data input. - * + * * @param testData the testData value to set. * @return the Forecasting object itself. */ @@ -261,8 +345,9 @@ public Forecasting withTestData(MLTableJobInput testData) { /** * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the testDataSize value. */ public Double testDataSize() { @@ -271,8 +356,9 @@ public Double testDataSize() { /** * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param testDataSize the testDataSize value to set. * @return the Forecasting object itself. */ @@ -283,7 +369,7 @@ public Forecasting withTestDataSize(Double testDataSize) { /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -292,7 +378,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the Forecasting object itself. */ @@ -303,8 +389,10 @@ public Forecasting withValidationData(MLTableJobInput validationData) { /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the validationDataSize value. */ public Double validationDataSize() { @@ -313,8 +401,10 @@ public Double validationDataSize() { /** * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param validationDataSize the validationDataSize value to set. * @return the Forecasting object itself. */ @@ -326,7 +416,7 @@ public Forecasting withValidationDataSize(Double validationDataSize) { /** * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column * as an input, causing rows in the data to be weighted up or down. - * + * * @return the weightColumnName value. */ public String weightColumnName() { @@ -336,7 +426,7 @@ public String weightColumnName() { /** * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column * as an input, causing rows in the data to be weighted up or down. - * + * * @param weightColumnName the weightColumnName value to set. * @return the Forecasting object itself. */ @@ -345,21 +435,27 @@ public Forecasting withWeightColumnName(String weightColumnName) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Forecasting withLogVerbosity(LogVerbosity logVerbosity) { super.withLogVerbosity(logVerbosity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Forecasting withTargetColumnName(String targetColumnName) { super.withTargetColumnName(targetColumnName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Forecasting withTrainingData(MLTableJobInput trainingData) { super.withTrainingData(trainingData); @@ -368,7 +464,7 @@ public Forecasting withTrainingData(MLTableJobInput trainingData) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -383,12 +479,21 @@ public void validate() { if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } if (nCrossValidations() != null) { nCrossValidations().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } if (testData() != null) { testData().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java index d75b3fdec7a46..b871286b62c23 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java @@ -8,68 +8,108 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum for all forecasting models supported by AutoML. */ +/** + * Enum for all forecasting models supported by AutoML. + */ public final class ForecastingModels extends ExpandableStringEnum { - /** Static value AutoArima for ForecastingModels. */ + /** + * Static value AutoArima for ForecastingModels. + */ public static final ForecastingModels AUTO_ARIMA = fromString("AutoArima"); - /** Static value Prophet for ForecastingModels. */ + /** + * Static value Prophet for ForecastingModels. + */ public static final ForecastingModels PROPHET = fromString("Prophet"); - /** Static value Naive for ForecastingModels. */ + /** + * Static value Naive for ForecastingModels. + */ public static final ForecastingModels NAIVE = fromString("Naive"); - /** Static value SeasonalNaive for ForecastingModels. */ + /** + * Static value SeasonalNaive for ForecastingModels. + */ public static final ForecastingModels SEASONAL_NAIVE = fromString("SeasonalNaive"); - /** Static value Average for ForecastingModels. */ + /** + * Static value Average for ForecastingModels. + */ public static final ForecastingModels AVERAGE = fromString("Average"); - /** Static value SeasonalAverage for ForecastingModels. */ + /** + * Static value SeasonalAverage for ForecastingModels. + */ public static final ForecastingModels SEASONAL_AVERAGE = fromString("SeasonalAverage"); - /** Static value ExponentialSmoothing for ForecastingModels. */ + /** + * Static value ExponentialSmoothing for ForecastingModels. + */ public static final ForecastingModels EXPONENTIAL_SMOOTHING = fromString("ExponentialSmoothing"); - /** Static value Arimax for ForecastingModels. */ + /** + * Static value Arimax for ForecastingModels. + */ public static final ForecastingModels ARIMAX = fromString("Arimax"); - /** Static value TCNForecaster for ForecastingModels. */ + /** + * Static value TCNForecaster for ForecastingModels. + */ public static final ForecastingModels TCNFORECASTER = fromString("TCNForecaster"); - /** Static value ElasticNet for ForecastingModels. */ + /** + * Static value ElasticNet for ForecastingModels. + */ public static final ForecastingModels ELASTIC_NET = fromString("ElasticNet"); - /** Static value GradientBoosting for ForecastingModels. */ + /** + * Static value GradientBoosting for ForecastingModels. + */ public static final ForecastingModels GRADIENT_BOOSTING = fromString("GradientBoosting"); - /** Static value DecisionTree for ForecastingModels. */ + /** + * Static value DecisionTree for ForecastingModels. + */ public static final ForecastingModels DECISION_TREE = fromString("DecisionTree"); - /** Static value KNN for ForecastingModels. */ + /** + * Static value KNN for ForecastingModels. + */ public static final ForecastingModels KNN = fromString("KNN"); - /** Static value LassoLars for ForecastingModels. */ + /** + * Static value LassoLars for ForecastingModels. + */ public static final ForecastingModels LASSO_LARS = fromString("LassoLars"); - /** Static value SGD for ForecastingModels. */ + /** + * Static value SGD for ForecastingModels. + */ public static final ForecastingModels SGD = fromString("SGD"); - /** Static value RandomForest for ForecastingModels. */ + /** + * Static value RandomForest for ForecastingModels. + */ public static final ForecastingModels RANDOM_FOREST = fromString("RandomForest"); - /** Static value ExtremeRandomTrees for ForecastingModels. */ + /** + * Static value ExtremeRandomTrees for ForecastingModels. + */ public static final ForecastingModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); - /** Static value LightGBM for ForecastingModels. */ + /** + * Static value LightGBM for ForecastingModels. + */ public static final ForecastingModels LIGHT_GBM = fromString("LightGBM"); - /** Static value XGBoostRegressor for ForecastingModels. */ + /** + * Static value XGBoostRegressor for ForecastingModels. + */ public static final ForecastingModels XGBOOST_REGRESSOR = fromString("XGBoostRegressor"); /** * Creates a new instance of ForecastingModels value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -78,7 +118,7 @@ public ForecastingModels() { /** * Creates or finds a ForecastingModels from its string representation. - * + * * @param name a name to look for. * @return the corresponding ForecastingModels. */ @@ -89,7 +129,7 @@ public static ForecastingModels fromString(String name) { /** * Gets known ForecastingModels values. - * + * * @return known ForecastingModels values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java index 79f633ca4d448..1cfbd95749329 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java @@ -8,25 +8,35 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Primary metrics for Forecasting task. */ +/** + * Primary metrics for Forecasting task. + */ public final class ForecastingPrimaryMetrics extends ExpandableStringEnum { - /** Static value SpearmanCorrelation for ForecastingPrimaryMetrics. */ + /** + * Static value SpearmanCorrelation for ForecastingPrimaryMetrics. + */ public static final ForecastingPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); - /** Static value NormalizedRootMeanSquaredError for ForecastingPrimaryMetrics. */ - public static final ForecastingPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR = - fromString("NormalizedRootMeanSquaredError"); + /** + * Static value NormalizedRootMeanSquaredError for ForecastingPrimaryMetrics. + */ + public static final ForecastingPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR + = fromString("NormalizedRootMeanSquaredError"); - /** Static value R2Score for ForecastingPrimaryMetrics. */ + /** + * Static value R2Score for ForecastingPrimaryMetrics. + */ public static final ForecastingPrimaryMetrics R2SCORE = fromString("R2Score"); - /** Static value NormalizedMeanAbsoluteError for ForecastingPrimaryMetrics. */ - public static final ForecastingPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR = - fromString("NormalizedMeanAbsoluteError"); + /** + * Static value NormalizedMeanAbsoluteError for ForecastingPrimaryMetrics. + */ + public static final ForecastingPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR + = fromString("NormalizedMeanAbsoluteError"); /** * Creates a new instance of ForecastingPrimaryMetrics value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -35,7 +45,7 @@ public ForecastingPrimaryMetrics() { /** * Creates or finds a ForecastingPrimaryMetrics from its string representation. - * + * * @param name a name to look for. * @return the corresponding ForecastingPrimaryMetrics. */ @@ -46,7 +56,7 @@ public static ForecastingPrimaryMetrics fromString(String name) { /** * Gets known ForecastingPrimaryMetrics values. - * + * * @return known ForecastingPrimaryMetrics values. */ public static Collection values() { 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..e3baf69366e82 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Forecasting specific parameters. */ +/** + * Forecasting specific parameters. + */ @Fluent public final class ForecastingSettings { /* @@ -32,6 +34,14 @@ public final class ForecastingSettings { @JsonProperty(value = "featureLags") private FeatureLags featureLags; + /* + * The feature columns that are available for training but unknown at the time of forecast/inference. + * If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are + * known at inference time. + */ + @JsonProperty(value = "featuresUnknownAtForecastTime") + private List featuresUnknownAtForecastTime; + /* * The desired maximum forecast horizon in units of time-series frequency. */ @@ -99,14 +109,16 @@ public final class ForecastingSettings { @JsonProperty(value = "useStl") private UseStl useStl; - /** Creates an instance of ForecastingSettings class. */ + /** + * Creates an instance of ForecastingSettings class. + */ public ForecastingSettings() { } /** - * Get the countryOrRegionForHolidays property: Country or region for holidays for forecasting tasks. These should - * be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. - * + * Get the countryOrRegionForHolidays property: Country or region for holidays for forecasting tasks. + * These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. + * * @return the countryOrRegionForHolidays value. */ public String countryOrRegionForHolidays() { @@ -114,9 +126,9 @@ public String countryOrRegionForHolidays() { } /** - * Set the countryOrRegionForHolidays property: Country or region for holidays for forecasting tasks. These should - * be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. - * + * Set the countryOrRegionForHolidays property: Country or region for holidays for forecasting tasks. + * These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. + * * @param countryOrRegionForHolidays the countryOrRegionForHolidays value to set. * @return the ForecastingSettings object itself. */ @@ -127,8 +139,9 @@ public ForecastingSettings withCountryOrRegionForHolidays(String countryOrRegion /** * Get the cvStepSize property: Number of periods between the origin time of one CV fold and the next fold. For - * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be three days apart. - * + * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be + * three days apart. + * * @return the cvStepSize value. */ public Integer cvStepSize() { @@ -137,8 +150,9 @@ public Integer cvStepSize() { /** * Set the cvStepSize property: Number of periods between the origin time of one CV fold and the next fold. For - * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be three days apart. - * + * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be + * three days apart. + * * @param cvStepSize the cvStepSize value to set. * @return the ForecastingSettings object itself. */ @@ -149,7 +163,7 @@ public ForecastingSettings withCvStepSize(Integer cvStepSize) { /** * Get the featureLags property: Flag for generating lags for the numeric features with 'auto' or null. - * + * * @return the featureLags value. */ public FeatureLags featureLags() { @@ -158,7 +172,7 @@ public FeatureLags featureLags() { /** * Set the featureLags property: Flag for generating lags for the numeric features with 'auto' or null. - * + * * @param featureLags the featureLags value to set. * @return the ForecastingSettings object itself. */ @@ -167,9 +181,35 @@ public ForecastingSettings withFeatureLags(FeatureLags featureLags) { return this; } + /** + * Get the featuresUnknownAtForecastTime property: The feature columns that are available for training but unknown + * at the time of forecast/inference. + * If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are + * known at inference time. + * + * @return the featuresUnknownAtForecastTime value. + */ + public List featuresUnknownAtForecastTime() { + return this.featuresUnknownAtForecastTime; + } + + /** + * Set the featuresUnknownAtForecastTime property: The feature columns that are available for training but unknown + * at the time of forecast/inference. + * If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are + * known at inference time. + * + * @param featuresUnknownAtForecastTime the featuresUnknownAtForecastTime value to set. + * @return the ForecastingSettings object itself. + */ + public ForecastingSettings withFeaturesUnknownAtForecastTime(List featuresUnknownAtForecastTime) { + this.featuresUnknownAtForecastTime = featuresUnknownAtForecastTime; + return this; + } + /** * Get the forecastHorizon property: The desired maximum forecast horizon in units of time-series frequency. - * + * * @return the forecastHorizon value. */ public ForecastHorizon forecastHorizon() { @@ -178,7 +218,7 @@ public ForecastHorizon forecastHorizon() { /** * Set the forecastHorizon property: The desired maximum forecast horizon in units of time-series frequency. - * + * * @param forecastHorizon the forecastHorizon value to set. * @return the ForecastingSettings object itself. */ @@ -190,7 +230,7 @@ public ForecastingSettings withForecastHorizon(ForecastHorizon forecastHorizon) /** * Get the frequency property: When forecasting, this parameter represents the period with which the forecast is * desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. - * + * * @return the frequency value. */ public String frequency() { @@ -200,7 +240,7 @@ public String frequency() { /** * Set the frequency property: When forecasting, this parameter represents the period with which the forecast is * desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. - * + * * @param frequency the frequency value to set. * @return the ForecastingSettings object itself. */ @@ -210,9 +250,9 @@ public ForecastingSettings withFrequency(String frequency) { } /** - * Get the seasonality property: Set time series seasonality as an integer multiple of the series frequency. If - * seasonality is set to 'auto', it will be inferred. - * + * Get the seasonality property: Set time series seasonality as an integer multiple of the series frequency. + * If seasonality is set to 'auto', it will be inferred. + * * @return the seasonality value. */ public Seasonality seasonality() { @@ -220,9 +260,9 @@ public Seasonality seasonality() { } /** - * Set the seasonality property: Set time series seasonality as an integer multiple of the series frequency. If - * seasonality is set to 'auto', it will be inferred. - * + * Set the seasonality property: Set time series seasonality as an integer multiple of the series frequency. + * If seasonality is set to 'auto', it will be inferred. + * * @param seasonality the seasonality value to set. * @return the ForecastingSettings object itself. */ @@ -232,8 +272,9 @@ public ForecastingSettings withSeasonality(Seasonality seasonality) { } /** - * Get the shortSeriesHandlingConfig property: The parameter defining how if AutoML should handle short time series. - * + * Get the shortSeriesHandlingConfig property: The parameter defining how if AutoML should handle short time + * series. + * * @return the shortSeriesHandlingConfig value. */ public ShortSeriesHandlingConfiguration shortSeriesHandlingConfig() { @@ -241,23 +282,24 @@ public ShortSeriesHandlingConfiguration shortSeriesHandlingConfig() { } /** - * Set the shortSeriesHandlingConfig property: The parameter defining how if AutoML should handle short time series. - * + * Set the shortSeriesHandlingConfig property: The parameter defining how if AutoML should handle short time + * series. + * * @param shortSeriesHandlingConfig the shortSeriesHandlingConfig value to set. * @return the ForecastingSettings object itself. */ - public ForecastingSettings withShortSeriesHandlingConfig( - ShortSeriesHandlingConfiguration shortSeriesHandlingConfig) { + public ForecastingSettings + withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration shortSeriesHandlingConfig) { this.shortSeriesHandlingConfig = shortSeriesHandlingConfig; return this; } /** * 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". - * + * 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". + * * @return the targetAggregateFunction value. */ public TargetAggregationFunction targetAggregateFunction() { @@ -266,10 +308,10 @@ 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". - * + * 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". + * * @param targetAggregateFunction the targetAggregateFunction value to set. * @return the ForecastingSettings object itself. */ @@ -280,7 +322,7 @@ public ForecastingSettings withTargetAggregateFunction(TargetAggregationFunction /** * Get the targetLags property: The number of past periods to lag from the target column. - * + * * @return the targetLags value. */ public TargetLags targetLags() { @@ -289,7 +331,7 @@ public TargetLags targetLags() { /** * Set the targetLags property: The number of past periods to lag from the target column. - * + * * @param targetLags the targetLags value to set. * @return the ForecastingSettings object itself. */ @@ -301,7 +343,7 @@ public ForecastingSettings withTargetLags(TargetLags targetLags) { /** * Get the targetRollingWindowSize property: The number of past periods used to create a rolling window average of * the target column. - * + * * @return the targetRollingWindowSize value. */ public TargetRollingWindowSize targetRollingWindowSize() { @@ -311,7 +353,7 @@ public TargetRollingWindowSize targetRollingWindowSize() { /** * Set the targetRollingWindowSize property: The number of past periods used to create a rolling window average of * the target column. - * + * * @param targetRollingWindowSize the targetRollingWindowSize value to set. * @return the ForecastingSettings object itself. */ @@ -323,7 +365,7 @@ public ForecastingSettings withTargetRollingWindowSize(TargetRollingWindowSize t /** * Get the timeColumnName property: The name of the time column. This parameter is required when forecasting to * specify the datetime column in the input data used for building the time series and inferring its frequency. - * + * * @return the timeColumnName value. */ public String timeColumnName() { @@ -333,7 +375,7 @@ public String timeColumnName() { /** * Set the timeColumnName property: The name of the time column. This parameter is required when forecasting to * specify the datetime column in the input data used for building the time series and inferring its frequency. - * + * * @param timeColumnName the timeColumnName value to set. * @return the ForecastingSettings object itself. */ @@ -344,9 +386,10 @@ public ForecastingSettings withTimeColumnName(String timeColumnName) { /** * Get the timeSeriesIdColumnNames property: The names of columns used to group a timeseries. It can be used to - * create multiple series. If grain is not defined, the data set is assumed to be one time-series. This parameter is - * used with task type forecasting. - * + * create multiple series. + * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type + * forecasting. + * * @return the timeSeriesIdColumnNames value. */ public List timeSeriesIdColumnNames() { @@ -355,9 +398,10 @@ public List timeSeriesIdColumnNames() { /** * Set the timeSeriesIdColumnNames property: The names of columns used to group a timeseries. It can be used to - * create multiple series. If grain is not defined, the data set is assumed to be one time-series. This parameter is - * used with task type forecasting. - * + * create multiple series. + * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type + * forecasting. + * * @param timeSeriesIdColumnNames the timeSeriesIdColumnNames value to set. * @return the ForecastingSettings object itself. */ @@ -368,7 +412,7 @@ public ForecastingSettings withTimeSeriesIdColumnNames(List timeSeriesId /** * Get the useStl property: Configure STL Decomposition of the time-series target column. - * + * * @return the useStl value. */ public UseStl useStl() { @@ -377,7 +421,7 @@ public UseStl useStl() { /** * Set the useStl property: Configure STL Decomposition of the time-series target column. - * + * * @param useStl the useStl value to set. * @return the ForecastingSettings object itself. */ @@ -388,7 +432,7 @@ public ForecastingSettings withUseStl(UseStl useStl) { /** * 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/ForecastingTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java index baf43d0f6fbfe..7ef0edb54f99e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java @@ -9,7 +9,9 @@ import java.time.Duration; import java.util.List; -/** Forecasting Training related configuration. */ +/** + * Forecasting Training related configuration. + */ @Fluent public final class ForecastingTrainingSettings extends TrainingSettings { /* @@ -24,13 +26,15 @@ public final class ForecastingTrainingSettings extends TrainingSettings { @JsonProperty(value = "blockedTrainingAlgorithms") private List blockedTrainingAlgorithms; - /** Creates an instance of ForecastingTrainingSettings class. */ + /** + * Creates an instance of ForecastingTrainingSettings class. + */ public ForecastingTrainingSettings() { } /** * Get the allowedTrainingAlgorithms property: Allowed models for forecasting task. - * + * * @return the allowedTrainingAlgorithms value. */ public List allowedTrainingAlgorithms() { @@ -39,19 +43,19 @@ public List allowedTrainingAlgorithms() { /** * Set the allowedTrainingAlgorithms property: Allowed models for forecasting task. - * + * * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. * @return the ForecastingTrainingSettings object itself. */ - public ForecastingTrainingSettings withAllowedTrainingAlgorithms( - List allowedTrainingAlgorithms) { + public ForecastingTrainingSettings + withAllowedTrainingAlgorithms(List allowedTrainingAlgorithms) { this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; return this; } /** * Get the blockedTrainingAlgorithms property: Blocked models for forecasting task. - * + * * @return the blockedTrainingAlgorithms value. */ public List blockedTrainingAlgorithms() { @@ -60,68 +64,91 @@ public List blockedTrainingAlgorithms() { /** * Set the blockedTrainingAlgorithms property: Blocked models for forecasting task. - * + * * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. * @return the ForecastingTrainingSettings object itself. */ - public ForecastingTrainingSettings withBlockedTrainingAlgorithms( - List blockedTrainingAlgorithms) { + public ForecastingTrainingSettings + withBlockedTrainingAlgorithms(List blockedTrainingAlgorithms) { this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ForecastingTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { super.withEnableDnnTraining(enableDnnTraining); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { super.withEnableModelExplainability(enableModelExplainability); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { super.withEnableStackEnsemble(enableStackEnsemble); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { super.withEnableVoteEnsemble(enableVoteEnsemble); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { super.withStackEnsembleSettings(stackEnsembleSettings); return this; } + /** + * {@inheritDoc} + */ + @Override + public ForecastingTrainingSettings withTrainingMode(TrainingMode trainingMode) { + super.withTrainingMode(trainingMode); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java index f5da7736f78c0..8a97c511fd4fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The FqdnEndpoint model. */ +/** + * The FqdnEndpoint model. + */ @Fluent public final class FqdnEndpoint { /* @@ -23,13 +25,15 @@ public final class FqdnEndpoint { @JsonProperty(value = "endpointDetails") private List endpointDetails; - /** Creates an instance of FqdnEndpoint class. */ + /** + * Creates an instance of FqdnEndpoint class. + */ public FqdnEndpoint() { } /** * Get the domainName property: The domainName property. - * + * * @return the domainName value. */ public String domainName() { @@ -38,7 +42,7 @@ public String domainName() { /** * Set the domainName property: The domainName property. - * + * * @param domainName the domainName value to set. * @return the FqdnEndpoint object itself. */ @@ -49,7 +53,7 @@ public FqdnEndpoint withDomainName(String domainName) { /** * Get the endpointDetails property: The endpointDetails property. - * + * * @return the endpointDetails value. */ public List endpointDetails() { @@ -58,7 +62,7 @@ public List endpointDetails() { /** * Set the endpointDetails property: The endpointDetails property. - * + * * @param endpointDetails the endpointDetails value to set. * @return the FqdnEndpoint object itself. */ @@ -69,7 +73,7 @@ public FqdnEndpoint withEndpointDetails(List endpointDetails /** * 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/FqdnEndpointDetail.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java index e2b5c5930b28b..7fb475f4edc72 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The FqdnEndpointDetail model. */ +/** + * The FqdnEndpointDetail model. + */ @Fluent public final class FqdnEndpointDetail { /* @@ -16,13 +18,15 @@ public final class FqdnEndpointDetail { @JsonProperty(value = "port") private Integer port; - /** Creates an instance of FqdnEndpointDetail class. */ + /** + * Creates an instance of FqdnEndpointDetail class. + */ public FqdnEndpointDetail() { } /** * Get the port property: The port property. - * + * * @return the port value. */ public Integer port() { @@ -31,7 +35,7 @@ public Integer port() { /** * Set the port property: The port property. - * + * * @param port the port value to set. * @return the FqdnEndpointDetail object itself. */ @@ -42,7 +46,7 @@ public FqdnEndpointDetail withPort(Integer port) { /** * 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/FqdnEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java index e858af2ff0011..c52e8a6055b78 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java @@ -6,48 +6,79 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** The FqdnEndpoints model. */ +/** + * The FqdnEndpoints model. + */ @Fluent public final class FqdnEndpoints { /* - * The properties property. + * The category property. */ - @JsonProperty(value = "properties") - private FqdnEndpointsProperties properties; + @JsonProperty(value = "category") + private String category; - /** Creates an instance of FqdnEndpoints class. */ + /* + * The endpoints property. + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /** + * Creates an instance of FqdnEndpoints class. + */ public FqdnEndpoints() { } /** - * Get the properties property: The properties property. - * - * @return the properties value. + * Get the category property: The category property. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: The category property. + * + * @param category the category value to set. + * @return the FqdnEndpoints object itself. + */ + public FqdnEndpoints withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the endpoints property: The endpoints property. + * + * @return the endpoints value. */ - public FqdnEndpointsProperties properties() { - return this.properties; + public List endpoints() { + return this.endpoints; } /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. + * Set the endpoints property: The endpoints property. + * + * @param endpoints the endpoints value to set. * @return the FqdnEndpoints object itself. */ - public FqdnEndpoints withProperties(FqdnEndpointsProperties properties) { - this.properties = properties; + public FqdnEndpoints withEndpoints(List endpoints) { + this.endpoints = endpoints; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (properties() != null) { - properties().validate(); + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java deleted file mode 100644 index 6cf5fe68fb945..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The FqdnEndpointsProperties model. */ -@Fluent -public final class FqdnEndpointsProperties { - /* - * The category property. - */ - @JsonProperty(value = "category") - private String category; - - /* - * The endpoints property. - */ - @JsonProperty(value = "endpoints") - private List endpoints; - - /** Creates an instance of FqdnEndpointsProperties class. */ - public FqdnEndpointsProperties() { - } - - /** - * Get the category property: The category property. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: The category property. - * - * @param category the category value to set. - * @return the FqdnEndpointsProperties object itself. - */ - public FqdnEndpointsProperties withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the endpoints property: The endpoints property. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.endpoints; - } - - /** - * Set the endpoints property: The endpoints property. - * - * @param endpoints the endpoints value to set. - * @return the FqdnEndpointsProperties object itself. - */ - public FqdnEndpointsProperties withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java new file mode 100644 index 0000000000000..f2023f8d0b019 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Property bag for FQDN endpoints result. + */ +@Fluent +public final class FqdnEndpointsPropertyBag { + /* + * The properties property. + */ + @JsonProperty(value = "properties") + private FqdnEndpoints properties; + + /** + * Creates an instance of FqdnEndpointsPropertyBag class. + */ + public FqdnEndpointsPropertyBag() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public FqdnEndpoints properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the FqdnEndpointsPropertyBag object itself. + */ + public FqdnEndpointsPropertyBag withProperties(FqdnEndpoints properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} 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..35dcad85ef6d5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.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.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/GenerationSafetyQualityMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMetric.java new file mode 100644 index 0000000000000..4961813eba14a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMetric.java @@ -0,0 +1,103 @@ +// Copyright (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; + +/** + * Generation safety quality metric enum. + */ +public final class GenerationSafetyQualityMetric extends ExpandableStringEnum { + /** + * Static value AcceptableGroundednessScorePerInstance for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric ACCEPTABLE_GROUNDEDNESS_SCORE_PER_INSTANCE + = fromString("AcceptableGroundednessScorePerInstance"); + + /** + * Static value AggregatedGroundednessPassRate for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric AGGREGATED_GROUNDEDNESS_PASS_RATE + = fromString("AggregatedGroundednessPassRate"); + + /** + * Static value AcceptableCoherenceScorePerInstance for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric ACCEPTABLE_COHERENCE_SCORE_PER_INSTANCE + = fromString("AcceptableCoherenceScorePerInstance"); + + /** + * Static value AggregatedCoherencePassRate for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric AGGREGATED_COHERENCE_PASS_RATE + = fromString("AggregatedCoherencePassRate"); + + /** + * Static value AcceptableFluencyScorePerInstance for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric ACCEPTABLE_FLUENCY_SCORE_PER_INSTANCE + = fromString("AcceptableFluencyScorePerInstance"); + + /** + * Static value AggregatedFluencyPassRate for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric AGGREGATED_FLUENCY_PASS_RATE + = fromString("AggregatedFluencyPassRate"); + + /** + * Static value AcceptableSimilarityScorePerInstance for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric ACCEPTABLE_SIMILARITY_SCORE_PER_INSTANCE + = fromString("AcceptableSimilarityScorePerInstance"); + + /** + * Static value AggregatedSimilarityPassRate for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric AGGREGATED_SIMILARITY_PASS_RATE + = fromString("AggregatedSimilarityPassRate"); + + /** + * Static value AcceptableRelevanceScorePerInstance for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric ACCEPTABLE_RELEVANCE_SCORE_PER_INSTANCE + = fromString("AcceptableRelevanceScorePerInstance"); + + /** + * Static value AggregatedRelevancePassRate for GenerationSafetyQualityMetric. + */ + public static final GenerationSafetyQualityMetric AGGREGATED_RELEVANCE_PASS_RATE + = fromString("AggregatedRelevancePassRate"); + + /** + * Creates a new instance of GenerationSafetyQualityMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GenerationSafetyQualityMetric() { + } + + /** + * Creates or finds a GenerationSafetyQualityMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding GenerationSafetyQualityMetric. + */ + @JsonCreator + public static GenerationSafetyQualityMetric fromString(String name) { + return fromString(name, GenerationSafetyQualityMetric.class); + } + + /** + * Gets known GenerationSafetyQualityMetric values. + * + * @return known GenerationSafetyQualityMetric values. + */ + public static Collection values() { + return values(GenerationSafetyQualityMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMetricThreshold.java new file mode 100644 index 0000000000000..f0a39fd86adea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMetricThreshold.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Generation safety quality metric threshold definition. + */ +@Fluent +public final class GenerationSafetyQualityMetricThreshold { + /* + * [Required] Gets or sets the feature attribution metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private GenerationSafetyQualityMetric metric; + + /* + * Gets or sets 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 GenerationSafetyQualityMetricThreshold class. + */ + public GenerationSafetyQualityMetricThreshold() { + } + + /** + * Get the metric property: [Required] Gets or sets the feature attribution metric to calculate. + * + * @return the metric value. + */ + public GenerationSafetyQualityMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] Gets or sets the feature attribution metric to calculate. + * + * @param metric the metric value to set. + * @return the GenerationSafetyQualityMetricThreshold object itself. + */ + public GenerationSafetyQualityMetricThreshold withMetric(GenerationSafetyQualityMetric metric) { + this.metric = metric; + return this; + } + + /** + * Get the threshold property: Gets or sets 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: Gets or sets 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 GenerationSafetyQualityMetricThreshold object itself. + */ + public GenerationSafetyQualityMetricThreshold 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 GenerationSafetyQualityMetricThreshold")); + } + if (threshold() != null) { + threshold().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GenerationSafetyQualityMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMonitoringSignal.java new file mode 100644 index 0000000000000..27ed467cd1bb1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationSafetyQualityMonitoringSignal.java @@ -0,0 +1,178 @@ +// Copyright (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; +import java.util.Map; + +/** + * Generation safety quality monitoring signal definition. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "signalType") +@JsonTypeName("GenerationSafetyQuality") +@Fluent +public final class GenerationSafetyQualityMonitoringSignal extends MonitoringSignalBase { + /* + * [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + */ + @JsonProperty(value = "metricThresholds", required = true) + private List metricThresholds; + + /* + * Gets or sets the production data for computing metrics. + */ + @JsonProperty(value = "productionData") + private List productionData; + + /* + * [Required] The sample rate of the production data, should be greater than 0 and at most 1. + */ + @JsonProperty(value = "samplingRate", required = true) + private double samplingRate; + + /* + * Gets or sets the workspace connection ID used to connect to the content generation endpoint. + */ + @JsonProperty(value = "workspaceConnectionId") + private String workspaceConnectionId; + + /** + * Creates an instance of GenerationSafetyQualityMonitoringSignal class. + */ + public GenerationSafetyQualityMonitoringSignal() { + } + + /** + * Get the metricThresholds property: [Required] Gets or sets the metrics to calculate and the corresponding + * thresholds. + * + * @return the metricThresholds value. + */ + public List metricThresholds() { + return this.metricThresholds; + } + + /** + * Set the metricThresholds property: [Required] Gets or sets the metrics to calculate and the corresponding + * thresholds. + * + * @param metricThresholds the metricThresholds value to set. + * @return the GenerationSafetyQualityMonitoringSignal object itself. + */ + public GenerationSafetyQualityMonitoringSignal + withMetricThresholds(List metricThresholds) { + this.metricThresholds = metricThresholds; + return this; + } + + /** + * Get the productionData property: Gets or sets the production data for computing metrics. + * + * @return the productionData value. + */ + public List productionData() { + return this.productionData; + } + + /** + * Set the productionData property: Gets or sets the production data for computing metrics. + * + * @param productionData the productionData value to set. + * @return the GenerationSafetyQualityMonitoringSignal object itself. + */ + public GenerationSafetyQualityMonitoringSignal withProductionData(List productionData) { + this.productionData = productionData; + return this; + } + + /** + * Get the samplingRate property: [Required] The sample rate of the production data, should be greater than 0 and + * at most 1. + * + * @return the samplingRate value. + */ + public double samplingRate() { + return this.samplingRate; + } + + /** + * Set the samplingRate property: [Required] The sample rate of the production data, should be greater than 0 and + * at most 1. + * + * @param samplingRate the samplingRate value to set. + * @return the GenerationSafetyQualityMonitoringSignal object itself. + */ + public GenerationSafetyQualityMonitoringSignal withSamplingRate(double samplingRate) { + this.samplingRate = samplingRate; + return this; + } + + /** + * Get the workspaceConnectionId property: Gets or sets the workspace connection ID used to connect to the content + * generation endpoint. + * + * @return the workspaceConnectionId value. + */ + public String workspaceConnectionId() { + return this.workspaceConnectionId; + } + + /** + * Set the workspaceConnectionId property: Gets or sets the workspace connection ID used to connect to the content + * generation endpoint. + * + * @param workspaceConnectionId the workspaceConnectionId value to set. + * @return the GenerationSafetyQualityMonitoringSignal object itself. + */ + public GenerationSafetyQualityMonitoringSignal withWorkspaceConnectionId(String workspaceConnectionId) { + this.workspaceConnectionId = workspaceConnectionId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public GenerationSafetyQualityMonitoringSignal + withNotificationTypes(List notificationTypes) { + super.withNotificationTypes(notificationTypes); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public GenerationSafetyQualityMonitoringSignal 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 GenerationSafetyQualityMonitoringSignal")); + } else { + metricThresholds().forEach(e -> e.validate()); + } + if (productionData() != null) { + productionData().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GenerationSafetyQualityMonitoringSignal.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageMetric.java new file mode 100644 index 0000000000000..fd855b65b9c56 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageMetric.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; + +/** + * Generation token statistics metric enum. + */ +public final class GenerationTokenUsageMetric extends ExpandableStringEnum { + /** + * Static value TotalTokenCount for GenerationTokenUsageMetric. + */ + public static final GenerationTokenUsageMetric TOTAL_TOKEN_COUNT = fromString("TotalTokenCount"); + + /** + * Static value TotalTokenCountPerGroup for GenerationTokenUsageMetric. + */ + public static final GenerationTokenUsageMetric TOTAL_TOKEN_COUNT_PER_GROUP = fromString("TotalTokenCountPerGroup"); + + /** + * Creates a new instance of GenerationTokenUsageMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GenerationTokenUsageMetric() { + } + + /** + * Creates or finds a GenerationTokenUsageMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding GenerationTokenUsageMetric. + */ + @JsonCreator + public static GenerationTokenUsageMetric fromString(String name) { + return fromString(name, GenerationTokenUsageMetric.class); + } + + /** + * Gets known GenerationTokenUsageMetric values. + * + * @return known GenerationTokenUsageMetric values. + */ + public static Collection values() { + return values(GenerationTokenUsageMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageMetricThreshold.java new file mode 100644 index 0000000000000..5353f783ee2c3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageMetricThreshold.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Generation token statistics metric threshold definition. + */ +@Fluent +public final class GenerationTokenUsageMetricThreshold { + /* + * [Required] Gets or sets the feature attribution metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private GenerationTokenUsageMetric metric; + + /* + * Gets or sets 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 GenerationTokenUsageMetricThreshold class. + */ + public GenerationTokenUsageMetricThreshold() { + } + + /** + * Get the metric property: [Required] Gets or sets the feature attribution metric to calculate. + * + * @return the metric value. + */ + public GenerationTokenUsageMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] Gets or sets the feature attribution metric to calculate. + * + * @param metric the metric value to set. + * @return the GenerationTokenUsageMetricThreshold object itself. + */ + public GenerationTokenUsageMetricThreshold withMetric(GenerationTokenUsageMetric metric) { + this.metric = metric; + return this; + } + + /** + * Get the threshold property: Gets or sets 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: Gets or sets 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 GenerationTokenUsageMetricThreshold object itself. + */ + public GenerationTokenUsageMetricThreshold 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 GenerationTokenUsageMetricThreshold")); + } + if (threshold() != null) { + threshold().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GenerationTokenUsageMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageSignal.java new file mode 100644 index 0000000000000..d7058a825bb2c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GenerationTokenUsageSignal.java @@ -0,0 +1,148 @@ +// Copyright (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; +import java.util.Map; + +/** + * Generation token usage signal definition. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "signalType") +@JsonTypeName("GenerationTokenStatistics") +@Fluent +public final class GenerationTokenUsageSignal extends MonitoringSignalBase { + /* + * [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + */ + @JsonProperty(value = "metricThresholds", required = true) + private List metricThresholds; + + /* + * Gets or sets the production data for computing metrics. + */ + @JsonProperty(value = "productionData") + private List productionData; + + /* + * [Required] The sample rate of the production data, should be greater than 0 and at most 1. + */ + @JsonProperty(value = "samplingRate", required = true) + private double samplingRate; + + /** + * Creates an instance of GenerationTokenUsageSignal class. + */ + public GenerationTokenUsageSignal() { + } + + /** + * Get the metricThresholds property: [Required] Gets or sets the metrics to calculate and the corresponding + * thresholds. + * + * @return the metricThresholds value. + */ + public List metricThresholds() { + return this.metricThresholds; + } + + /** + * Set the metricThresholds property: [Required] Gets or sets the metrics to calculate and the corresponding + * thresholds. + * + * @param metricThresholds the metricThresholds value to set. + * @return the GenerationTokenUsageSignal object itself. + */ + public GenerationTokenUsageSignal withMetricThresholds(List metricThresholds) { + this.metricThresholds = metricThresholds; + return this; + } + + /** + * Get the productionData property: Gets or sets the production data for computing metrics. + * + * @return the productionData value. + */ + public List productionData() { + return this.productionData; + } + + /** + * Set the productionData property: Gets or sets the production data for computing metrics. + * + * @param productionData the productionData value to set. + * @return the GenerationTokenUsageSignal object itself. + */ + public GenerationTokenUsageSignal withProductionData(List productionData) { + this.productionData = productionData; + return this; + } + + /** + * Get the samplingRate property: [Required] The sample rate of the production data, should be greater than 0 and + * at most 1. + * + * @return the samplingRate value. + */ + public double samplingRate() { + return this.samplingRate; + } + + /** + * Set the samplingRate property: [Required] The sample rate of the production data, should be greater than 0 and + * at most 1. + * + * @param samplingRate the samplingRate value to set. + * @return the GenerationTokenUsageSignal object itself. + */ + public GenerationTokenUsageSignal withSamplingRate(double samplingRate) { + this.samplingRate = samplingRate; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public GenerationTokenUsageSignal withNotificationTypes(List notificationTypes) { + super.withNotificationTypes(notificationTypes); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public GenerationTokenUsageSignal 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 GenerationTokenUsageSignal")); + } else { + metricThresholds().forEach(e -> e.validate()); + } + if (productionData() != null) { + productionData().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GenerationTokenUsageSignal.class); +} 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..adefd878b7470 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.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; + +/** + * 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..20256497411c7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..5f490f3cec94d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/Goal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java index 7137524220105..e741a707ceb70 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines supported metric goals for hyperparameter tuning. */ +/** + * Defines supported metric goals for hyperparameter tuning. + */ public final class Goal extends ExpandableStringEnum { - /** Static value Minimize for Goal. */ + /** + * Static value Minimize for Goal. + */ public static final Goal MINIMIZE = fromString("Minimize"); - /** Static value Maximize for Goal. */ + /** + * Static value Maximize for Goal. + */ public static final Goal MAXIMIZE = fromString("Maximize"); /** * Creates a new instance of Goal value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public Goal() { /** * Creates or finds a Goal from its string representation. - * + * * @param name a name to look for. * @return the corresponding Goal. */ @@ -38,7 +44,7 @@ public static Goal fromString(String name) { /** * Gets known Goal values. - * + * * @return known Goal values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java index 1e60d81c65f4b..2a142ed930d1e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Defines a Sampling Algorithm that exhaustively generates every value combination in the space. */ +/** + * Defines a Sampling Algorithm that exhaustively generates every value combination in the space. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "samplingAlgorithmType") @JsonTypeName("Grid") @Immutable public final class GridSamplingAlgorithm extends SamplingAlgorithm { - /** Creates an instance of GridSamplingAlgorithm class. */ + /** + * Creates an instance of GridSamplingAlgorithm class. + */ public GridSamplingAlgorithm() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.java new file mode 100644 index 0000000000000..115308bd7dd22 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.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.resourcemanager.machinelearning.fluent.models.GroupStatusInner; + +/** + * An immutable client-side representation of GroupStatus. + */ +public interface GroupStatus { + /** + * Gets the actualCapacityInfo property: Gets or sets the actual capacity info for the group. + * + * @return the actualCapacityInfo value. + */ + ActualCapacityInfo actualCapacityInfo(); + + /** + * Gets the bonusExtraCapacity property: Gets or sets capacity used from the pool's reserved capacity. + * + * @return the bonusExtraCapacity value. + */ + Integer bonusExtraCapacity(); + + /** + * Gets the endpointCount property: Gets or sets the actual number of endpoints in the group. + * + * @return the endpointCount value. + */ + Integer endpointCount(); + + /** + * Gets the requestedCapacity property: Gets or sets the request number of instances for the group. + * + * @return the requestedCapacity value. + */ + Integer requestedCapacity(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner object. + * + * @return the inner object. + */ + GroupStatusInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java index c5e63988ce745..f056aa361b1e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A HDInsight compute. */ +/** + * A HDInsight compute. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("HDInsight") @Fluent @@ -20,13 +22,15 @@ public final class HDInsight extends Compute { @JsonProperty(value = "properties") private HDInsightProperties properties; - /** Creates an instance of HDInsight class. */ + /** + * Creates an instance of HDInsight class. + */ public HDInsight() { } /** * Get the properties property: HDInsight compute properties. - * + * * @return the properties value. */ public HDInsightProperties properties() { @@ -35,7 +39,7 @@ public HDInsightProperties properties() { /** * Set the properties property: HDInsight compute properties. - * + * * @param properties the properties value to set. * @return the HDInsight object itself. */ @@ -44,28 +48,36 @@ public HDInsight withProperties(HDInsightProperties properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public HDInsight withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public HDInsight withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public HDInsight withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public HDInsight withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -74,7 +86,7 @@ public HDInsight withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java index bc6f0165cefe7..0e318c4e29164 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** HDInsight compute properties. */ +/** + * HDInsight compute properties. + */ @Fluent public final class HDInsightProperties { /* @@ -28,13 +30,15 @@ public final class HDInsightProperties { @JsonProperty(value = "administratorAccount") private VirtualMachineSshCredentials administratorAccount; - /** Creates an instance of HDInsightProperties class. */ + /** + * Creates an instance of HDInsightProperties class. + */ public HDInsightProperties() { } /** * Get the sshPort property: Port open for ssh connections on the master node of the cluster. - * + * * @return the sshPort value. */ public Integer sshPort() { @@ -43,7 +47,7 @@ public Integer sshPort() { /** * Set the sshPort property: Port open for ssh connections on the master node of the cluster. - * + * * @param sshPort the sshPort value to set. * @return the HDInsightProperties object itself. */ @@ -54,7 +58,7 @@ public HDInsightProperties withSshPort(Integer sshPort) { /** * Get the address property: Public IP address of the master node of the cluster. - * + * * @return the address value. */ public String address() { @@ -63,7 +67,7 @@ public String address() { /** * Set the address property: Public IP address of the master node of the cluster. - * + * * @param address the address value to set. * @return the HDInsightProperties object itself. */ @@ -74,7 +78,7 @@ public HDInsightProperties withAddress(String address) { /** * Get the administratorAccount property: Admin credentials for master node of the cluster. - * + * * @return the administratorAccount value. */ public VirtualMachineSshCredentials administratorAccount() { @@ -83,7 +87,7 @@ public VirtualMachineSshCredentials administratorAccount() { /** * Set the administratorAccount property: Admin credentials for master node of the cluster. - * + * * @param administratorAccount the administratorAccount value to set. * @return the HDInsightProperties object itself. */ @@ -94,7 +98,7 @@ public HDInsightProperties withAdministratorAccount(VirtualMachineSshCredentials /** * 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/HDInsightSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java index cd4faac3dfc62..a26aee7686ffc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The HDInsightSchema model. */ +/** + * The HDInsightSchema model. + */ @Fluent public class HDInsightSchema { /* @@ -16,13 +18,15 @@ public class HDInsightSchema { @JsonProperty(value = "properties") private HDInsightProperties properties; - /** Creates an instance of HDInsightSchema class. */ + /** + * Creates an instance of HDInsightSchema class. + */ public HDInsightSchema() { } /** * Get the properties property: HDInsight compute properties. - * + * * @return the properties value. */ public HDInsightProperties properties() { @@ -31,7 +35,7 @@ public HDInsightProperties properties() { /** * Set the properties property: HDInsight compute properties. - * + * * @param properties the properties value to set. * @return the HDInsightSchema object itself. */ @@ -42,7 +46,7 @@ public HDInsightSchema withProperties(HDInsightProperties properties) { /** * 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/HdfsDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HdfsDatastore.java new file mode 100644 index 0000000000000..20de7fefa99af --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HdfsDatastore.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.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.Map; + +/** + * The HdfsDatastore model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") +@JsonTypeName("Hdfs") +@Fluent +public final class HdfsDatastore extends DatastoreProperties { + /* + * The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if "Https" protocol is selected. + */ + @JsonProperty(value = "hdfsServerCertificate") + private String hdfsServerCertificate; + + /* + * [Required] IP Address or DNS HostName. + */ + @JsonProperty(value = "nameNodeAddress", required = true) + private String nameNodeAddress; + + /* + * Protocol used to communicate with the storage account (Https/Http). + */ + @JsonProperty(value = "protocol") + private String protocol; + + /** + * Creates an instance of HdfsDatastore class. + */ + public HdfsDatastore() { + } + + /** + * Get the hdfsServerCertificate property: The TLS cert of the HDFS server. Needs to be a base64 encoded string. + * Required if "Https" protocol is selected. + * + * @return the hdfsServerCertificate value. + */ + public String hdfsServerCertificate() { + return this.hdfsServerCertificate; + } + + /** + * Set the hdfsServerCertificate property: The TLS cert of the HDFS server. Needs to be a base64 encoded string. + * Required if "Https" protocol is selected. + * + * @param hdfsServerCertificate the hdfsServerCertificate value to set. + * @return the HdfsDatastore object itself. + */ + public HdfsDatastore withHdfsServerCertificate(String hdfsServerCertificate) { + this.hdfsServerCertificate = hdfsServerCertificate; + return this; + } + + /** + * Get the nameNodeAddress property: [Required] IP Address or DNS HostName. + * + * @return the nameNodeAddress value. + */ + public String nameNodeAddress() { + return this.nameNodeAddress; + } + + /** + * Set the nameNodeAddress property: [Required] IP Address or DNS HostName. + * + * @param nameNodeAddress the nameNodeAddress value to set. + * @return the HdfsDatastore object itself. + */ + public HdfsDatastore withNameNodeAddress(String nameNodeAddress) { + this.nameNodeAddress = nameNodeAddress; + return this; + } + + /** + * Get the protocol property: Protocol used to communicate with the storage account (Https/Http). + * + * @return the protocol value. + */ + public String protocol() { + return this.protocol; + } + + /** + * Set the protocol property: Protocol used to communicate with the storage account (Https/Http). + * + * @param protocol the protocol value to set. + * @return the HdfsDatastore object itself. + */ + public HdfsDatastore withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public HdfsDatastore withCredentials(DatastoreCredentials credentials) { + super.withCredentials(credentials); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public HdfsDatastore withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public HdfsDatastore withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public HdfsDatastore withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public HdfsDatastore 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 (nameNodeAddress() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property nameNodeAddress in model HdfsDatastore")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HdfsDatastore.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java index 2ed4fa9fd76ca..d14deaa070f0c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Reference to an asset via its ARM resource ID. */ +/** + * Reference to an asset via its ARM resource ID. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") @JsonTypeName("Id") @Fluent @@ -21,13 +23,15 @@ public final class IdAssetReference extends AssetReferenceBase { @JsonProperty(value = "assetId", required = true) private String assetId; - /** Creates an instance of IdAssetReference class. */ + /** + * Creates an instance of IdAssetReference class. + */ public IdAssetReference() { } /** * Get the assetId property: [Required] ARM resource ID of the asset. - * + * * @return the assetId value. */ public String assetId() { @@ -36,7 +40,7 @@ public String assetId() { /** * Set the assetId property: [Required] ARM resource ID of the asset. - * + * * @param assetId the assetId value to set. * @return the IdAssetReference object itself. */ @@ -47,16 +51,15 @@ public IdAssetReference withAssetId(String assetId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (assetId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property assetId in model IdAssetReference")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property assetId in model IdAssetReference")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java index c0a1ddcffc398..5efb01644f536 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Base definition for identity configuration. */ +/** + * Base definition for identity configuration. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,17 +21,18 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "AMLToken", value = AmlToken.class), @JsonSubTypes.Type(name = "Managed", value = ManagedIdentity.class), - @JsonSubTypes.Type(name = "UserIdentity", value = UserIdentity.class) -}) + @JsonSubTypes.Type(name = "UserIdentity", value = UserIdentity.class) }) @Immutable public class IdentityConfiguration { - /** Creates an instance of IdentityConfiguration class. */ + /** + * Creates an instance of IdentityConfiguration class. + */ public IdentityConfiguration() { } /** * 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/IdentityConfigurationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java index 34e2015582110..5cef557e27266 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine identity framework. */ +/** + * Enum to determine identity framework. + */ public final class IdentityConfigurationType extends ExpandableStringEnum { - /** Static value Managed for IdentityConfigurationType. */ + /** + * Static value Managed for IdentityConfigurationType. + */ public static final IdentityConfigurationType MANAGED = fromString("Managed"); - /** Static value AMLToken for IdentityConfigurationType. */ + /** + * Static value AMLToken for IdentityConfigurationType. + */ public static final IdentityConfigurationType AMLTOKEN = fromString("AMLToken"); - /** Static value UserIdentity for IdentityConfigurationType. */ + /** + * Static value UserIdentity for IdentityConfigurationType. + */ public static final IdentityConfigurationType USER_IDENTITY = fromString("UserIdentity"); /** * Creates a new instance of IdentityConfigurationType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public IdentityConfigurationType() { /** * Creates or finds a IdentityConfigurationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding IdentityConfigurationType. */ @@ -41,7 +49,7 @@ public static IdentityConfigurationType fromString(String name) { /** * Gets known IdentityConfigurationType values. - * + * * @return known IdentityConfigurationType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java index 9e86918bfd7af..f493c571a9b37 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java @@ -7,23 +7,27 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Identity that will be used to access key vault for encryption at rest. */ +/** + * Identity object used for encryption. + */ @Fluent public final class IdentityForCmk { /* - * The ArmId of the user assigned identity that will be used to access the customer managed key vault + * UserAssignedIdentity to be used to fetch the encryption key from keyVault */ @JsonProperty(value = "userAssignedIdentity") private String userAssignedIdentity; - /** Creates an instance of IdentityForCmk class. */ + /** + * Creates an instance of IdentityForCmk class. + */ public IdentityForCmk() { } /** - * Get the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. - * + * Get the userAssignedIdentity property: UserAssignedIdentity to be used to fetch the encryption key from + * keyVault. + * * @return the userAssignedIdentity value. */ public String userAssignedIdentity() { @@ -31,9 +35,9 @@ public String userAssignedIdentity() { } /** - * Set the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. - * + * Set the userAssignedIdentity property: UserAssignedIdentity to be used to fetch the encryption key from + * keyVault. + * * @param userAssignedIdentity the userAssignedIdentity value to set. * @return the IdentityForCmk object itself. */ @@ -44,7 +48,7 @@ public IdentityForCmk withUserAssignedIdentity(String userAssignedIdentity) { /** * 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/IdleShutdownSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java new file mode 100644 index 0000000000000..d94447a2b6bc2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.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; + +/** + * Stops compute instance after user defined period of inactivity. + */ +@Fluent +public final class IdleShutdownSetting { + /* + * Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + */ + @JsonProperty(value = "idleTimeBeforeShutdown") + private String idleTimeBeforeShutdown; + + /** + * Creates an instance of IdleShutdownSetting class. + */ + public IdleShutdownSetting() { + } + + /** + * Get the idleTimeBeforeShutdown property: Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 + * days. + * + * @return the idleTimeBeforeShutdown value. + */ + public String idleTimeBeforeShutdown() { + return this.idleTimeBeforeShutdown; + } + + /** + * Set the idleTimeBeforeShutdown property: Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 + * days. + * + * @param idleTimeBeforeShutdown the idleTimeBeforeShutdown value to set. + * @return the IdleShutdownSetting object itself. + */ + public IdleShutdownSetting withIdleTimeBeforeShutdown(String idleTimeBeforeShutdown) { + this.idleTimeBeforeShutdown = idleTimeBeforeShutdown; + 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/Image.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java new file mode 100644 index 0000000000000..06aa920d018ea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java @@ -0,0 +1,155 @@ +// Copyright (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; + +/** + * The Image model. + */ +@Fluent +public final class Image { + /* + * Type of the image + * + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML Environment images + * (custom and curated) + */ + @JsonProperty(value = "type") + private ImageType type; + + /* + * Image reference URL if type is docker. Environment name if type is azureml + */ + @JsonProperty(value = "reference") + private String reference; + + /* + * Version of image being used. If latest then skip this field + */ + @JsonProperty(value = "version") + private String version; + + /* + * Dictionary of + */ + @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 Environment images + * (custom and curated). + * + * @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 Environment images + * (custom and curated). + * + * @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 URL if type is docker. Environment name if type is azureml. + * + * @return the reference value. + */ + public String reference() { + return this.reference; + } + + /** + * Set the reference property: Image reference URL if type is docker. Environment name if type is azureml. + * + * @param reference the reference value to set. + * @return the Image object itself. + */ + public Image withReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Get the version property: Version of image being used. If latest then skip this field. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of image being used. If latest then skip this field. + * + * @param version the version value to set. + * @return the Image object itself. + */ + public Image withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the additionalProperties property: Dictionary of <any>. + * + * @return the additionalProperties value. + */ + @JsonAnyGetter + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set the additionalProperties property: Dictionary of <any>. + * + * @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/ImageAnnotationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageAnnotationType.java new file mode 100644 index 0000000000000..89333914aa609 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageAnnotationType.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Annotation type of image data. + */ +public final class ImageAnnotationType extends ExpandableStringEnum { + /** + * Static value Classification for ImageAnnotationType. + */ + public static final ImageAnnotationType CLASSIFICATION = fromString("Classification"); + + /** + * Static value BoundingBox for ImageAnnotationType. + */ + public static final ImageAnnotationType BOUNDING_BOX = fromString("BoundingBox"); + + /** + * Static value InstanceSegmentation for ImageAnnotationType. + */ + public static final ImageAnnotationType INSTANCE_SEGMENTATION = fromString("InstanceSegmentation"); + + /** + * Creates a new instance of ImageAnnotationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ImageAnnotationType() { + } + + /** + * Creates or finds a ImageAnnotationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImageAnnotationType. + */ + @JsonCreator + public static ImageAnnotationType fromString(String name) { + return fromString(name, ImageAnnotationType.class); + } + + /** + * Gets known ImageAnnotationType values. + * + * @return known ImageAnnotationType values. + */ + public static Collection values() { + return values(ImageAnnotationType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java index 96f4c3e36fb1c..7e1f74ae08753 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java @@ -63,13 +63,15 @@ public final class ImageClassification extends AutoMLVertical { @JsonProperty(value = "validationDataSize") private Double validationDataSize; - /** Creates an instance of ImageClassification class. */ + /** + * Creates an instance of ImageClassification class. + */ public ImageClassification() { } /** * Get the primaryMetric property: Primary metric to optimize for this task. - * + * * @return the primaryMetric value. */ public ClassificationPrimaryMetrics primaryMetric() { @@ -78,7 +80,7 @@ public ClassificationPrimaryMetrics primaryMetric() { /** * Set the primaryMetric property: Primary metric to optimize for this task. - * + * * @param primaryMetric the primaryMetric value to set. * @return the ImageClassification object itself. */ @@ -89,7 +91,7 @@ public ImageClassification withPrimaryMetric(ClassificationPrimaryMetrics primar /** * Get the modelSettings property: Settings used for training the model. - * + * * @return the modelSettings value. */ public ImageModelSettingsClassification modelSettings() { @@ -98,7 +100,7 @@ public ImageModelSettingsClassification modelSettings() { /** * Set the modelSettings property: Settings used for training the model. - * + * * @param modelSettings the modelSettings value to set. * @return the ImageClassification object itself. */ @@ -110,7 +112,7 @@ public ImageClassification withModelSettings(ImageModelSettingsClassification mo /** * Get the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @return the searchSpace value. */ public List searchSpace() { @@ -120,7 +122,7 @@ public List searchSpace() { /** * Set the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @param searchSpace the searchSpace value to set. * @return the ImageClassification object itself. */ @@ -131,7 +133,7 @@ public ImageClassification withSearchSpace(List e.validate()); } if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassification")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property limitSettings in model ImageClassification")); } else { limitSettings().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java index b0042428c4cce..e249b63546110 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The ImageClassificationBase model. */ +/** + * The ImageClassificationBase model. + */ @Fluent public class ImageClassificationBase extends ImageVertical { /* @@ -23,13 +25,15 @@ public class ImageClassificationBase extends ImageVertical { @JsonProperty(value = "searchSpace") private List searchSpace; - /** Creates an instance of ImageClassificationBase class. */ + /** + * Creates an instance of ImageClassificationBase class. + */ public ImageClassificationBase() { } /** * Get the modelSettings property: Settings used for training the model. - * + * * @return the modelSettings value. */ public ImageModelSettingsClassification modelSettings() { @@ -38,7 +42,7 @@ public ImageModelSettingsClassification modelSettings() { /** * Set the modelSettings property: Settings used for training the model. - * + * * @param modelSettings the modelSettings value to set. * @return the ImageClassificationBase object itself. */ @@ -50,7 +54,7 @@ public ImageClassificationBase withModelSettings(ImageModelSettingsClassificatio /** * Get the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @return the searchSpace value. */ public List searchSpace() { @@ -60,7 +64,7 @@ public List searchSpace() { /** * Set the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @param searchSpace the searchSpace value to set. * @return the ImageClassificationBase object itself. */ @@ -69,28 +73,36 @@ public ImageClassificationBase withSearchSpace(List searchSpace() { @@ -120,19 +123,19 @@ public List searchSpace() { /** * Set the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @param searchSpace the searchSpace value to set. * @return the ImageClassificationMultilabel object itself. */ - public ImageClassificationMultilabel withSearchSpace( - List searchSpace) { + public ImageClassificationMultilabel + withSearchSpace(List searchSpace) { this.searchSpace = searchSpace; return this; } /** * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * + * * @return the limitSettings value. */ public ImageLimitSettings limitSettings() { @@ -141,7 +144,7 @@ public ImageLimitSettings limitSettings() { /** * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * + * * @param limitSettings the limitSettings value to set. * @return the ImageClassificationMultilabel object itself. */ @@ -152,7 +155,7 @@ public ImageClassificationMultilabel withLimitSettings(ImageLimitSettings limitS /** * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * + * * @return the sweepSettings value. */ public ImageSweepSettings sweepSettings() { @@ -161,7 +164,7 @@ public ImageSweepSettings sweepSettings() { /** * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * + * * @param sweepSettings the sweepSettings value to set. * @return the ImageClassificationMultilabel object itself. */ @@ -172,7 +175,7 @@ public ImageClassificationMultilabel withSweepSettings(ImageSweepSettings sweepS /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -181,7 +184,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the ImageClassificationMultilabel object itself. */ @@ -192,8 +195,10 @@ public ImageClassificationMultilabel withValidationData(MLTableJobInput validati /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the validationDataSize value. */ public Double validationDataSize() { @@ -202,8 +207,10 @@ public Double validationDataSize() { /** * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param validationDataSize the validationDataSize value to set. * @return the ImageClassificationMultilabel object itself. */ @@ -212,21 +219,27 @@ public ImageClassificationMultilabel withValidationDataSize(Double validationDat return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { super.withLogVerbosity(logVerbosity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageClassificationMultilabel withTargetColumnName(String targetColumnName) { super.withTargetColumnName(targetColumnName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { super.withTrainingData(trainingData); @@ -235,7 +248,7 @@ public ImageClassificationMultilabel withTrainingData(MLTableJobInput trainingDa /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -248,10 +261,8 @@ public void validate() { searchSpace().forEach(e -> e.validate()); } if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassificationMultilabel")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property limitSettings in model ImageClassificationMultilabel")); } else { limitSettings().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java index 83c6fb3614ba3..7ae00d110ba90 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java @@ -63,13 +63,15 @@ public final class ImageInstanceSegmentation extends AutoMLVertical { @JsonProperty(value = "validationDataSize") private Double validationDataSize; - /** Creates an instance of ImageInstanceSegmentation class. */ + /** + * Creates an instance of ImageInstanceSegmentation class. + */ public ImageInstanceSegmentation() { } /** * Get the primaryMetric property: Primary metric to optimize for this task. - * + * * @return the primaryMetric value. */ public InstanceSegmentationPrimaryMetrics primaryMetric() { @@ -78,7 +80,7 @@ public InstanceSegmentationPrimaryMetrics primaryMetric() { /** * Set the primaryMetric property: Primary metric to optimize for this task. - * + * * @param primaryMetric the primaryMetric value to set. * @return the ImageInstanceSegmentation object itself. */ @@ -89,7 +91,7 @@ public ImageInstanceSegmentation withPrimaryMetric(InstanceSegmentationPrimaryMe /** * Get the modelSettings property: Settings used for training the model. - * + * * @return the modelSettings value. */ public ImageModelSettingsObjectDetection modelSettings() { @@ -98,7 +100,7 @@ public ImageModelSettingsObjectDetection modelSettings() { /** * Set the modelSettings property: Settings used for training the model. - * + * * @param modelSettings the modelSettings value to set. * @return the ImageInstanceSegmentation object itself. */ @@ -110,7 +112,7 @@ public ImageInstanceSegmentation withModelSettings(ImageModelSettingsObjectDetec /** * Get the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @return the searchSpace value. */ public List searchSpace() { @@ -120,7 +122,7 @@ public List searchSpace() { /** * Set the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @param searchSpace the searchSpace value to set. * @return the ImageInstanceSegmentation object itself. */ @@ -131,7 +133,7 @@ public ImageInstanceSegmentation withSearchSpace(List e.validate()); } if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageInstanceSegmentation")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property limitSettings in model ImageInstanceSegmentation")); } else { limitSettings().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java index 3bacfabcce467..c542210077970 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; -/** Limit settings for the AutoML job. */ +/** + * Limit settings for the AutoML job. + */ @Fluent public final class ImageLimitSettings { /* @@ -29,13 +31,15 @@ public final class ImageLimitSettings { @JsonProperty(value = "timeout") private Duration timeout; - /** Creates an instance of ImageLimitSettings class. */ + /** + * Creates an instance of ImageLimitSettings class. + */ public ImageLimitSettings() { } /** * Get the maxConcurrentTrials property: Maximum number of concurrent AutoML iterations. - * + * * @return the maxConcurrentTrials value. */ public Integer maxConcurrentTrials() { @@ -44,7 +48,7 @@ public Integer maxConcurrentTrials() { /** * Set the maxConcurrentTrials property: Maximum number of concurrent AutoML iterations. - * + * * @param maxConcurrentTrials the maxConcurrentTrials value to set. * @return the ImageLimitSettings object itself. */ @@ -55,7 +59,7 @@ public ImageLimitSettings withMaxConcurrentTrials(Integer maxConcurrentTrials) { /** * Get the maxTrials property: Maximum number of AutoML iterations. - * + * * @return the maxTrials value. */ public Integer maxTrials() { @@ -64,7 +68,7 @@ public Integer maxTrials() { /** * Set the maxTrials property: Maximum number of AutoML iterations. - * + * * @param maxTrials the maxTrials value to set. * @return the ImageLimitSettings object itself. */ @@ -75,7 +79,7 @@ public ImageLimitSettings withMaxTrials(Integer maxTrials) { /** * Get the timeout property: AutoML job timeout. - * + * * @return the timeout value. */ public Duration timeout() { @@ -84,7 +88,7 @@ public Duration timeout() { /** * Set the timeout property: AutoML job timeout. - * + * * @param timeout the timeout value to set. * @return the ImageLimitSettings object itself. */ @@ -95,7 +99,7 @@ public ImageLimitSettings withTimeout(Duration timeout) { /** * 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..fbeac4c152615 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java @@ -0,0 +1,128 @@ +// Copyright (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; + + /* + * Metadata about the os patching. + */ + @JsonProperty(value = "osPatchingStatus", access = JsonProperty.Access.WRITE_ONLY) + private OsPatchingStatus osPatchingStatus; + + /** + * 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; + } + + /** + * Get the osPatchingStatus property: Metadata about the os patching. + * + * @return the osPatchingStatus value. + */ + public OsPatchingStatus osPatchingStatus() { + return this.osPatchingStatus; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (osPatchingStatus() != null) { + osPatchingStatus().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..8dbebef02d527 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,13 +8,19 @@ 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: - * 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> + * 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. */ @Fluent @@ -82,7 +88,7 @@ public class ImageModelDistributionSettings { private String evaluationFrequency; /* - * Gradient accumulation means running a configured number of "GradAccumulationStep"\ steps without + * Gradient accumulation means running a configured number of "GradAccumulationStep" steps without * updating the model weights while accumulating the gradients of those steps, and then using * the accumulated gradients to compute the weight updates. Must be a positive integer. */ @@ -196,13 +202,15 @@ public class ImageModelDistributionSettings { @JsonProperty(value = "weightDecay") private String weightDecay; - /** Creates an instance of ImageModelDistributionSettings class. */ + /** + * Creates an instance of ImageModelDistributionSettings class. + */ public ImageModelDistributionSettings() { } /** * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * + * * @return the amsGradient value. */ public String amsGradient() { @@ -211,7 +219,7 @@ public String amsGradient() { /** * Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * + * * @param amsGradient the amsGradient value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -222,7 +230,7 @@ public ImageModelDistributionSettings withAmsGradient(String amsGradient) { /** * Get the augmentations property: Settings for using Augmentations. - * + * * @return the augmentations value. */ public String augmentations() { @@ -231,7 +239,7 @@ public String augmentations() { /** * Set the augmentations property: Settings for using Augmentations. - * + * * @param augmentations the augmentations value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -243,7 +251,7 @@ public ImageModelDistributionSettings withAugmentations(String augmentations) { /** * Get the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, * 1]. - * + * * @return the beta1 value. */ public String beta1() { @@ -253,7 +261,7 @@ public String beta1() { /** * Set the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, * 1]. - * + * * @param beta1 the beta1 value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -265,7 +273,7 @@ public ImageModelDistributionSettings withBeta1(String beta1) { /** * Get the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, * 1]. - * + * * @return the beta2 value. */ public String beta2() { @@ -275,7 +283,7 @@ public String beta2() { /** * Set the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, * 1]. - * + * * @param beta2 the beta2 value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -286,7 +294,7 @@ public ImageModelDistributionSettings withBeta2(String beta2) { /** * Get the distributed property: Whether to use distributer training. - * + * * @return the distributed value. */ public String distributed() { @@ -295,7 +303,7 @@ public String distributed() { /** * Set the distributed property: Whether to use distributer training. - * + * * @param distributed the distributed value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -306,7 +314,7 @@ public ImageModelDistributionSettings withDistributed(String distributed) { /** * Get the earlyStopping property: Enable early stopping logic during training. - * + * * @return the earlyStopping value. */ public String earlyStopping() { @@ -315,7 +323,7 @@ public String earlyStopping() { /** * Set the earlyStopping property: Enable early stopping logic during training. - * + * * @param earlyStopping the earlyStopping value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -326,8 +334,9 @@ public ImageModelDistributionSettings withEarlyStopping(String earlyStopping) { /** * Get the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement is tracked for early stopping. Must be a positive integer. - * + * metric improvement + * is tracked for early stopping. Must be a positive integer. + * * @return the earlyStoppingDelay value. */ public String earlyStoppingDelay() { @@ -336,8 +345,9 @@ public String earlyStoppingDelay() { /** * Set the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement is tracked for early stopping. Must be a positive integer. - * + * metric improvement + * is tracked for early stopping. Must be a positive integer. + * * @param earlyStoppingDelay the earlyStoppingDelay value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -347,9 +357,10 @@ public ImageModelDistributionSettings withEarlyStoppingDelay(String earlyStoppin } /** - * Get the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before the run is stopped. Must be a positive integer. - * + * Get the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary + * metric improvement before + * the run is stopped. Must be a positive integer. + * * @return the earlyStoppingPatience value. */ public String earlyStoppingPatience() { @@ -357,9 +368,10 @@ public String earlyStoppingPatience() { } /** - * Set the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before the run is stopped. Must be a positive integer. - * + * Set the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary + * metric improvement before + * the run is stopped. Must be a positive integer. + * * @param earlyStoppingPatience the earlyStoppingPatience value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -370,7 +382,7 @@ public ImageModelDistributionSettings withEarlyStoppingPatience(String earlyStop /** * Get the enableOnnxNormalization property: Enable normalization when exporting ONNX model. - * + * * @return the enableOnnxNormalization value. */ public String enableOnnxNormalization() { @@ -379,7 +391,7 @@ public String enableOnnxNormalization() { /** * Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model. - * + * * @param enableOnnxNormalization the enableOnnxNormalization value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -391,7 +403,7 @@ public ImageModelDistributionSettings withEnableOnnxNormalization(String enableO /** * Get the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a * positive integer. - * + * * @return the evaluationFrequency value. */ public String evaluationFrequency() { @@ -401,7 +413,7 @@ public String evaluationFrequency() { /** * Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a * positive integer. - * + * * @param evaluationFrequency the evaluationFrequency value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -412,9 +424,10 @@ public ImageModelDistributionSettings withEvaluationFrequency(String evaluationF /** * Get the gradientAccumulationStep property: Gradient accumulation means running a configured number of - * "GradAccumulationStep"\ steps without updating the model weights while accumulating the gradients of those steps, - * and then using the accumulated gradients to compute the weight updates. Must be a positive integer. - * + * "GradAccumulationStep" steps without + * updating the model weights while accumulating the gradients of those steps, and then using + * the accumulated gradients to compute the weight updates. Must be a positive integer. + * * @return the gradientAccumulationStep value. */ public String gradientAccumulationStep() { @@ -423,9 +436,10 @@ public String gradientAccumulationStep() { /** * Set the gradientAccumulationStep property: Gradient accumulation means running a configured number of - * "GradAccumulationStep"\ steps without updating the model weights while accumulating the gradients of those steps, - * and then using the accumulated gradients to compute the weight updates. Must be a positive integer. - * + * "GradAccumulationStep" steps without + * updating the model weights while accumulating the gradients of those steps, and then using + * the accumulated gradients to compute the weight updates. Must be a positive integer. + * * @param gradientAccumulationStep the gradientAccumulationStep value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -435,11 +449,11 @@ public ImageModelDistributionSettings withGradientAccumulationStep(String gradie } /** - * Get the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. For - * instance, passing 2 as value for 'seresnext' means freezing layer0 and layer1. For a full list of models - * supported and details on layer freeze, please see: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * + * Get the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. + * For instance, passing 2 as value for 'seresnext' means + * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please + * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + * * @return the layersToFreeze value. */ public String layersToFreeze() { @@ -447,11 +461,11 @@ public String layersToFreeze() { } /** - * Set the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. For - * instance, passing 2 as value for 'seresnext' means freezing layer0 and layer1. For a full list of models - * supported and details on layer freeze, please see: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * + * Set the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. + * For instance, passing 2 as value for 'seresnext' means + * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please + * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + * * @param layersToFreeze the layersToFreeze value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -462,7 +476,7 @@ public ImageModelDistributionSettings withLayersToFreeze(String layersToFreeze) /** * Get the learningRate property: Initial learning rate. Must be a float in the range [0, 1]. - * + * * @return the learningRate value. */ public String learningRate() { @@ -471,7 +485,7 @@ public String learningRate() { /** * Set the learningRate property: Initial learning rate. Must be a float in the range [0, 1]. - * + * * @param learningRate the learningRate value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -482,7 +496,7 @@ public ImageModelDistributionSettings withLearningRate(String learningRate) { /** * Get the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - * + * * @return the learningRateScheduler value. */ public String learningRateScheduler() { @@ -491,7 +505,7 @@ public String learningRateScheduler() { /** * Set the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - * + * * @param learningRateScheduler the learningRateScheduler value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -501,10 +515,10 @@ public ImageModelDistributionSettings withLearningRateScheduler(String learningR } /** - * Get the modelName property: Name of the model to use for training. For more information on the available models - * please visit the official documentation: + * Get the modelName property: Name of the model to use for training. + * For more information on the available models please visit the official documentation: * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * + * * @return the modelName value. */ public String modelName() { @@ -512,10 +526,10 @@ public String modelName() { } /** - * Set the modelName property: Name of the model to use for training. For more information on the available models - * please visit the official documentation: + * Set the modelName property: Name of the model to use for training. + * For more information on the available models please visit the official documentation: * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * + * * @param modelName the modelName value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -526,7 +540,7 @@ public ImageModelDistributionSettings withModelName(String modelName) { /** * Get the momentum property: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - * + * * @return the momentum value. */ public String momentum() { @@ -535,7 +549,7 @@ public String momentum() { /** * Set the momentum property: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - * + * * @param momentum the momentum value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -546,7 +560,7 @@ public ImageModelDistributionSettings withMomentum(String momentum) { /** * Get the nesterov property: Enable nesterov when optimizer is 'sgd'. - * + * * @return the nesterov value. */ public String nesterov() { @@ -555,7 +569,7 @@ public String nesterov() { /** * Set the nesterov property: Enable nesterov when optimizer is 'sgd'. - * + * * @param nesterov the nesterov value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -566,7 +580,7 @@ public ImageModelDistributionSettings withNesterov(String nesterov) { /** * Get the numberOfEpochs property: Number of training epochs. Must be a positive integer. - * + * * @return the numberOfEpochs value. */ public String numberOfEpochs() { @@ -575,7 +589,7 @@ public String numberOfEpochs() { /** * Set the numberOfEpochs property: Number of training epochs. Must be a positive integer. - * + * * @param numberOfEpochs the numberOfEpochs value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -586,7 +600,7 @@ public ImageModelDistributionSettings withNumberOfEpochs(String numberOfEpochs) /** * Get the numberOfWorkers property: Number of data loader workers. Must be a non-negative integer. - * + * * @return the numberOfWorkers value. */ public String numberOfWorkers() { @@ -595,7 +609,7 @@ public String numberOfWorkers() { /** * Set the numberOfWorkers property: Number of data loader workers. Must be a non-negative integer. - * + * * @param numberOfWorkers the numberOfWorkers value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -606,7 +620,7 @@ public ImageModelDistributionSettings withNumberOfWorkers(String numberOfWorkers /** * Get the optimizer property: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - * + * * @return the optimizer value. */ public String optimizer() { @@ -615,7 +629,7 @@ public String optimizer() { /** * Set the optimizer property: Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - * + * * @param optimizer the optimizer value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -626,7 +640,7 @@ public ImageModelDistributionSettings withOptimizer(String optimizer) { /** * Get the randomSeed property: Random seed to be used when using deterministic training. - * + * * @return the randomSeed value. */ public String randomSeed() { @@ -635,7 +649,7 @@ public String randomSeed() { /** * Set the randomSeed property: Random seed to be used when using deterministic training. - * + * * @param randomSeed the randomSeed value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -645,9 +659,9 @@ public ImageModelDistributionSettings withRandomSeed(String randomSeed) { } /** - * Get the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * + * Get the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the + * range [0, 1]. + * * @return the stepLRGamma value. */ public String stepLRGamma() { @@ -655,9 +669,9 @@ public String stepLRGamma() { } /** - * Set the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * + * Set the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the + * range [0, 1]. + * * @param stepLRGamma the stepLRGamma value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -669,7 +683,7 @@ public ImageModelDistributionSettings withStepLRGamma(String stepLRGamma) { /** * Get the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive * integer. - * + * * @return the stepLRStepSize value. */ public String stepLRStepSize() { @@ -679,7 +693,7 @@ public String stepLRStepSize() { /** * Set the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive * integer. - * + * * @param stepLRStepSize the stepLRStepSize value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -690,7 +704,7 @@ public ImageModelDistributionSettings withStepLRStepSize(String stepLRStepSize) /** * Get the trainingBatchSize property: Training batch size. Must be a positive integer. - * + * * @return the trainingBatchSize value. */ public String trainingBatchSize() { @@ -699,7 +713,7 @@ public String trainingBatchSize() { /** * Set the trainingBatchSize property: Training batch size. Must be a positive integer. - * + * * @param trainingBatchSize the trainingBatchSize value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -710,7 +724,7 @@ public ImageModelDistributionSettings withTrainingBatchSize(String trainingBatch /** * Get the validationBatchSize property: Validation batch size. Must be a positive integer. - * + * * @return the validationBatchSize value. */ public String validationBatchSize() { @@ -719,7 +733,7 @@ public String validationBatchSize() { /** * Set the validationBatchSize property: Validation batch size. Must be a positive integer. - * + * * @param validationBatchSize the validationBatchSize value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -731,7 +745,7 @@ public ImageModelDistributionSettings withValidationBatchSize(String validationB /** * Get the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. * Must be a float in the range [0, 1]. - * + * * @return the warmupCosineLRCycles value. */ public String warmupCosineLRCycles() { @@ -741,7 +755,7 @@ public String warmupCosineLRCycles() { /** * Set the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. * Must be a float in the range [0, 1]. - * + * * @param warmupCosineLRCycles the warmupCosineLRCycles value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -753,7 +767,7 @@ public ImageModelDistributionSettings withWarmupCosineLRCycles(String warmupCosi /** * Get the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is * 'warmup_cosine'. Must be a positive integer. - * + * * @return the warmupCosineLRWarmupEpochs value. */ public String warmupCosineLRWarmupEpochs() { @@ -763,7 +777,7 @@ public String warmupCosineLRWarmupEpochs() { /** * Set the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is * 'warmup_cosine'. Must be a positive integer. - * + * * @param warmupCosineLRWarmupEpochs the warmupCosineLRWarmupEpochs value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -775,7 +789,7 @@ public ImageModelDistributionSettings withWarmupCosineLRWarmupEpochs(String warm /** * Get the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float * in the range[0, 1]. - * + * * @return the weightDecay value. */ public String weightDecay() { @@ -785,7 +799,7 @@ public String weightDecay() { /** * Set the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float * in the range[0, 1]. - * + * * @param weightDecay the weightDecay value to set. * @return the ImageModelDistributionSettings object itself. */ @@ -796,7 +810,7 @@ public ImageModelDistributionSettings withWeightDecay(String weightDecay) { /** * 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/ImageModelDistributionSettingsClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java index 5615072d44375..060077a5db53d 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,17 @@ 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 @@ -42,14 +48,16 @@ public final class ImageModelDistributionSettingsClassification extends ImageMod @JsonProperty(value = "weightedLoss") private String weightedLoss; - /** Creates an instance of ImageModelDistributionSettingsClassification class. */ + /** + * Creates an instance of ImageModelDistributionSettingsClassification class. + */ public ImageModelDistributionSettingsClassification() { } /** * Get the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. * Must be a positive integer. - * + * * @return the trainingCropSize value. */ public String trainingCropSize() { @@ -59,7 +67,7 @@ public String trainingCropSize() { /** * Set the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. * Must be a positive integer. - * + * * @param trainingCropSize the trainingCropSize value to set. * @return the ImageModelDistributionSettingsClassification object itself. */ @@ -71,7 +79,7 @@ public ImageModelDistributionSettingsClassification withTrainingCropSize(String /** * Get the validationCropSize property: Image crop size that is input to the neural network for the validation * dataset. Must be a positive integer. - * + * * @return the validationCropSize value. */ public String validationCropSize() { @@ -81,7 +89,7 @@ public String validationCropSize() { /** * Set the validationCropSize property: Image crop size that is input to the neural network for the validation * dataset. Must be a positive integer. - * + * * @param validationCropSize the validationCropSize value to set. * @return the ImageModelDistributionSettingsClassification object itself. */ @@ -91,9 +99,9 @@ public ImageModelDistributionSettingsClassification withValidationCropSize(Strin } /** - * Get the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * + * Get the validationResizeSize property: Image size to which to resize before cropping for validation dataset. + * Must be a positive integer. + * * @return the validationResizeSize value. */ public String validationResizeSize() { @@ -101,9 +109,9 @@ public String validationResizeSize() { } /** - * Set the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * + * Set the validationResizeSize property: Image size to which to resize before cropping for validation dataset. + * Must be a positive integer. + * * @param validationResizeSize the validationResizeSize value to set. * @return the ImageModelDistributionSettingsClassification object itself. */ @@ -113,9 +121,9 @@ public ImageModelDistributionSettingsClassification withValidationResizeSize(Str } /** - * Get the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss - * with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * + * Get the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. + * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. + * * @return the weightedLoss value. */ public String weightedLoss() { @@ -123,9 +131,9 @@ public String weightedLoss() { } /** - * Set the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss - * with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * + * Set the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. + * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. + * * @param weightedLoss the weightedLoss value to set. * @return the ImageModelDistributionSettingsClassification object itself. */ @@ -134,197 +142,253 @@ public ImageModelDistributionSettingsClassification withWeightedLoss(String weig return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withAmsGradient(String amsGradient) { super.withAmsGradient(amsGradient); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withAugmentations(String augmentations) { super.withAugmentations(augmentations); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withBeta1(String beta1) { super.withBeta1(beta1); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withBeta2(String beta2) { super.withBeta2(beta2); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withDistributed(String distributed) { super.withDistributed(distributed); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withEarlyStopping(String earlyStopping) { super.withEarlyStopping(earlyStopping); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withEarlyStoppingDelay(String earlyStoppingDelay) { super.withEarlyStoppingDelay(earlyStoppingDelay); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withEarlyStoppingPatience(String earlyStoppingPatience) { super.withEarlyStoppingPatience(earlyStoppingPatience); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withEnableOnnxNormalization(String enableOnnxNormalization) { super.withEnableOnnxNormalization(enableOnnxNormalization); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withEvaluationFrequency(String evaluationFrequency) { super.withEvaluationFrequency(evaluationFrequency); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withGradientAccumulationStep(String gradientAccumulationStep) { super.withGradientAccumulationStep(gradientAccumulationStep); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withLayersToFreeze(String layersToFreeze) { super.withLayersToFreeze(layersToFreeze); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withLearningRate(String learningRate) { super.withLearningRate(learningRate); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withLearningRateScheduler(String learningRateScheduler) { super.withLearningRateScheduler(learningRateScheduler); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withModelName(String modelName) { super.withModelName(modelName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withMomentum(String momentum) { super.withMomentum(momentum); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withNesterov(String nesterov) { super.withNesterov(nesterov); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withNumberOfEpochs(String numberOfEpochs) { super.withNumberOfEpochs(numberOfEpochs); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withNumberOfWorkers(String numberOfWorkers) { super.withNumberOfWorkers(numberOfWorkers); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withOptimizer(String optimizer) { super.withOptimizer(optimizer); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withRandomSeed(String randomSeed) { super.withRandomSeed(randomSeed); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withStepLRGamma(String stepLRGamma) { super.withStepLRGamma(stepLRGamma); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withStepLRStepSize(String stepLRStepSize) { super.withStepLRStepSize(stepLRStepSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withTrainingBatchSize(String trainingBatchSize) { super.withTrainingBatchSize(trainingBatchSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withValidationBatchSize(String validationBatchSize) { super.withValidationBatchSize(validationBatchSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withWarmupCosineLRCycles(String warmupCosineLRCycles) { super.withWarmupCosineLRCycles(warmupCosineLRCycles); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public ImageModelDistributionSettingsClassification withWarmupCosineLRWarmupEpochs( - String warmupCosineLRWarmupEpochs) { + public ImageModelDistributionSettingsClassification + withWarmupCosineLRWarmupEpochs(String warmupCosineLRWarmupEpochs) { super.withWarmupCosineLRWarmupEpochs(warmupCosineLRWarmupEpochs); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsClassification withWeightDecay(String weightDecay) { super.withWeightDecay(weightDecay); @@ -333,7 +397,7 @@ public ImageModelDistributionSettingsClassification withWeightDecay(String weigh /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..ec680dd12c44d 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,17 @@ 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 @@ -113,14 +119,17 @@ public final class ImageModelDistributionSettingsObjectDetection extends ImageMo @JsonProperty(value = "validationMetricType") private String validationMetricType; - /** Creates an instance of ImageModelDistributionSettingsObjectDetection class. */ + /** + * Creates an instance of ImageModelDistributionSettingsObjectDetection class. + */ public ImageModelDistributionSettingsObjectDetection() { } /** * Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. - * + * positive integer. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the boxDetectionsPerImage value. */ public String boxDetectionsPerImage() { @@ -129,8 +138,9 @@ public String boxDetectionsPerImage() { /** * Set the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. - * + * positive integer. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param boxDetectionsPerImage the boxDetectionsPerImage value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -141,8 +151,9 @@ public ImageModelDistributionSettingsObjectDetection withBoxDetectionsPerImage(S /** * Get the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than BoxScoreThreshold. Must be a float in the range[0, 1]. - * + * than + * BoxScoreThreshold. Must be a float in the range[0, 1]. + * * @return the boxScoreThreshold value. */ public String boxScoreThreshold() { @@ -151,8 +162,9 @@ public String boxScoreThreshold() { /** * Set the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than BoxScoreThreshold. Must be a float in the range[0, 1]. - * + * than + * BoxScoreThreshold. Must be a float in the range[0, 1]. + * * @param boxScoreThreshold the boxScoreThreshold value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -162,10 +174,10 @@ public ImageModelDistributionSettingsObjectDetection withBoxScoreThreshold(Strin } /** - * Get the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training - * run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' - * algorithm. - * + * Get the imageSize property: Image size for train and validation. Must be a positive integer. + * Note: The training run may get into CUDA OOM if the size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @return the imageSize value. */ public String imageSize() { @@ -173,10 +185,10 @@ public String imageSize() { } /** - * Set the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training - * run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' - * algorithm. - * + * Set the imageSize property: Image size for train and validation. Must be a positive integer. + * Note: The training run may get into CUDA OOM if the size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @param imageSize the imageSize value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -186,10 +198,10 @@ public ImageModelDistributionSettingsObjectDetection withImageSize(String imageS } /** - * Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the maxSize value. */ public String maxSize() { @@ -197,10 +209,10 @@ public String maxSize() { } /** - * Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param maxSize the maxSize value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -210,10 +222,10 @@ public ImageModelDistributionSettingsObjectDetection withMaxSize(String maxSize) } /** - * Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the minSize value. */ public String minSize() { @@ -221,10 +233,10 @@ public String minSize() { } /** - * Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param minSize the minSize value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -234,9 +246,10 @@ public ImageModelDistributionSettingsObjectDetection withMinSize(String minSize) } /** - * Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may - * get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. - * + * Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. + * Note: training run may get into CUDA OOM if the model size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @return the modelSize value. */ public String modelSize() { @@ -244,9 +257,10 @@ public String modelSize() { } /** - * Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may - * get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. - * + * Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. + * Note: training run may get into CUDA OOM if the model size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @param modelSize the modelSize value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -256,9 +270,10 @@ public ImageModelDistributionSettingsObjectDetection withModelSize(String modelS } /** - * Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may - * get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. - * + * Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%. + * Note: training run may get into CUDA OOM if no sufficient GPU memory. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @return the multiScale value. */ public String multiScale() { @@ -266,9 +281,10 @@ public String multiScale() { } /** - * Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may - * get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. - * + * Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%. + * Note: training run may get into CUDA OOM if no sufficient GPU memory. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @param multiScale the multiScale value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -280,7 +296,7 @@ public ImageModelDistributionSettingsObjectDetection withMultiScale(String multi /** * Get the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be float in * the range [0, 1]. - * + * * @return the nmsIouThreshold value. */ public String nmsIouThreshold() { @@ -290,7 +306,7 @@ public String nmsIouThreshold() { /** * Set the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be float in * the range [0, 1]. - * + * * @param nmsIouThreshold the nmsIouThreshold value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -300,10 +316,10 @@ public ImageModelDistributionSettingsObjectDetection withNmsIouThreshold(String } /** - * Get the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to - * enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Get the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be + * None to enable small object detection logic. A string containing two integers in mxn format. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the tileGridSize value. */ public String tileGridSize() { @@ -311,10 +327,10 @@ public String tileGridSize() { } /** - * Set the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to - * enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Set the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be + * None to enable small object detection logic. A string containing two integers in mxn format. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param tileGridSize the tileGridSize value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -325,8 +341,9 @@ public ImageModelDistributionSettingsObjectDetection withTileGridSize(String til /** * Get the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm. - * + * range [0, 1). + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the tileOverlapRatio value. */ public String tileOverlapRatio() { @@ -335,8 +352,9 @@ public String tileOverlapRatio() { /** * Set the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm. - * + * range [0, 1). + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param tileOverlapRatio the tileOverlapRatio value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -347,9 +365,11 @@ public ImageModelDistributionSettingsObjectDetection withTileOverlapRatio(String /** * Get the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is - * not supported for the 'yolov5' algorithm. NMS: Non-maximum suppression. - * + * from tiles and image. + * Used in validation/ inference. Must be float in the range [0, 1]. + * Note: This settings is not supported for the 'yolov5' algorithm. + * NMS: Non-maximum suppression. + * * @return the tilePredictionsNmsThreshold value. */ public String tilePredictionsNmsThreshold() { @@ -358,14 +378,16 @@ public String tilePredictionsNmsThreshold() { /** * Set the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is - * not supported for the 'yolov5' algorithm. NMS: Non-maximum suppression. - * + * from tiles and image. + * Used in validation/ inference. Must be float in the range [0, 1]. + * Note: This settings is not supported for the 'yolov5' algorithm. + * NMS: Non-maximum suppression. + * * @param tilePredictionsNmsThreshold the tilePredictionsNmsThreshold value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ - public ImageModelDistributionSettingsObjectDetection withTilePredictionsNmsThreshold( - String tilePredictionsNmsThreshold) { + public ImageModelDistributionSettingsObjectDetection + withTilePredictionsNmsThreshold(String tilePredictionsNmsThreshold) { this.tilePredictionsNmsThreshold = tilePredictionsNmsThreshold; return this; } @@ -373,7 +395,7 @@ public ImageModelDistributionSettingsObjectDetection withTilePredictionsNmsThres /** * Get the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in * the range [0, 1]. - * + * * @return the validationIouThreshold value. */ public String validationIouThreshold() { @@ -383,7 +405,7 @@ public String validationIouThreshold() { /** * Set the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in * the range [0, 1]. - * + * * @param validationIouThreshold the validationIouThreshold value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -395,7 +417,7 @@ public ImageModelDistributionSettingsObjectDetection withValidationIouThreshold( /** * Get the validationMetricType property: Metric computation method to use for validation metrics. Must be 'none', * 'coco', 'voc', or 'coco_voc'. - * + * * @return the validationMetricType value. */ public String validationMetricType() { @@ -405,7 +427,7 @@ public String validationMetricType() { /** * Set the validationMetricType property: Metric computation method to use for validation metrics. Must be 'none', * 'coco', 'voc', or 'coco_voc'. - * + * * @param validationMetricType the validationMetricType value to set. * @return the ImageModelDistributionSettingsObjectDetection object itself. */ @@ -414,197 +436,253 @@ public ImageModelDistributionSettingsObjectDetection withValidationMetricType(St return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withAmsGradient(String amsGradient) { super.withAmsGradient(amsGradient); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withAugmentations(String augmentations) { super.withAugmentations(augmentations); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withBeta1(String beta1) { super.withBeta1(beta1); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withBeta2(String beta2) { super.withBeta2(beta2); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withDistributed(String distributed) { super.withDistributed(distributed); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withEarlyStopping(String earlyStopping) { super.withEarlyStopping(earlyStopping); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withEarlyStoppingDelay(String earlyStoppingDelay) { super.withEarlyStoppingDelay(earlyStoppingDelay); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withEarlyStoppingPatience(String earlyStoppingPatience) { super.withEarlyStoppingPatience(earlyStoppingPatience); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withEnableOnnxNormalization(String enableOnnxNormalization) { super.withEnableOnnxNormalization(enableOnnxNormalization); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withEvaluationFrequency(String evaluationFrequency) { super.withEvaluationFrequency(evaluationFrequency); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withGradientAccumulationStep(String gradientAccumulationStep) { super.withGradientAccumulationStep(gradientAccumulationStep); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withLayersToFreeze(String layersToFreeze) { super.withLayersToFreeze(layersToFreeze); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withLearningRate(String learningRate) { super.withLearningRate(learningRate); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withLearningRateScheduler(String learningRateScheduler) { super.withLearningRateScheduler(learningRateScheduler); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withModelName(String modelName) { super.withModelName(modelName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withMomentum(String momentum) { super.withMomentum(momentum); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withNesterov(String nesterov) { super.withNesterov(nesterov); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withNumberOfEpochs(String numberOfEpochs) { super.withNumberOfEpochs(numberOfEpochs); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withNumberOfWorkers(String numberOfWorkers) { super.withNumberOfWorkers(numberOfWorkers); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withOptimizer(String optimizer) { super.withOptimizer(optimizer); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withRandomSeed(String randomSeed) { super.withRandomSeed(randomSeed); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withStepLRGamma(String stepLRGamma) { super.withStepLRGamma(stepLRGamma); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withStepLRStepSize(String stepLRStepSize) { super.withStepLRStepSize(stepLRStepSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withTrainingBatchSize(String trainingBatchSize) { super.withTrainingBatchSize(trainingBatchSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withValidationBatchSize(String validationBatchSize) { super.withValidationBatchSize(validationBatchSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withWarmupCosineLRCycles(String warmupCosineLRCycles) { super.withWarmupCosineLRCycles(warmupCosineLRCycles); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public ImageModelDistributionSettingsObjectDetection withWarmupCosineLRWarmupEpochs( - String warmupCosineLRWarmupEpochs) { + public ImageModelDistributionSettingsObjectDetection + withWarmupCosineLRWarmupEpochs(String warmupCosineLRWarmupEpochs) { super.withWarmupCosineLRWarmupEpochs(warmupCosineLRWarmupEpochs); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelDistributionSettingsObjectDetection withWeightDecay(String weightDecay) { super.withWeightDecay(weightDecay); @@ -613,7 +691,7 @@ public ImageModelDistributionSettingsObjectDetection withWeightDecay(String weig /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java index bd105b216e35e..f7ba5ab19f51a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java @@ -8,8 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Settings used for training the model. 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. + * Settings used for training the model. + * 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 public class ImageModelSettings { @@ -100,7 +101,7 @@ public class ImageModelSettings { private Integer evaluationFrequency; /* - * Gradient accumulation means running a configured number of "GradAccumulationStep"\ steps without + * Gradient accumulation means running a configured number of "GradAccumulationStep" steps without * updating the model weights while accumulating the gradients of those steps, and then using * the accumulated gradients to compute the weight updates. Must be a positive integer. */ @@ -214,13 +215,15 @@ public class ImageModelSettings { @JsonProperty(value = "weightDecay") private Float weightDecay; - /** Creates an instance of ImageModelSettings class. */ + /** + * Creates an instance of ImageModelSettings class. + */ public ImageModelSettings() { } /** * Get the advancedSettings property: Settings for advanced scenarios. - * + * * @return the advancedSettings value. */ public String advancedSettings() { @@ -229,7 +232,7 @@ public String advancedSettings() { /** * Set the advancedSettings property: Settings for advanced scenarios. - * + * * @param advancedSettings the advancedSettings value to set. * @return the ImageModelSettings object itself. */ @@ -240,7 +243,7 @@ public ImageModelSettings withAdvancedSettings(String advancedSettings) { /** * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * + * * @return the amsGradient value. */ public Boolean amsGradient() { @@ -249,7 +252,7 @@ public Boolean amsGradient() { /** * Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * + * * @param amsGradient the amsGradient value to set. * @return the ImageModelSettings object itself. */ @@ -260,7 +263,7 @@ public ImageModelSettings withAmsGradient(Boolean amsGradient) { /** * Get the augmentations property: Settings for using Augmentations. - * + * * @return the augmentations value. */ public String augmentations() { @@ -269,7 +272,7 @@ public String augmentations() { /** * Set the augmentations property: Settings for using Augmentations. - * + * * @param augmentations the augmentations value to set. * @return the ImageModelSettings object itself. */ @@ -281,7 +284,7 @@ public ImageModelSettings withAugmentations(String augmentations) { /** * Get the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, * 1]. - * + * * @return the beta1 value. */ public Float beta1() { @@ -291,7 +294,7 @@ public Float beta1() { /** * Set the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, * 1]. - * + * * @param beta1 the beta1 value to set. * @return the ImageModelSettings object itself. */ @@ -303,7 +306,7 @@ public ImageModelSettings withBeta1(Float beta1) { /** * Get the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, * 1]. - * + * * @return the beta2 value. */ public Float beta2() { @@ -313,7 +316,7 @@ public Float beta2() { /** * Set the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, * 1]. - * + * * @param beta2 the beta2 value to set. * @return the ImageModelSettings object itself. */ @@ -324,7 +327,7 @@ public ImageModelSettings withBeta2(Float beta2) { /** * Get the checkpointFrequency property: Frequency to store model checkpoints. Must be a positive integer. - * + * * @return the checkpointFrequency value. */ public Integer checkpointFrequency() { @@ -333,7 +336,7 @@ public Integer checkpointFrequency() { /** * Set the checkpointFrequency property: Frequency to store model checkpoints. Must be a positive integer. - * + * * @param checkpointFrequency the checkpointFrequency value to set. * @return the ImageModelSettings object itself. */ @@ -344,7 +347,7 @@ public ImageModelSettings withCheckpointFrequency(Integer checkpointFrequency) { /** * Get the checkpointModel property: The pretrained checkpoint model for incremental training. - * + * * @return the checkpointModel value. */ public MLFlowModelJobInput checkpointModel() { @@ -353,7 +356,7 @@ public MLFlowModelJobInput checkpointModel() { /** * Set the checkpointModel property: The pretrained checkpoint model for incremental training. - * + * * @param checkpointModel the checkpointModel value to set. * @return the ImageModelSettings object itself. */ @@ -365,7 +368,7 @@ public ImageModelSettings withCheckpointModel(MLFlowModelJobInput checkpointMode /** * Get the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental * training. - * + * * @return the checkpointRunId value. */ public String checkpointRunId() { @@ -375,7 +378,7 @@ public String checkpointRunId() { /** * Set the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental * training. - * + * * @param checkpointRunId the checkpointRunId value to set. * @return the ImageModelSettings object itself. */ @@ -386,7 +389,7 @@ public ImageModelSettings withCheckpointRunId(String checkpointRunId) { /** * Get the distributed property: Whether to use distributed training. - * + * * @return the distributed value. */ public Boolean distributed() { @@ -395,7 +398,7 @@ public Boolean distributed() { /** * Set the distributed property: Whether to use distributed training. - * + * * @param distributed the distributed value to set. * @return the ImageModelSettings object itself. */ @@ -406,7 +409,7 @@ public ImageModelSettings withDistributed(Boolean distributed) { /** * Get the earlyStopping property: Enable early stopping logic during training. - * + * * @return the earlyStopping value. */ public Boolean earlyStopping() { @@ -415,7 +418,7 @@ public Boolean earlyStopping() { /** * Set the earlyStopping property: Enable early stopping logic during training. - * + * * @param earlyStopping the earlyStopping value to set. * @return the ImageModelSettings object itself. */ @@ -426,8 +429,9 @@ public ImageModelSettings withEarlyStopping(Boolean earlyStopping) { /** * Get the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement is tracked for early stopping. Must be a positive integer. - * + * metric improvement + * is tracked for early stopping. Must be a positive integer. + * * @return the earlyStoppingDelay value. */ public Integer earlyStoppingDelay() { @@ -436,8 +440,9 @@ public Integer earlyStoppingDelay() { /** * Set the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement is tracked for early stopping. Must be a positive integer. - * + * metric improvement + * is tracked for early stopping. Must be a positive integer. + * * @param earlyStoppingDelay the earlyStoppingDelay value to set. * @return the ImageModelSettings object itself. */ @@ -447,9 +452,10 @@ public ImageModelSettings withEarlyStoppingDelay(Integer earlyStoppingDelay) { } /** - * Get the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before the run is stopped. Must be a positive integer. - * + * Get the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary + * metric improvement before + * the run is stopped. Must be a positive integer. + * * @return the earlyStoppingPatience value. */ public Integer earlyStoppingPatience() { @@ -457,9 +463,10 @@ public Integer earlyStoppingPatience() { } /** - * Set the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before the run is stopped. Must be a positive integer. - * + * Set the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary + * metric improvement before + * the run is stopped. Must be a positive integer. + * * @param earlyStoppingPatience the earlyStoppingPatience value to set. * @return the ImageModelSettings object itself. */ @@ -470,7 +477,7 @@ public ImageModelSettings withEarlyStoppingPatience(Integer earlyStoppingPatienc /** * Get the enableOnnxNormalization property: Enable normalization when exporting ONNX model. - * + * * @return the enableOnnxNormalization value. */ public Boolean enableOnnxNormalization() { @@ -479,7 +486,7 @@ public Boolean enableOnnxNormalization() { /** * Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model. - * + * * @param enableOnnxNormalization the enableOnnxNormalization value to set. * @return the ImageModelSettings object itself. */ @@ -491,7 +498,7 @@ public ImageModelSettings withEnableOnnxNormalization(Boolean enableOnnxNormaliz /** * Get the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a * positive integer. - * + * * @return the evaluationFrequency value. */ public Integer evaluationFrequency() { @@ -501,7 +508,7 @@ public Integer evaluationFrequency() { /** * Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a * positive integer. - * + * * @param evaluationFrequency the evaluationFrequency value to set. * @return the ImageModelSettings object itself. */ @@ -512,9 +519,10 @@ public ImageModelSettings withEvaluationFrequency(Integer evaluationFrequency) { /** * Get the gradientAccumulationStep property: Gradient accumulation means running a configured number of - * "GradAccumulationStep"\ steps without updating the model weights while accumulating the gradients of those steps, - * and then using the accumulated gradients to compute the weight updates. Must be a positive integer. - * + * "GradAccumulationStep" steps without + * updating the model weights while accumulating the gradients of those steps, and then using + * the accumulated gradients to compute the weight updates. Must be a positive integer. + * * @return the gradientAccumulationStep value. */ public Integer gradientAccumulationStep() { @@ -523,9 +531,10 @@ public Integer gradientAccumulationStep() { /** * Set the gradientAccumulationStep property: Gradient accumulation means running a configured number of - * "GradAccumulationStep"\ steps without updating the model weights while accumulating the gradients of those steps, - * and then using the accumulated gradients to compute the weight updates. Must be a positive integer. - * + * "GradAccumulationStep" steps without + * updating the model weights while accumulating the gradients of those steps, and then using + * the accumulated gradients to compute the weight updates. Must be a positive integer. + * * @param gradientAccumulationStep the gradientAccumulationStep value to set. * @return the ImageModelSettings object itself. */ @@ -535,11 +544,11 @@ public ImageModelSettings withGradientAccumulationStep(Integer gradientAccumulat } /** - * Get the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. For - * instance, passing 2 as value for 'seresnext' means freezing layer0 and layer1. For a full list of models - * supported and details on layer freeze, please see: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * + * Get the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. + * For instance, passing 2 as value for 'seresnext' means + * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please + * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + * * @return the layersToFreeze value. */ public Integer layersToFreeze() { @@ -547,11 +556,11 @@ public Integer layersToFreeze() { } /** - * Set the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. For - * instance, passing 2 as value for 'seresnext' means freezing layer0 and layer1. For a full list of models - * supported and details on layer freeze, please see: - * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * + * Set the layersToFreeze property: Number of layers to freeze for the model. Must be a positive integer. + * For instance, passing 2 as value for 'seresnext' means + * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please + * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + * * @param layersToFreeze the layersToFreeze value to set. * @return the ImageModelSettings object itself. */ @@ -562,7 +571,7 @@ public ImageModelSettings withLayersToFreeze(Integer layersToFreeze) { /** * Get the learningRate property: Initial learning rate. Must be a float in the range [0, 1]. - * + * * @return the learningRate value. */ public Float learningRate() { @@ -571,7 +580,7 @@ public Float learningRate() { /** * Set the learningRate property: Initial learning rate. Must be a float in the range [0, 1]. - * + * * @param learningRate the learningRate value to set. * @return the ImageModelSettings object itself. */ @@ -582,7 +591,7 @@ public ImageModelSettings withLearningRate(Float learningRate) { /** * Get the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - * + * * @return the learningRateScheduler value. */ public LearningRateScheduler learningRateScheduler() { @@ -591,7 +600,7 @@ public LearningRateScheduler learningRateScheduler() { /** * Set the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - * + * * @param learningRateScheduler the learningRateScheduler value to set. * @return the ImageModelSettings object itself. */ @@ -601,10 +610,10 @@ public ImageModelSettings withLearningRateScheduler(LearningRateScheduler learni } /** - * Get the modelName property: Name of the model to use for training. For more information on the available models - * please visit the official documentation: + * Get the modelName property: Name of the model to use for training. + * For more information on the available models please visit the official documentation: * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * + * * @return the modelName value. */ public String modelName() { @@ -612,10 +621,10 @@ public String modelName() { } /** - * Set the modelName property: Name of the model to use for training. For more information on the available models - * please visit the official documentation: + * Set the modelName property: Name of the model to use for training. + * For more information on the available models please visit the official documentation: * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. - * + * * @param modelName the modelName value to set. * @return the ImageModelSettings object itself. */ @@ -626,7 +635,7 @@ public ImageModelSettings withModelName(String modelName) { /** * Get the momentum property: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - * + * * @return the momentum value. */ public Float momentum() { @@ -635,7 +644,7 @@ public Float momentum() { /** * Set the momentum property: Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - * + * * @param momentum the momentum value to set. * @return the ImageModelSettings object itself. */ @@ -646,7 +655,7 @@ public ImageModelSettings withMomentum(Float momentum) { /** * Get the nesterov property: Enable nesterov when optimizer is 'sgd'. - * + * * @return the nesterov value. */ public Boolean nesterov() { @@ -655,7 +664,7 @@ public Boolean nesterov() { /** * Set the nesterov property: Enable nesterov when optimizer is 'sgd'. - * + * * @param nesterov the nesterov value to set. * @return the ImageModelSettings object itself. */ @@ -666,7 +675,7 @@ public ImageModelSettings withNesterov(Boolean nesterov) { /** * Get the numberOfEpochs property: Number of training epochs. Must be a positive integer. - * + * * @return the numberOfEpochs value. */ public Integer numberOfEpochs() { @@ -675,7 +684,7 @@ public Integer numberOfEpochs() { /** * Set the numberOfEpochs property: Number of training epochs. Must be a positive integer. - * + * * @param numberOfEpochs the numberOfEpochs value to set. * @return the ImageModelSettings object itself. */ @@ -686,7 +695,7 @@ public ImageModelSettings withNumberOfEpochs(Integer numberOfEpochs) { /** * Get the numberOfWorkers property: Number of data loader workers. Must be a non-negative integer. - * + * * @return the numberOfWorkers value. */ public Integer numberOfWorkers() { @@ -695,7 +704,7 @@ public Integer numberOfWorkers() { /** * Set the numberOfWorkers property: Number of data loader workers. Must be a non-negative integer. - * + * * @param numberOfWorkers the numberOfWorkers value to set. * @return the ImageModelSettings object itself. */ @@ -706,7 +715,7 @@ public ImageModelSettings withNumberOfWorkers(Integer numberOfWorkers) { /** * Get the optimizer property: Type of optimizer. - * + * * @return the optimizer value. */ public StochasticOptimizer optimizer() { @@ -715,7 +724,7 @@ public StochasticOptimizer optimizer() { /** * Set the optimizer property: Type of optimizer. - * + * * @param optimizer the optimizer value to set. * @return the ImageModelSettings object itself. */ @@ -726,7 +735,7 @@ public ImageModelSettings withOptimizer(StochasticOptimizer optimizer) { /** * Get the randomSeed property: Random seed to be used when using deterministic training. - * + * * @return the randomSeed value. */ public Integer randomSeed() { @@ -735,7 +744,7 @@ public Integer randomSeed() { /** * Set the randomSeed property: Random seed to be used when using deterministic training. - * + * * @param randomSeed the randomSeed value to set. * @return the ImageModelSettings object itself. */ @@ -745,9 +754,9 @@ public ImageModelSettings withRandomSeed(Integer randomSeed) { } /** - * Get the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * + * Get the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the + * range [0, 1]. + * * @return the stepLRGamma value. */ public Float stepLRGamma() { @@ -755,9 +764,9 @@ public Float stepLRGamma() { } /** - * Set the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * + * Set the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the + * range [0, 1]. + * * @param stepLRGamma the stepLRGamma value to set. * @return the ImageModelSettings object itself. */ @@ -769,7 +778,7 @@ public ImageModelSettings withStepLRGamma(Float stepLRGamma) { /** * Get the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive * integer. - * + * * @return the stepLRStepSize value. */ public Integer stepLRStepSize() { @@ -779,7 +788,7 @@ public Integer stepLRStepSize() { /** * Set the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive * integer. - * + * * @param stepLRStepSize the stepLRStepSize value to set. * @return the ImageModelSettings object itself. */ @@ -790,7 +799,7 @@ public ImageModelSettings withStepLRStepSize(Integer stepLRStepSize) { /** * Get the trainingBatchSize property: Training batch size. Must be a positive integer. - * + * * @return the trainingBatchSize value. */ public Integer trainingBatchSize() { @@ -799,7 +808,7 @@ public Integer trainingBatchSize() { /** * Set the trainingBatchSize property: Training batch size. Must be a positive integer. - * + * * @param trainingBatchSize the trainingBatchSize value to set. * @return the ImageModelSettings object itself. */ @@ -810,7 +819,7 @@ public ImageModelSettings withTrainingBatchSize(Integer trainingBatchSize) { /** * Get the validationBatchSize property: Validation batch size. Must be a positive integer. - * + * * @return the validationBatchSize value. */ public Integer validationBatchSize() { @@ -819,7 +828,7 @@ public Integer validationBatchSize() { /** * Set the validationBatchSize property: Validation batch size. Must be a positive integer. - * + * * @param validationBatchSize the validationBatchSize value to set. * @return the ImageModelSettings object itself. */ @@ -831,7 +840,7 @@ public ImageModelSettings withValidationBatchSize(Integer validationBatchSize) { /** * Get the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. * Must be a float in the range [0, 1]. - * + * * @return the warmupCosineLRCycles value. */ public Float warmupCosineLRCycles() { @@ -841,7 +850,7 @@ public Float warmupCosineLRCycles() { /** * Set the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. * Must be a float in the range [0, 1]. - * + * * @param warmupCosineLRCycles the warmupCosineLRCycles value to set. * @return the ImageModelSettings object itself. */ @@ -853,7 +862,7 @@ public ImageModelSettings withWarmupCosineLRCycles(Float warmupCosineLRCycles) { /** * Get the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is * 'warmup_cosine'. Must be a positive integer. - * + * * @return the warmupCosineLRWarmupEpochs value. */ public Integer warmupCosineLRWarmupEpochs() { @@ -863,7 +872,7 @@ public Integer warmupCosineLRWarmupEpochs() { /** * Set the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is * 'warmup_cosine'. Must be a positive integer. - * + * * @param warmupCosineLRWarmupEpochs the warmupCosineLRWarmupEpochs value to set. * @return the ImageModelSettings object itself. */ @@ -875,7 +884,7 @@ public ImageModelSettings withWarmupCosineLRWarmupEpochs(Integer warmupCosineLRW /** * Get the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float * in the range[0, 1]. - * + * * @return the weightDecay value. */ public Float weightDecay() { @@ -885,7 +894,7 @@ public Float weightDecay() { /** * Set the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float * in the range[0, 1]. - * + * * @param weightDecay the weightDecay value to set. * @return the ImageModelSettings object itself. */ @@ -896,7 +905,7 @@ public ImageModelSettings withWeightDecay(Float weightDecay) { /** * 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/ImageModelSettingsClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java index 27e3463da73da..92272bc4184d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java @@ -8,8 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Settings used for training the model. 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. + * Settings used for training the model. + * 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 public final class ImageModelSettingsClassification extends ImageModelSettings { @@ -38,14 +39,16 @@ public final class ImageModelSettingsClassification extends ImageModelSettings { @JsonProperty(value = "weightedLoss") private Integer weightedLoss; - /** Creates an instance of ImageModelSettingsClassification class. */ + /** + * Creates an instance of ImageModelSettingsClassification class. + */ public ImageModelSettingsClassification() { } /** * Get the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. * Must be a positive integer. - * + * * @return the trainingCropSize value. */ public Integer trainingCropSize() { @@ -55,7 +58,7 @@ public Integer trainingCropSize() { /** * Set the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. * Must be a positive integer. - * + * * @param trainingCropSize the trainingCropSize value to set. * @return the ImageModelSettingsClassification object itself. */ @@ -67,7 +70,7 @@ public ImageModelSettingsClassification withTrainingCropSize(Integer trainingCro /** * Get the validationCropSize property: Image crop size that is input to the neural network for the validation * dataset. Must be a positive integer. - * + * * @return the validationCropSize value. */ public Integer validationCropSize() { @@ -77,7 +80,7 @@ public Integer validationCropSize() { /** * Set the validationCropSize property: Image crop size that is input to the neural network for the validation * dataset. Must be a positive integer. - * + * * @param validationCropSize the validationCropSize value to set. * @return the ImageModelSettingsClassification object itself. */ @@ -87,9 +90,9 @@ public ImageModelSettingsClassification withValidationCropSize(Integer validatio } /** - * Get the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * + * Get the validationResizeSize property: Image size to which to resize before cropping for validation dataset. + * Must be a positive integer. + * * @return the validationResizeSize value. */ public Integer validationResizeSize() { @@ -97,9 +100,9 @@ public Integer validationResizeSize() { } /** - * Set the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * + * Set the validationResizeSize property: Image size to which to resize before cropping for validation dataset. + * Must be a positive integer. + * * @param validationResizeSize the validationResizeSize value to set. * @return the ImageModelSettingsClassification object itself. */ @@ -109,9 +112,9 @@ public ImageModelSettingsClassification withValidationResizeSize(Integer validat } /** - * Get the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss - * with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * + * Get the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. + * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. + * * @return the weightedLoss value. */ public Integer weightedLoss() { @@ -119,9 +122,9 @@ public Integer weightedLoss() { } /** - * Set the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss - * with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * + * Set the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. + * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. + * * @param weightedLoss the weightedLoss value to set. * @return the ImageModelSettingsClassification object itself. */ @@ -130,224 +133,288 @@ public ImageModelSettingsClassification withWeightedLoss(Integer weightedLoss) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withAdvancedSettings(String advancedSettings) { super.withAdvancedSettings(advancedSettings); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withAmsGradient(Boolean amsGradient) { super.withAmsGradient(amsGradient); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withAugmentations(String augmentations) { super.withAugmentations(augmentations); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withBeta1(Float beta1) { super.withBeta1(beta1); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withBeta2(Float beta2) { super.withBeta2(beta2); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withCheckpointFrequency(Integer checkpointFrequency) { super.withCheckpointFrequency(checkpointFrequency); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withCheckpointModel(MLFlowModelJobInput checkpointModel) { super.withCheckpointModel(checkpointModel); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withCheckpointRunId(String checkpointRunId) { super.withCheckpointRunId(checkpointRunId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withDistributed(Boolean distributed) { super.withDistributed(distributed); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withEarlyStopping(Boolean earlyStopping) { super.withEarlyStopping(earlyStopping); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withEarlyStoppingDelay(Integer earlyStoppingDelay) { super.withEarlyStoppingDelay(earlyStoppingDelay); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withEarlyStoppingPatience(Integer earlyStoppingPatience) { super.withEarlyStoppingPatience(earlyStoppingPatience); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withEnableOnnxNormalization(Boolean enableOnnxNormalization) { super.withEnableOnnxNormalization(enableOnnxNormalization); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withEvaluationFrequency(Integer evaluationFrequency) { super.withEvaluationFrequency(evaluationFrequency); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withGradientAccumulationStep(Integer gradientAccumulationStep) { super.withGradientAccumulationStep(gradientAccumulationStep); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withLayersToFreeze(Integer layersToFreeze) { super.withLayersToFreeze(layersToFreeze); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withLearningRate(Float learningRate) { super.withLearningRate(learningRate); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withLearningRateScheduler(LearningRateScheduler learningRateScheduler) { super.withLearningRateScheduler(learningRateScheduler); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withModelName(String modelName) { super.withModelName(modelName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withMomentum(Float momentum) { super.withMomentum(momentum); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withNesterov(Boolean nesterov) { super.withNesterov(nesterov); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withNumberOfEpochs(Integer numberOfEpochs) { super.withNumberOfEpochs(numberOfEpochs); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withNumberOfWorkers(Integer numberOfWorkers) { super.withNumberOfWorkers(numberOfWorkers); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withOptimizer(StochasticOptimizer optimizer) { super.withOptimizer(optimizer); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withRandomSeed(Integer randomSeed) { super.withRandomSeed(randomSeed); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withStepLRGamma(Float stepLRGamma) { super.withStepLRGamma(stepLRGamma); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withStepLRStepSize(Integer stepLRStepSize) { super.withStepLRStepSize(stepLRStepSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withTrainingBatchSize(Integer trainingBatchSize) { super.withTrainingBatchSize(trainingBatchSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withValidationBatchSize(Integer validationBatchSize) { super.withValidationBatchSize(validationBatchSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withWarmupCosineLRCycles(Float warmupCosineLRCycles) { super.withWarmupCosineLRCycles(warmupCosineLRCycles); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withWarmupCosineLRWarmupEpochs(Integer warmupCosineLRWarmupEpochs) { super.withWarmupCosineLRWarmupEpochs(warmupCosineLRWarmupEpochs); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsClassification withWeightDecay(Float weightDecay) { super.withWeightDecay(weightDecay); @@ -356,7 +423,7 @@ public ImageModelSettingsClassification withWeightDecay(Float weightDecay) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java index aa171c49914da..b8a961260f97a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java @@ -8,8 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Settings used for training the model. 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. + * Settings used for training the model. + * 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 public final class ImageModelSettingsObjectDetection extends ImageModelSettings { @@ -35,6 +36,18 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings @JsonProperty(value = "imageSize") private Integer imageSize; + /* + * Enable computing and logging training metrics. + */ + @JsonProperty(value = "logTrainingMetrics") + private LogTrainingMetrics logTrainingMetrics; + + /* + * Enable computing and logging validation loss. + */ + @JsonProperty(value = "logValidationLoss") + private LogValidationLoss logValidationLoss; + /* * Maximum size of the image to be rescaled before feeding it to the backbone. * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. @@ -108,14 +121,17 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings @JsonProperty(value = "validationMetricType") private ValidationMetricType validationMetricType; - /** Creates an instance of ImageModelSettingsObjectDetection class. */ + /** + * Creates an instance of ImageModelSettingsObjectDetection class. + */ public ImageModelSettingsObjectDetection() { } /** * Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. - * + * positive integer. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the boxDetectionsPerImage value. */ public Integer boxDetectionsPerImage() { @@ -124,8 +140,9 @@ public Integer boxDetectionsPerImage() { /** * Set the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. - * + * positive integer. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param boxDetectionsPerImage the boxDetectionsPerImage value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -136,8 +153,9 @@ public ImageModelSettingsObjectDetection withBoxDetectionsPerImage(Integer boxDe /** * Get the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than BoxScoreThreshold. Must be a float in the range[0, 1]. - * + * than + * BoxScoreThreshold. Must be a float in the range[0, 1]. + * * @return the boxScoreThreshold value. */ public Float boxScoreThreshold() { @@ -146,8 +164,9 @@ public Float boxScoreThreshold() { /** * Set the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than BoxScoreThreshold. Must be a float in the range[0, 1]. - * + * than + * BoxScoreThreshold. Must be a float in the range[0, 1]. + * * @param boxScoreThreshold the boxScoreThreshold value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -157,10 +176,10 @@ public ImageModelSettingsObjectDetection withBoxScoreThreshold(Float boxScoreThr } /** - * Get the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training - * run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' - * algorithm. - * + * Get the imageSize property: Image size for train and validation. Must be a positive integer. + * Note: The training run may get into CUDA OOM if the size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @return the imageSize value. */ public Integer imageSize() { @@ -168,10 +187,10 @@ public Integer imageSize() { } /** - * Set the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training - * run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' - * algorithm. - * + * Set the imageSize property: Image size for train and validation. Must be a positive integer. + * Note: The training run may get into CUDA OOM if the size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @param imageSize the imageSize value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -181,10 +200,50 @@ public ImageModelSettingsObjectDetection withImageSize(Integer imageSize) { } /** - * Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Get the logTrainingMetrics property: Enable computing and logging training metrics. + * + * @return the logTrainingMetrics value. + */ + public LogTrainingMetrics logTrainingMetrics() { + return this.logTrainingMetrics; + } + + /** + * Set the logTrainingMetrics property: Enable computing and logging training metrics. + * + * @param logTrainingMetrics the logTrainingMetrics value to set. + * @return the ImageModelSettingsObjectDetection object itself. + */ + public ImageModelSettingsObjectDetection withLogTrainingMetrics(LogTrainingMetrics logTrainingMetrics) { + this.logTrainingMetrics = logTrainingMetrics; + return this; + } + + /** + * Get the logValidationLoss property: Enable computing and logging validation loss. + * + * @return the logValidationLoss value. + */ + public LogValidationLoss logValidationLoss() { + return this.logValidationLoss; + } + + /** + * Set the logValidationLoss property: Enable computing and logging validation loss. + * + * @param logValidationLoss the logValidationLoss value to set. + * @return the ImageModelSettingsObjectDetection object itself. + */ + public ImageModelSettingsObjectDetection withLogValidationLoss(LogValidationLoss logValidationLoss) { + this.logValidationLoss = logValidationLoss; + return this; + } + + /** + * Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the maxSize value. */ public Integer maxSize() { @@ -192,10 +251,10 @@ public Integer maxSize() { } /** - * Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param maxSize the maxSize value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -205,10 +264,10 @@ public ImageModelSettingsObjectDetection withMaxSize(Integer maxSize) { } /** - * Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the minSize value. */ public Integer minSize() { @@ -216,10 +275,10 @@ public Integer minSize() { } /** - * Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param minSize the minSize value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -229,9 +288,10 @@ public ImageModelSettingsObjectDetection withMinSize(Integer minSize) { } /** - * Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may - * get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. - * + * Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. + * Note: training run may get into CUDA OOM if the model size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @return the modelSize value. */ public ModelSize modelSize() { @@ -239,9 +299,10 @@ public ModelSize modelSize() { } /** - * Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may - * get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. - * + * Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. + * Note: training run may get into CUDA OOM if the model size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @param modelSize the modelSize value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -251,9 +312,10 @@ public ImageModelSettingsObjectDetection withModelSize(ModelSize modelSize) { } /** - * Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may - * get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. - * + * Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%. + * Note: training run may get into CUDA OOM if no sufficient GPU memory. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @return the multiScale value. */ public Boolean multiScale() { @@ -261,9 +323,10 @@ public Boolean multiScale() { } /** - * Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may - * get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. - * + * Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%. + * Note: training run may get into CUDA OOM if no sufficient GPU memory. + * Note: This settings is only supported for the 'yolov5' algorithm. + * * @param multiScale the multiScale value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -275,7 +338,7 @@ public ImageModelSettingsObjectDetection withMultiScale(Boolean multiScale) { /** * Get the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be a float in * the range [0, 1]. - * + * * @return the nmsIouThreshold value. */ public Float nmsIouThreshold() { @@ -285,7 +348,7 @@ public Float nmsIouThreshold() { /** * Set the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be a float in * the range [0, 1]. - * + * * @param nmsIouThreshold the nmsIouThreshold value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -295,10 +358,10 @@ public ImageModelSettingsObjectDetection withNmsIouThreshold(Float nmsIouThresho } /** - * Get the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to - * enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Get the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be + * None to enable small object detection logic. A string containing two integers in mxn format. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the tileGridSize value. */ public String tileGridSize() { @@ -306,10 +369,10 @@ public String tileGridSize() { } /** - * Set the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to - * enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not - * supported for the 'yolov5' algorithm. - * + * Set the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be + * None to enable small object detection logic. A string containing two integers in mxn format. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param tileGridSize the tileGridSize value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -320,8 +383,9 @@ public ImageModelSettingsObjectDetection withTileGridSize(String tileGridSize) { /** * Get the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm. - * + * range [0, 1). + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the tileOverlapRatio value. */ public Float tileOverlapRatio() { @@ -330,8 +394,9 @@ public Float tileOverlapRatio() { /** * Set the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm. - * + * range [0, 1). + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param tileOverlapRatio the tileOverlapRatio value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -342,9 +407,10 @@ public ImageModelSettingsObjectDetection withTileOverlapRatio(Float tileOverlapR /** * Get the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is - * not supported for the 'yolov5' algorithm. - * + * from tiles and image. + * Used in validation/ inference. Must be float in the range [0, 1]. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @return the tilePredictionsNmsThreshold value. */ public Float tilePredictionsNmsThreshold() { @@ -353,9 +419,10 @@ public Float tilePredictionsNmsThreshold() { /** * Set the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is - * not supported for the 'yolov5' algorithm. - * + * from tiles and image. + * Used in validation/ inference. Must be float in the range [0, 1]. + * Note: This settings is not supported for the 'yolov5' algorithm. + * * @param tilePredictionsNmsThreshold the tilePredictionsNmsThreshold value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -367,7 +434,7 @@ public ImageModelSettingsObjectDetection withTilePredictionsNmsThreshold(Float t /** * Get the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in * the range [0, 1]. - * + * * @return the validationIouThreshold value. */ public Float validationIouThreshold() { @@ -377,7 +444,7 @@ public Float validationIouThreshold() { /** * Set the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in * the range [0, 1]. - * + * * @param validationIouThreshold the validationIouThreshold value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -388,7 +455,7 @@ public ImageModelSettingsObjectDetection withValidationIouThreshold(Float valida /** * Get the validationMetricType property: Metric computation method to use for validation metrics. - * + * * @return the validationMetricType value. */ public ValidationMetricType validationMetricType() { @@ -397,7 +464,7 @@ public ValidationMetricType validationMetricType() { /** * Set the validationMetricType property: Metric computation method to use for validation metrics. - * + * * @param validationMetricType the validationMetricType value to set. * @return the ImageModelSettingsObjectDetection object itself. */ @@ -406,224 +473,288 @@ public ImageModelSettingsObjectDetection withValidationMetricType(ValidationMetr return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withAdvancedSettings(String advancedSettings) { super.withAdvancedSettings(advancedSettings); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withAmsGradient(Boolean amsGradient) { super.withAmsGradient(amsGradient); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withAugmentations(String augmentations) { super.withAugmentations(augmentations); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withBeta1(Float beta1) { super.withBeta1(beta1); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withBeta2(Float beta2) { super.withBeta2(beta2); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withCheckpointFrequency(Integer checkpointFrequency) { super.withCheckpointFrequency(checkpointFrequency); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withCheckpointModel(MLFlowModelJobInput checkpointModel) { super.withCheckpointModel(checkpointModel); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withCheckpointRunId(String checkpointRunId) { super.withCheckpointRunId(checkpointRunId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withDistributed(Boolean distributed) { super.withDistributed(distributed); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withEarlyStopping(Boolean earlyStopping) { super.withEarlyStopping(earlyStopping); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withEarlyStoppingDelay(Integer earlyStoppingDelay) { super.withEarlyStoppingDelay(earlyStoppingDelay); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withEarlyStoppingPatience(Integer earlyStoppingPatience) { super.withEarlyStoppingPatience(earlyStoppingPatience); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withEnableOnnxNormalization(Boolean enableOnnxNormalization) { super.withEnableOnnxNormalization(enableOnnxNormalization); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withEvaluationFrequency(Integer evaluationFrequency) { super.withEvaluationFrequency(evaluationFrequency); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withGradientAccumulationStep(Integer gradientAccumulationStep) { super.withGradientAccumulationStep(gradientAccumulationStep); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withLayersToFreeze(Integer layersToFreeze) { super.withLayersToFreeze(layersToFreeze); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withLearningRate(Float learningRate) { super.withLearningRate(learningRate); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withLearningRateScheduler(LearningRateScheduler learningRateScheduler) { super.withLearningRateScheduler(learningRateScheduler); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withModelName(String modelName) { super.withModelName(modelName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withMomentum(Float momentum) { super.withMomentum(momentum); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withNesterov(Boolean nesterov) { super.withNesterov(nesterov); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withNumberOfEpochs(Integer numberOfEpochs) { super.withNumberOfEpochs(numberOfEpochs); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withNumberOfWorkers(Integer numberOfWorkers) { super.withNumberOfWorkers(numberOfWorkers); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withOptimizer(StochasticOptimizer optimizer) { super.withOptimizer(optimizer); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withRandomSeed(Integer randomSeed) { super.withRandomSeed(randomSeed); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withStepLRGamma(Float stepLRGamma) { super.withStepLRGamma(stepLRGamma); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withStepLRStepSize(Integer stepLRStepSize) { super.withStepLRStepSize(stepLRStepSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withTrainingBatchSize(Integer trainingBatchSize) { super.withTrainingBatchSize(trainingBatchSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withValidationBatchSize(Integer validationBatchSize) { super.withValidationBatchSize(validationBatchSize); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withWarmupCosineLRCycles(Float warmupCosineLRCycles) { super.withWarmupCosineLRCycles(warmupCosineLRCycles); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withWarmupCosineLRWarmupEpochs(Integer warmupCosineLRWarmupEpochs) { super.withWarmupCosineLRWarmupEpochs(warmupCosineLRWarmupEpochs); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ImageModelSettingsObjectDetection withWeightDecay(Float weightDecay) { super.withWeightDecay(weightDecay); @@ -632,7 +763,7 @@ public ImageModelSettingsObjectDetection withWeightDecay(Float weightDecay) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java index 3e331ef4ba459..22bea6b21f3a3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java @@ -63,13 +63,15 @@ public final class ImageObjectDetection extends AutoMLVertical { @JsonProperty(value = "validationDataSize") private Double validationDataSize; - /** Creates an instance of ImageObjectDetection class. */ + /** + * Creates an instance of ImageObjectDetection class. + */ public ImageObjectDetection() { } /** * Get the primaryMetric property: Primary metric to optimize for this task. - * + * * @return the primaryMetric value. */ public ObjectDetectionPrimaryMetrics primaryMetric() { @@ -78,7 +80,7 @@ public ObjectDetectionPrimaryMetrics primaryMetric() { /** * Set the primaryMetric property: Primary metric to optimize for this task. - * + * * @param primaryMetric the primaryMetric value to set. * @return the ImageObjectDetection object itself. */ @@ -89,7 +91,7 @@ public ImageObjectDetection withPrimaryMetric(ObjectDetectionPrimaryMetrics prim /** * Get the modelSettings property: Settings used for training the model. - * + * * @return the modelSettings value. */ public ImageModelSettingsObjectDetection modelSettings() { @@ -98,7 +100,7 @@ public ImageModelSettingsObjectDetection modelSettings() { /** * Set the modelSettings property: Settings used for training the model. - * + * * @param modelSettings the modelSettings value to set. * @return the ImageObjectDetection object itself. */ @@ -110,7 +112,7 @@ public ImageObjectDetection withModelSettings(ImageModelSettingsObjectDetection /** * Get the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @return the searchSpace value. */ public List searchSpace() { @@ -120,7 +122,7 @@ public List searchSpace() { /** * Set the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @param searchSpace the searchSpace value to set. * @return the ImageObjectDetection object itself. */ @@ -131,7 +133,7 @@ public ImageObjectDetection withSearchSpace(List e.validate()); } if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageObjectDetection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property limitSettings in model ImageObjectDetection")); } else { limitSettings().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java index e3a955e714ba8..57f036221f2cf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The ImageObjectDetectionBase model. */ +/** + * The ImageObjectDetectionBase model. + */ @Fluent public class ImageObjectDetectionBase extends ImageVertical { /* @@ -23,13 +25,15 @@ public class ImageObjectDetectionBase extends ImageVertical { @JsonProperty(value = "searchSpace") private List searchSpace; - /** Creates an instance of ImageObjectDetectionBase class. */ + /** + * Creates an instance of ImageObjectDetectionBase class. + */ public ImageObjectDetectionBase() { } /** * Get the modelSettings property: Settings used for training the model. - * + * * @return the modelSettings value. */ public ImageModelSettingsObjectDetection modelSettings() { @@ -38,7 +42,7 @@ public ImageModelSettingsObjectDetection modelSettings() { /** * Set the modelSettings property: Settings used for training the model. - * + * * @param modelSettings the modelSettings value to set. * @return the ImageObjectDetectionBase object itself. */ @@ -50,7 +54,7 @@ public ImageObjectDetectionBase withModelSettings(ImageModelSettingsObjectDetect /** * Get the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @return the searchSpace value. */ public List searchSpace() { @@ -60,7 +64,7 @@ public List searchSpace() { /** * Set the searchSpace property: Search space for sampling different combinations of models and their * hyperparameters. - * + * * @param searchSpace the searchSpace value to set. * @return the ImageObjectDetectionBase object itself. */ @@ -69,28 +73,36 @@ public ImageObjectDetectionBase withSearchSpace(List { + /** + * 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/ImageVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java index 01fc3de24e7dd..35787029326ef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java @@ -9,8 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Abstract class for AutoML tasks that train image (computer vision) models - such as Image Classification / Image - * Classification Multilabel / Image Object Detection / Image Instance Segmentation. + * Abstract class for AutoML tasks that train image (computer vision) models - + * such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance + * Segmentation. */ @Fluent public class ImageVertical { @@ -40,13 +41,15 @@ public class ImageVertical { @JsonProperty(value = "validationDataSize") private Double validationDataSize; - /** Creates an instance of ImageVertical class. */ + /** + * Creates an instance of ImageVertical class. + */ public ImageVertical() { } /** * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * + * * @return the limitSettings value. */ public ImageLimitSettings limitSettings() { @@ -55,7 +58,7 @@ public ImageLimitSettings limitSettings() { /** * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * + * * @param limitSettings the limitSettings value to set. * @return the ImageVertical object itself. */ @@ -66,7 +69,7 @@ public ImageVertical withLimitSettings(ImageLimitSettings limitSettings) { /** * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * + * * @return the sweepSettings value. */ public ImageSweepSettings sweepSettings() { @@ -75,7 +78,7 @@ public ImageSweepSettings sweepSettings() { /** * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * + * * @param sweepSettings the sweepSettings value to set. * @return the ImageVertical object itself. */ @@ -86,7 +89,7 @@ public ImageVertical withSweepSettings(ImageSweepSettings sweepSettings) { /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -95,7 +98,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the ImageVertical object itself. */ @@ -106,8 +109,10 @@ public ImageVertical withValidationData(MLTableJobInput validationData) { /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the validationDataSize value. */ public Double validationDataSize() { @@ -116,8 +121,10 @@ public Double validationDataSize() { /** * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param validationDataSize the validationDataSize value to set. * @return the ImageVertical object itself. */ @@ -128,14 +135,13 @@ public ImageVertical withValidationDataSize(Double validationDataSize) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property limitSettings in model ImageVertical")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property limitSettings in model ImageVertical")); } else { limitSettings().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImportDataAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImportDataAction.java new file mode 100644 index 0000000000000..7fc7d0c766887 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImportDataAction.java @@ -0,0 +1,69 @@ +// Copyright (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 ImportDataAction model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") +@JsonTypeName("ImportData") +@Fluent +public final class ImportDataAction extends ScheduleActionBase { + /* + * [Required] Defines Schedule action definition details. + */ + @JsonProperty(value = "dataImportDefinition", required = true) + private DataImport dataImportDefinition; + + /** + * Creates an instance of ImportDataAction class. + */ + public ImportDataAction() { + } + + /** + * Get the dataImportDefinition property: [Required] Defines Schedule action definition details. + * + * @return the dataImportDefinition value. + */ + public DataImport dataImportDefinition() { + return this.dataImportDefinition; + } + + /** + * Set the dataImportDefinition property: [Required] Defines Schedule action definition details. + * + * @param dataImportDefinition the dataImportDefinition value to set. + * @return the ImportDataAction object itself. + */ + public ImportDataAction withDataImportDefinition(DataImport dataImportDefinition) { + this.dataImportDefinition = dataImportDefinition; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (dataImportDefinition() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property dataImportDefinition in model ImportDataAction")); + } else { + dataImportDefinition().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ImportDataAction.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IncrementalDataRefresh.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IncrementalDataRefresh.java new file mode 100644 index 0000000000000..4b2723b1e5582 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IncrementalDataRefresh.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; + +/** + * Whether IncrementalDataRefresh is enabled. + */ +public final class IncrementalDataRefresh extends ExpandableStringEnum { + /** + * Static value Enabled for IncrementalDataRefresh. + */ + public static final IncrementalDataRefresh ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for IncrementalDataRefresh. + */ + public static final IncrementalDataRefresh DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of IncrementalDataRefresh value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IncrementalDataRefresh() { + } + + /** + * Creates or finds a IncrementalDataRefresh from its string representation. + * + * @param name a name to look for. + * @return the corresponding IncrementalDataRefresh. + */ + @JsonCreator + public static IncrementalDataRefresh fromString(String name) { + return fromString(name, IncrementalDataRefresh.class); + } + + /** + * Gets known IncrementalDataRefresh values. + * + * @return known IncrementalDataRefresh values. + */ + public static Collection values() { + return values(IncrementalDataRefresh.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..2f0b36227b1c3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/InferenceContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java index 78878676f3264..339e187a0cfd6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The InferenceContainerProperties model. */ +/** + * The InferenceContainerProperties model. + */ @Fluent public final class InferenceContainerProperties { /* @@ -28,13 +30,15 @@ public final class InferenceContainerProperties { @JsonProperty(value = "scoringRoute") private Route scoringRoute; - /** Creates an instance of InferenceContainerProperties class. */ + /** + * Creates an instance of InferenceContainerProperties class. + */ public InferenceContainerProperties() { } /** * Get the livenessRoute property: The route to check the liveness of the inference server container. - * + * * @return the livenessRoute value. */ public Route livenessRoute() { @@ -43,7 +47,7 @@ public Route livenessRoute() { /** * Set the livenessRoute property: The route to check the liveness of the inference server container. - * + * * @param livenessRoute the livenessRoute value to set. * @return the InferenceContainerProperties object itself. */ @@ -54,7 +58,7 @@ public InferenceContainerProperties withLivenessRoute(Route livenessRoute) { /** * Get the readinessRoute property: The route to check the readiness of the inference server container. - * + * * @return the readinessRoute value. */ public Route readinessRoute() { @@ -63,7 +67,7 @@ public Route readinessRoute() { /** * Set the readinessRoute property: The route to check the readiness of the inference server container. - * + * * @param readinessRoute the readinessRoute value to set. * @return the InferenceContainerProperties object itself. */ @@ -74,7 +78,7 @@ public InferenceContainerProperties withReadinessRoute(Route readinessRoute) { /** * Get the scoringRoute property: The port to send the scoring requests to, within the inference server container. - * + * * @return the scoringRoute value. */ public Route scoringRoute() { @@ -83,7 +87,7 @@ public Route scoringRoute() { /** * Set the scoringRoute property: The port to send the scoring requests to, within the inference server container. - * + * * @param scoringRoute the scoringRoute value to set. * @return the InferenceContainerProperties object itself. */ @@ -94,7 +98,7 @@ public InferenceContainerProperties withScoringRoute(Route scoringRoute) { /** * 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/InferenceEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoint.java new file mode 100644 index 0000000000000..5f07c86df8d3c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoint.java @@ -0,0 +1,375 @@ +// Copyright (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.InferenceEndpointInner; +import java.util.Map; + +/** + * An immutable client-side representation of InferenceEndpoint. + */ +public interface InferenceEndpoint { + /** + * 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 properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + InferenceEndpointProperties properties(); + + /** + * 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 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.InferenceEndpointInner object. + * + * @return the inner object. + */ + InferenceEndpointInner innerModel(); + + /** + * The entirety of the InferenceEndpoint definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The InferenceEndpoint definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the InferenceEndpoint definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the InferenceEndpoint definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the InferenceEndpoint definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, poolName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @return the next definition stage. + */ + WithProperties withExistingInferencePool(String resourceGroupName, String workspaceName, String poolName); + } + + /** + * The stage of the InferenceEndpoint 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(InferenceEndpointProperties properties); + } + + /** + * The stage of the InferenceEndpoint 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + InferenceEndpoint create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InferenceEndpoint create(Context context); + } + + /** + * The stage of the InferenceEndpoint 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 InferenceEndpoint 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 InferenceEndpoint 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 InferenceEndpoint 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); + } + } + + /** + * Begins update for the InferenceEndpoint resource. + * + * @return the stage of resource update. + */ + InferenceEndpoint.Update update(); + + /** + * The template for InferenceEndpoint update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithKind, + UpdateStages.WithProperties, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InferenceEndpoint apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InferenceEndpoint apply(Context context); + } + + /** + * The InferenceEndpoint update stages. + */ + interface UpdateStages { + /** + * The stage of the InferenceEndpoint 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 InferenceEndpoint 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(ManagedServiceIdentity identity); + } + + /** + * The stage of the InferenceEndpoint update 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. + */ + Update withKind(String kind); + } + + /** + * The stage of the InferenceEndpoint 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(InferenceEndpointProperties properties); + } + + /** + * The stage of the InferenceEndpoint 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(Sku sku); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + InferenceEndpoint refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InferenceEndpoint refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java new file mode 100644 index 0000000000000..91909b93478cd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.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.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * InferenceEndpoint configuration. + */ +@Fluent +public final class InferenceEndpointProperties extends PropertiesBase { + /* + * [Required] Authentication mode for the endpoint. + */ + @JsonProperty(value = "authMode", required = true) + private AuthMode authMode; + + /* + * Endpoint URI for the inference endpoint. + */ + @JsonProperty(value = "endpointUri", access = JsonProperty.Access.WRITE_ONLY) + private String endpointUri; + + /* + * [Required] Group within the same pool with which this endpoint needs to be associated with. + */ + @JsonProperty(value = "groupId", required = true) + private String groupId; + + /* + * Provisioning state for the endpoint. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PoolProvisioningState provisioningState; + + /** + * Creates an instance of InferenceEndpointProperties class. + */ + public InferenceEndpointProperties() { + } + + /** + * Get the authMode property: [Required] Authentication mode for the endpoint. + * + * @return the authMode value. + */ + public AuthMode authMode() { + return this.authMode; + } + + /** + * Set the authMode property: [Required] Authentication mode for the endpoint. + * + * @param authMode the authMode value to set. + * @return the InferenceEndpointProperties object itself. + */ + public InferenceEndpointProperties withAuthMode(AuthMode authMode) { + this.authMode = authMode; + return this; + } + + /** + * Get the endpointUri property: Endpoint URI for the inference endpoint. + * + * @return the endpointUri value. + */ + public String endpointUri() { + return this.endpointUri; + } + + /** + * Get the groupId property: [Required] Group within the same pool with which this endpoint needs to be associated + * with. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Set the groupId property: [Required] Group within the same pool with which this endpoint needs to be associated + * with. + * + * @param groupId the groupId value to set. + * @return the InferenceEndpointProperties object itself. + */ + public InferenceEndpointProperties withGroupId(String groupId) { + this.groupId = groupId; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the endpoint. + * + * @return the provisioningState value. + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceEndpointProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceEndpointProperties 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 (authMode() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property authMode in model InferenceEndpointProperties")); + } + if (groupId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property groupId in model InferenceEndpointProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InferenceEndpointProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointTrackedResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..4d0d5d71c901f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointTrackedResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A paginated list of InferenceEndpoint entities. + */ +@Fluent +public final class InferenceEndpointTrackedResourceArmPaginatedResult { + /* + * The link to the next page of InferenceEndpoint objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type InferenceEndpoint. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of InferenceEndpointTrackedResourceArmPaginatedResult class. + */ + public InferenceEndpointTrackedResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of InferenceEndpoint 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 InferenceEndpoint objects. If null, there are no + * additional pages. + * + * @param nextLink the nextLink value to set. + * @return the InferenceEndpointTrackedResourceArmPaginatedResult object itself. + */ + public InferenceEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type InferenceEndpoint. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type InferenceEndpoint. + * + * @param value the value value to set. + * @return the InferenceEndpointTrackedResourceArmPaginatedResult object itself. + */ + public InferenceEndpointTrackedResourceArmPaginatedResult 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/InferenceEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.java new file mode 100644 index 0000000000000..9d9c3adfccf41 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.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.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 InferenceEndpoints. + */ +public interface InferenceEndpoints { + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String poolName); + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, String endpointName); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 workspaceName, String poolName, String endpointName, Context context); + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 inferenceEndpoint along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Context context); + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint 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 inferenceEndpoint. + */ + InferenceEndpoint get(String resourceGroupName, String workspaceName, String poolName, String endpointName); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + InferenceEndpoint update(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Object body); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param endpointName InferenceEndpoint name. + * @param body Online Endpoint entity to apply during operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InferenceEndpoint update(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Object body, Context context); + + /** + * Get InferenceEndpoint. + * + * @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 inferenceEndpoint along with {@link Response}. + */ + InferenceEndpoint getById(String id); + + /** + * Get InferenceEndpoint. + * + * @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 inferenceEndpoint along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @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 InferenceEndpoint (asynchronous). + * + * @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 InferenceEndpoint resource. + * + * @param name resource name. + * @return the first stage of the new InferenceEndpoint definition. + */ + InferenceEndpoint.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java new file mode 100644 index 0000000000000..c96f3db3c98d1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java @@ -0,0 +1,353 @@ +// Copyright (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.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import java.util.Map; + +/** + * An immutable client-side representation of InferenceGroup. + */ +public interface InferenceGroup { + /** + * 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 properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + InferenceGroupProperties properties(); + + /** + * 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 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.InferenceGroupInner object. + * + * @return the inner object. + */ + InferenceGroupInner innerModel(); + + /** + * The entirety of the InferenceGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The InferenceGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the InferenceGroup definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the InferenceGroup definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the InferenceGroup definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, poolName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @return the next definition stage. + */ + WithProperties withExistingInferencePool(String resourceGroupName, String workspaceName, String poolName); + } + + /** + * The stage of the InferenceGroup 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(InferenceGroupProperties properties); + } + + /** + * The stage of the InferenceGroup 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + InferenceGroup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InferenceGroup create(Context context); + } + + /** + * The stage of the InferenceGroup 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 InferenceGroup 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 InferenceGroup 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 InferenceGroup 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); + } + } + + /** + * Begins update for the InferenceGroup resource. + * + * @return the stage of resource update. + */ + InferenceGroup.Update update(); + + /** + * The template for InferenceGroup update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InferenceGroup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InferenceGroup apply(Context context); + } + + /** + * The InferenceGroup update stages. + */ + interface UpdateStages { + /** + * The stage of the InferenceGroup 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 InferenceGroup 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. + */ + InferenceGroup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InferenceGroup refresh(Context context); + + /** + * Retrieve inference group status. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 getStatusWithResponse(Context context); + + /** + * Retrieve inference group status. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + GroupStatus getStatus(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java new file mode 100644 index 0000000000000..0312730e07e0f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java @@ -0,0 +1,148 @@ +// Copyright (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; + +/** + * Inference group configuration. + */ +@Fluent +public final class InferenceGroupProperties extends PropertiesBase { + /* + * Capacity to be used from the pool's reserved capacity. + * optional + */ + @JsonProperty(value = "bonusExtraCapacity") + private Integer bonusExtraCapacity; + + /* + * Metadata for the inference group. + */ + @JsonProperty(value = "metadata") + private String metadata; + + /* + * Priority of the group within the + * N:Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20240101Preview.Pools.InferencePools. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /* + * Provisioning state for the inference group. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PoolProvisioningState provisioningState; + + /** + * Creates an instance of InferenceGroupProperties class. + */ + public InferenceGroupProperties() { + } + + /** + * Get the bonusExtraCapacity property: Capacity to be used from the pool's reserved capacity. + * optional. + * + * @return the bonusExtraCapacity value. + */ + public Integer bonusExtraCapacity() { + return this.bonusExtraCapacity; + } + + /** + * Set the bonusExtraCapacity property: Capacity to be used from the pool's reserved capacity. + * optional. + * + * @param bonusExtraCapacity the bonusExtraCapacity value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties withBonusExtraCapacity(Integer bonusExtraCapacity) { + this.bonusExtraCapacity = bonusExtraCapacity; + return this; + } + + /** + * Get the metadata property: Metadata for the inference group. + * + * @return the metadata value. + */ + public String metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata for the inference group. + * + * @param metadata the metadata value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties withMetadata(String metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the priority property: Priority of the group within the + * N:Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20240101Preview.Pools.InferencePools. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority property: Priority of the group within the + * N:Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20240101Preview.Pools.InferencePools. + * + * @param priority the priority value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the inference group. + * + * @return the provisioningState value. + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceGroupProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceGroupProperties 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(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupTrackedResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..5081060ed1814 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupTrackedResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A paginated list of InferenceGroup entities. + */ +@Fluent +public final class InferenceGroupTrackedResourceArmPaginatedResult { + /* + * The link to the next page of InferenceGroup objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type InferenceGroup. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of InferenceGroupTrackedResourceArmPaginatedResult class. + */ + public InferenceGroupTrackedResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of InferenceGroup 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 InferenceGroup objects. If null, there are no additional + * pages. + * + * @param nextLink the nextLink value to set. + * @return the InferenceGroupTrackedResourceArmPaginatedResult object itself. + */ + public InferenceGroupTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type InferenceGroup. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type InferenceGroup. + * + * @param value the value value to set. + * @return the InferenceGroupTrackedResourceArmPaginatedResult object itself. + */ + public InferenceGroupTrackedResourceArmPaginatedResult 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/InferenceGroups.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java new file mode 100644 index 0000000000000..828f67563d3d6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java @@ -0,0 +1,221 @@ +// Copyright (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 InferenceGroups. + */ +public interface InferenceGroups { + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String poolName); + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Name of the InferencePool. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String poolName, Integer count, + String skip, String tags, String properties, OrderString orderBy, Context context); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, String groupName); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 workspaceName, String poolName, String groupName, Context context); + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 inferenceGroup along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context); + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 inferenceGroup. + */ + InferenceGroup get(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 response body along with {@link Response}. + */ + Response getStatusWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context); + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName InferencePool name. + * @param groupName InferenceGroup 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 response. + */ + GroupStatus getStatus(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group 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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName); + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Inference Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip, Context context); + + /** + * Get InferenceGroup. + * + * @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 inferenceGroup along with {@link Response}. + */ + InferenceGroup getById(String id); + + /** + * Get InferenceGroup. + * + * @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 inferenceGroup along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete InferenceGroup (asynchronous). + * + * @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 InferenceGroup (asynchronous). + * + * @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 InferenceGroup resource. + * + * @param name resource name. + * @return the first stage of the new InferenceGroup definition. + */ + InferenceGroup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java new file mode 100644 index 0000000000000..ea1af9f146b55 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java @@ -0,0 +1,366 @@ +// Copyright (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.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import java.util.Map; + +/** + * An immutable client-side representation of InferencePool. + */ +public interface InferencePool { + /** + * 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 properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + InferencePoolProperties properties(); + + /** + * 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 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.InferencePoolInner object. + * + * @return the inner object. + */ + InferencePoolInner innerModel(); + + /** + * The entirety of the InferencePool definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The InferencePool definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the InferencePool definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the InferencePool definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the InferencePool 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 InferencePool 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(InferencePoolProperties properties); + } + + /** + * The stage of the InferencePool 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + InferencePool create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InferencePool create(Context context); + } + + /** + * The stage of the InferencePool 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 InferencePool 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 InferencePool 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 InferencePool 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); + } + } + + /** + * Begins update for the InferencePool resource. + * + * @return the stage of resource update. + */ + InferencePool.Update update(); + + /** + * The template for InferencePool update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InferencePool apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InferencePool apply(Context context); + } + + /** + * The InferencePool update stages. + */ + interface UpdateStages { + /** + * The stage of the InferencePool 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 InferencePool 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(PartialManagedServiceIdentity identity); + } + + /** + * The stage of the InferencePool 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. + */ + InferencePool refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InferencePool refresh(Context context); + + /** + * Retrieve inference pool status. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 getStatusWithResponse(Context context); + + /** + * Retrieve inference pool status. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + PoolStatus getStatus(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java new file mode 100644 index 0000000000000..f6674bddc8d2e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.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.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Inference pool configuration. + */ +@Fluent +public final class InferencePoolProperties extends PropertiesBase { + /* + * Code configuration for the inference pool. + */ + @JsonProperty(value = "codeConfiguration") + private CodeConfiguration codeConfiguration; + + /* + * EnvironmentConfiguration for the inference pool. + */ + @JsonProperty(value = "environmentConfiguration") + private PoolEnvironmentConfiguration environmentConfiguration; + + /* + * ModelConfiguration for the inference pool. + */ + @JsonProperty(value = "modelConfiguration") + private PoolModelConfiguration modelConfiguration; + + /* + * [Required] Compute instance type. + */ + @JsonProperty(value = "nodeSkuType", required = true) + private String nodeSkuType; + + /* + * Provisioning state for the pool. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PoolProvisioningState provisioningState; + + /* + * Request configuration for the inference pool. + */ + @JsonProperty(value = "requestConfiguration") + private RequestConfiguration requestConfiguration; + + /** + * Creates an instance of InferencePoolProperties class. + */ + public InferencePoolProperties() { + } + + /** + * Get the codeConfiguration property: Code configuration for the inference pool. + * + * @return the codeConfiguration value. + */ + public CodeConfiguration codeConfiguration() { + return this.codeConfiguration; + } + + /** + * Set the codeConfiguration property: Code configuration for the inference pool. + * + * @param codeConfiguration the codeConfiguration value to set. + * @return the InferencePoolProperties object itself. + */ + public InferencePoolProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { + this.codeConfiguration = codeConfiguration; + return this; + } + + /** + * Get the environmentConfiguration property: EnvironmentConfiguration for the inference pool. + * + * @return the environmentConfiguration value. + */ + public PoolEnvironmentConfiguration environmentConfiguration() { + return this.environmentConfiguration; + } + + /** + * Set the environmentConfiguration property: EnvironmentConfiguration for the inference pool. + * + * @param environmentConfiguration the environmentConfiguration value to set. + * @return the InferencePoolProperties object itself. + */ + public InferencePoolProperties withEnvironmentConfiguration(PoolEnvironmentConfiguration environmentConfiguration) { + this.environmentConfiguration = environmentConfiguration; + return this; + } + + /** + * Get the modelConfiguration property: ModelConfiguration for the inference pool. + * + * @return the modelConfiguration value. + */ + public PoolModelConfiguration modelConfiguration() { + return this.modelConfiguration; + } + + /** + * Set the modelConfiguration property: ModelConfiguration for the inference pool. + * + * @param modelConfiguration the modelConfiguration value to set. + * @return the InferencePoolProperties object itself. + */ + public InferencePoolProperties withModelConfiguration(PoolModelConfiguration modelConfiguration) { + this.modelConfiguration = modelConfiguration; + return this; + } + + /** + * Get the nodeSkuType property: [Required] Compute instance type. + * + * @return the nodeSkuType value. + */ + public String nodeSkuType() { + return this.nodeSkuType; + } + + /** + * Set the nodeSkuType property: [Required] Compute instance type. + * + * @param nodeSkuType the nodeSkuType value to set. + * @return the InferencePoolProperties object itself. + */ + public InferencePoolProperties withNodeSkuType(String nodeSkuType) { + this.nodeSkuType = nodeSkuType; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the pool. + * + * @return the provisioningState value. + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the requestConfiguration property: Request configuration for the inference pool. + * + * @return the requestConfiguration value. + */ + public RequestConfiguration requestConfiguration() { + return this.requestConfiguration; + } + + /** + * Set the requestConfiguration property: Request configuration for the inference pool. + * + * @param requestConfiguration the requestConfiguration value to set. + * @return the InferencePoolProperties object itself. + */ + public InferencePoolProperties withRequestConfiguration(RequestConfiguration requestConfiguration) { + this.requestConfiguration = requestConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferencePoolProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferencePoolProperties 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 (codeConfiguration() != null) { + codeConfiguration().validate(); + } + if (environmentConfiguration() != null) { + environmentConfiguration().validate(); + } + if (modelConfiguration() != null) { + modelConfiguration().validate(); + } + if (nodeSkuType() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property nodeSkuType in model InferencePoolProperties")); + } + if (requestConfiguration() != null) { + requestConfiguration().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InferencePoolProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolTrackedResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..7093062424d1b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolTrackedResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A paginated list of InferencePool entities. + */ +@Fluent +public final class InferencePoolTrackedResourceArmPaginatedResult { + /* + * The link to the next page of InferencePool objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type InferencePool. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of InferencePoolTrackedResourceArmPaginatedResult class. + */ + public InferencePoolTrackedResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of InferencePool 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 InferencePool objects. If null, there are no additional + * pages. + * + * @param nextLink the nextLink value to set. + * @return the InferencePoolTrackedResourceArmPaginatedResult object itself. + */ + public InferencePoolTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type InferencePool. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type InferencePool. + * + * @param value the value value to set. + * @return the InferencePoolTrackedResourceArmPaginatedResult object itself. + */ + public InferencePoolTrackedResourceArmPaginatedResult 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/InferencePools.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.java new file mode 100644 index 0000000000000..a111deabf7541 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.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.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 InferencePools. + */ +public interface InferencePools { + /** + * List InferencePools. + * + * @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 InferencePool entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 InferencePool entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + String tags, String properties, OrderString orderBy, Context context); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 inferencePoolName); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 inferencePoolName, Context context); + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String inferencePoolName, + Context context); + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool. + */ + InferencePool get(String resourceGroupName, String workspaceName, String inferencePoolName); + + /** + * Retrieve inference pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 getStatusWithResponse(String resourceGroupName, String workspaceName, String inferencePoolName, + Context context); + + /** + * Retrieve inference pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + PoolStatus getStatus(String resourceGroupName, String workspaceName, String inferencePoolName); + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group 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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listSkus(String resourceGroupName, String workspaceName, String inferencePoolName); + + /** + * List Inference Pool Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param inferencePoolName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @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 SkuResource entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listSkus(String resourceGroupName, String workspaceName, String inferencePoolName, + Integer count, String skip, Context context); + + /** + * Get InferencePool. + * + * @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 inferencePool along with {@link Response}. + */ + InferencePool getById(String id); + + /** + * Get InferencePool. + * + * @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 inferencePool along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete InferencePool (asynchronous). + * + * @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 InferencePool (asynchronous). + * + * @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 InferencePool resource. + * + * @param name resource name. + * @return the first stage of the new InferencePool definition. + */ + InferencePool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencingServer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencingServer.java new file mode 100644 index 0000000000000..def078e7fe3db --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencingServer.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.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The InferencingServer model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "serverType", + defaultImpl = InferencingServer.class) +@JsonTypeName("InferencingServer") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AzureMLBatch", value = AzureMLBatchInferencingServer.class), + @JsonSubTypes.Type(name = "AzureMLOnline", value = AzureMLOnlineInferencingServer.class), + @JsonSubTypes.Type(name = "Custom", value = CustomInferencingServer.class), + @JsonSubTypes.Type(name = "Triton", value = TritonInferencingServer.class) }) +@Immutable +public class InferencingServer { + /** + * Creates an instance of InferencingServer class. + */ + public InferencingServer() { + } + + /** + * 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/InferencingServerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencingServerType.java new file mode 100644 index 0000000000000..611c771bd6ffd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencingServerType.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Inferencing server type for various targets. + */ +public final class InferencingServerType extends ExpandableStringEnum { + /** + * Static value AzureMLOnline for InferencingServerType. + */ + public static final InferencingServerType AZURE_MLONLINE = fromString("AzureMLOnline"); + + /** + * Static value AzureMLBatch for InferencingServerType. + */ + public static final InferencingServerType AZURE_MLBATCH = fromString("AzureMLBatch"); + + /** + * Static value Triton for InferencingServerType. + */ + public static final InferencingServerType TRITON = fromString("Triton"); + + /** + * Static value Custom for InferencingServerType. + */ + public static final InferencingServerType CUSTOM = fromString("Custom"); + + /** + * Creates a new instance of InferencingServerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InferencingServerType() { + } + + /** + * Creates or finds a InferencingServerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding InferencingServerType. + */ + @JsonCreator + public static InferencingServerType fromString(String name) { + return fromString(name, InferencingServerType.class); + } + + /** + * Gets known InferencingServerType values. + * + * @return known InferencingServerType values. + */ + public static Collection values() { + return values(InferencingServerType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java index 93f3ee308a117..9d57d5a4a4e8f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine the input data delivery mode. */ +/** + * Enum to determine the input data delivery mode. + */ public final class InputDeliveryMode extends ExpandableStringEnum { - /** Static value ReadOnlyMount for InputDeliveryMode. */ + /** + * Static value ReadOnlyMount for InputDeliveryMode. + */ public static final InputDeliveryMode READ_ONLY_MOUNT = fromString("ReadOnlyMount"); - /** Static value ReadWriteMount for InputDeliveryMode. */ + /** + * Static value ReadWriteMount for InputDeliveryMode. + */ public static final InputDeliveryMode READ_WRITE_MOUNT = fromString("ReadWriteMount"); - /** Static value Download for InputDeliveryMode. */ + /** + * Static value Download for InputDeliveryMode. + */ public static final InputDeliveryMode DOWNLOAD = fromString("Download"); - /** Static value Direct for InputDeliveryMode. */ + /** + * Static value Direct for InputDeliveryMode. + */ public static final InputDeliveryMode DIRECT = fromString("Direct"); - /** Static value EvalMount for InputDeliveryMode. */ + /** + * Static value EvalMount for InputDeliveryMode. + */ public static final InputDeliveryMode EVAL_MOUNT = fromString("EvalMount"); - /** Static value EvalDownload for InputDeliveryMode. */ + /** + * Static value EvalDownload for InputDeliveryMode. + */ public static final InputDeliveryMode EVAL_DOWNLOAD = fromString("EvalDownload"); /** * Creates a new instance of InputDeliveryMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public InputDeliveryMode() { /** * Creates or finds a InputDeliveryMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding InputDeliveryMode. */ @@ -50,7 +64,7 @@ public static InputDeliveryMode fromString(String name) { /** * Gets known InputDeliveryMode values. - * + * * @return known InputDeliveryMode values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputPathType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputPathType.java new file mode 100644 index 0000000000000..bf98766509ef8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputPathType.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Input path type for package inputs. + */ +public final class InputPathType extends ExpandableStringEnum { + /** + * Static value Url for InputPathType. + */ + public static final InputPathType URL = fromString("Url"); + + /** + * Static value PathId for InputPathType. + */ + public static final InputPathType PATH_ID = fromString("PathId"); + + /** + * Static value PathVersion for InputPathType. + */ + public static final InputPathType PATH_VERSION = fromString("PathVersion"); + + /** + * Creates a new instance of InputPathType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InputPathType() { + } + + /** + * Creates or finds a InputPathType from its string representation. + * + * @param name a name to look for. + * @return the corresponding InputPathType. + */ + @JsonCreator + public static InputPathType fromString(String name) { + return fromString(name, InputPathType.class); + } + + /** + * Gets known InputPathType values. + * + * @return known InputPathType values. + */ + public static Collection values() { + return values(InputPathType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java index b95f8b7936cb9..f36b9b82227ac 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Primary metrics for InstanceSegmentation tasks. */ +/** + * Primary metrics for InstanceSegmentation tasks. + */ public final class InstanceSegmentationPrimaryMetrics extends ExpandableStringEnum { - /** Static value MeanAveragePrecision for InstanceSegmentationPrimaryMetrics. */ + /** + * Static value MeanAveragePrecision for InstanceSegmentationPrimaryMetrics. + */ public static final InstanceSegmentationPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); /** * Creates a new instance of InstanceSegmentationPrimaryMetrics value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public InstanceSegmentationPrimaryMetrics() { /** * Creates or finds a InstanceSegmentationPrimaryMetrics from its string representation. - * + * * @param name a name to look for. * @return the corresponding InstanceSegmentationPrimaryMetrics. */ @@ -35,7 +39,7 @@ public static InstanceSegmentationPrimaryMetrics fromString(String name) { /** * Gets known InstanceSegmentationPrimaryMetrics values. - * + * * @return known InstanceSegmentationPrimaryMetrics values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java index af0266978dd87..20a79b8d55262 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Instance type schema. */ +/** + * Instance type schema. + */ @Fluent public final class InstanceTypeSchema { /* @@ -25,13 +27,15 @@ public final class InstanceTypeSchema { @JsonProperty(value = "resources") private InstanceTypeSchemaResources resources; - /** Creates an instance of InstanceTypeSchema class. */ + /** + * Creates an instance of InstanceTypeSchema class. + */ public InstanceTypeSchema() { } /** * Get the nodeSelector property: Node Selector. - * + * * @return the nodeSelector value. */ public Map nodeSelector() { @@ -40,7 +44,7 @@ public Map nodeSelector() { /** * Set the nodeSelector property: Node Selector. - * + * * @param nodeSelector the nodeSelector value to set. * @return the InstanceTypeSchema object itself. */ @@ -51,7 +55,7 @@ public InstanceTypeSchema withNodeSelector(Map nodeSelector) { /** * Get the resources property: Resource requests/limits for this instance type. - * + * * @return the resources value. */ public InstanceTypeSchemaResources resources() { @@ -60,7 +64,7 @@ public InstanceTypeSchemaResources resources() { /** * Set the resources property: Resource requests/limits for this instance type. - * + * * @param resources the resources value to set. * @return the InstanceTypeSchema object itself. */ @@ -71,7 +75,7 @@ public InstanceTypeSchema withResources(InstanceTypeSchemaResources resources) { /** * 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/InstanceTypeSchemaResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java index 661d7afb7006c..c5f802edd9490 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Resource requests/limits for this instance type. */ +/** + * Resource requests/limits for this instance type. + */ @Fluent public final class InstanceTypeSchemaResources { /* @@ -26,13 +28,15 @@ public final class InstanceTypeSchemaResources { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map limits; - /** Creates an instance of InstanceTypeSchemaResources class. */ + /** + * Creates an instance of InstanceTypeSchemaResources class. + */ public InstanceTypeSchemaResources() { } /** * Get the requests property: Resource requests for this instance type. - * + * * @return the requests value. */ public Map requests() { @@ -41,7 +45,7 @@ public Map requests() { /** * Set the requests property: Resource requests for this instance type. - * + * * @param requests the requests value to set. * @return the InstanceTypeSchemaResources object itself. */ @@ -52,7 +56,7 @@ public InstanceTypeSchemaResources withRequests(Map requests) { /** * Get the limits property: Resource limits for this instance type. - * + * * @return the limits value. */ public Map limits() { @@ -61,7 +65,7 @@ public Map limits() { /** * Set the limits property: Resource limits for this instance type. - * + * * @param limits the limits value to set. * @return the InstanceTypeSchemaResources object itself. */ @@ -72,7 +76,7 @@ public InstanceTypeSchemaResources withLimits(Map limits) { /** * 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/IntellectualProperty.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IntellectualProperty.java new file mode 100644 index 0000000000000..39c5062478682 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IntellectualProperty.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; + +/** + * Intellectual Property details for a resource. + */ +@Fluent +public final class IntellectualProperty { + /* + * Protection level of the Intellectual Property. + */ + @JsonProperty(value = "protectionLevel") + private ProtectionLevel protectionLevel; + + /* + * [Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name. + */ + @JsonProperty(value = "publisher", required = true) + private String publisher; + + /** + * Creates an instance of IntellectualProperty class. + */ + public IntellectualProperty() { + } + + /** + * Get the protectionLevel property: Protection level of the Intellectual Property. + * + * @return the protectionLevel value. + */ + public ProtectionLevel protectionLevel() { + return this.protectionLevel; + } + + /** + * Set the protectionLevel property: Protection level of the Intellectual Property. + * + * @param protectionLevel the protectionLevel value to set. + * @return the IntellectualProperty object itself. + */ + public IntellectualProperty withProtectionLevel(ProtectionLevel protectionLevel) { + this.protectionLevel = protectionLevel; + return this; + } + + /** + * Get the publisher property: [Required] Publisher of the Intellectual Property. Must be the same as Registry + * publisher name. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: [Required] Publisher of the Intellectual Property. Must be the same as Registry + * publisher name. + * + * @param publisher the publisher value to set. + * @return the IntellectualProperty object itself. + */ + public IntellectualProperty withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publisher() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property publisher in model IntellectualProperty")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IntellectualProperty.class); +} 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..1b5361d458672 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.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.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..656c9641d8c37 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 @@ -8,90 +8,103 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -/** An immutable client-side representation of JobBase. */ +/** + * An immutable client-side representation of JobBase. + */ public interface JobBase { /** * 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. */ JobBaseProperties 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.JobBaseInner object. - * + * * @return the inner object. */ JobBaseInner innerModel(); - /** The entirety of the JobBase definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the JobBase definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The JobBase definition stages. */ + + /** + * The JobBase definition stages. + */ interface DefinitionStages { - /** The first stage of the JobBase definition. */ + /** + * The first stage of the JobBase definition. + */ interface Blank extends WithParentResource { } - /** The stage of the JobBase definition allowing to specify parent resource. */ + + /** + * The stage of the JobBase 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 JobBase definition allowing to specify properties. */ + + /** + * The stage of the JobBase 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(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. @@ -99,67 +112,76 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ JobBase create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ JobBase create(Context context); } } + /** * Begins update for the JobBase resource. - * + * * @return the stage of resource update. */ JobBase.Update update(); - /** The template for JobBase update. */ + /** + * The template for JobBase update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ JobBase apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ JobBase apply(Context context); } - /** The JobBase update stages. */ + + /** + * The JobBase update stages. + */ interface UpdateStages { - /** The stage of the JobBase update allowing to specify properties. */ + /** + * The stage of the JobBase 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. + * Specifies the properties property: Additional attributes of the entity.. + * + * @param properties Additional attributes of the entity. * @return the next definition stage. */ - Update withProperties(JobBaseProperties properties); + Update withProperties(PartialJobBase properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ JobBase refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -167,7 +189,7 @@ interface WithProperties { /** * Cancels a Job (asynchronous). - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -175,7 +197,7 @@ interface WithProperties { /** * Cancels a Job (asynchronous). - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java index 8a72ed8f844bc..b223878bf0576 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; @@ -12,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Base definition for a job. */ +/** + * Base definition for a job. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -20,11 +23,13 @@ defaultImpl = JobBaseProperties.class) @JsonTypeName("JobBaseProperties") @JsonSubTypes({ + @JsonSubTypes.Type(name = "Labeling", value = LabelingJobPropertiesInner.class), @JsonSubTypes.Type(name = "AutoML", value = AutoMLJob.class), @JsonSubTypes.Type(name = "Command", value = CommandJob.class), + @JsonSubTypes.Type(name = "FineTuning", value = FineTuningJob.class), @JsonSubTypes.Type(name = "Pipeline", value = PipelineJob.class), - @JsonSubTypes.Type(name = "Sweep", value = SweepJob.class) -}) + @JsonSubTypes.Type(name = "Spark", value = SparkJob.class), + @JsonSubTypes.Type(name = "Sweep", value = SweepJob.class) }) @Fluent public class JobBaseProperties extends ResourceBase { /* @@ -64,6 +69,19 @@ public class JobBaseProperties extends ResourceBase { @JsonProperty(value = "isArchived") private Boolean isArchived; + /* + * Notification setting for the job + */ + @JsonProperty(value = "notificationSetting") + private NotificationSetting notificationSetting; + + /* + * Configuration for secrets to be made available during runtime. + */ + @JsonProperty(value = "secretsConfiguration") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map secretsConfiguration; + /* * List of JobEndpoints. * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. @@ -78,13 +96,15 @@ public class JobBaseProperties extends ResourceBase { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private JobStatus status; - /** Creates an instance of JobBaseProperties class. */ + /** + * Creates an instance of JobBaseProperties class. + */ public JobBaseProperties() { } /** * Get the componentId property: ARM resource ID of the component resource. - * + * * @return the componentId value. */ public String componentId() { @@ -93,7 +113,7 @@ public String componentId() { /** * Set the componentId property: ARM resource ID of the component resource. - * + * * @param componentId the componentId value to set. * @return the JobBaseProperties object itself. */ @@ -104,7 +124,7 @@ public JobBaseProperties withComponentId(String componentId) { /** * Get the computeId property: ARM resource ID of the compute resource. - * + * * @return the computeId value. */ public String computeId() { @@ -113,7 +133,7 @@ public String computeId() { /** * Set the computeId property: ARM resource ID of the compute resource. - * + * * @param computeId the computeId value to set. * @return the JobBaseProperties object itself. */ @@ -124,7 +144,7 @@ public JobBaseProperties withComputeId(String computeId) { /** * Get the displayName property: Display name of job. - * + * * @return the displayName value. */ public String displayName() { @@ -133,7 +153,7 @@ public String displayName() { /** * Set the displayName property: Display name of job. - * + * * @param displayName the displayName value to set. * @return the JobBaseProperties object itself. */ @@ -145,7 +165,7 @@ public JobBaseProperties withDisplayName(String displayName) { /** * Get the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in * the "Default" experiment. - * + * * @return the experimentName value. */ public String experimentName() { @@ -155,7 +175,7 @@ public String experimentName() { /** * Set the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in * the "Default" experiment. - * + * * @param experimentName the experimentName value to set. * @return the JobBaseProperties object itself. */ @@ -166,8 +186,9 @@ public JobBaseProperties withExperimentName(String experimentName) { /** * Get the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. Defaults to AmlToken if null. - * + * UserIdentity or null. + * Defaults to AmlToken if null. + * * @return the identity value. */ public IdentityConfiguration identity() { @@ -176,8 +197,9 @@ public IdentityConfiguration identity() { /** * Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. Defaults to AmlToken if null. - * + * UserIdentity or null. + * Defaults to AmlToken if null. + * * @param identity the identity value to set. * @return the JobBaseProperties object itself. */ @@ -188,7 +210,7 @@ public JobBaseProperties withIdentity(IdentityConfiguration identity) { /** * Get the isArchived property: Is the asset archived?. - * + * * @return the isArchived value. */ public Boolean isArchived() { @@ -197,7 +219,7 @@ public Boolean isArchived() { /** * Set the isArchived property: Is the asset archived?. - * + * * @param isArchived the isArchived value to set. * @return the JobBaseProperties object itself. */ @@ -207,9 +229,49 @@ public JobBaseProperties withIsArchived(Boolean isArchived) { } /** - * Get the services property: List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of - * FileStreamObject. - * + * Get the notificationSetting property: Notification setting for the job. + * + * @return the notificationSetting value. + */ + public NotificationSetting notificationSetting() { + return this.notificationSetting; + } + + /** + * Set the notificationSetting property: Notification setting for the job. + * + * @param notificationSetting the notificationSetting value to set. + * @return the JobBaseProperties object itself. + */ + public JobBaseProperties withNotificationSetting(NotificationSetting notificationSetting) { + this.notificationSetting = notificationSetting; + return this; + } + + /** + * Get the secretsConfiguration property: Configuration for secrets to be made available during runtime. + * + * @return the secretsConfiguration value. + */ + public Map secretsConfiguration() { + return this.secretsConfiguration; + } + + /** + * Set the secretsConfiguration property: Configuration for secrets to be made available during runtime. + * + * @param secretsConfiguration the secretsConfiguration value to set. + * @return the JobBaseProperties object itself. + */ + public JobBaseProperties withSecretsConfiguration(Map secretsConfiguration) { + this.secretsConfiguration = secretsConfiguration; + return this; + } + + /** + * Get the services property: List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + * * @return the services value. */ public Map services() { @@ -217,9 +279,9 @@ public Map services() { } /** - * Set the services property: List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of - * FileStreamObject. - * + * Set the services property: List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + * * @param services the services value to set. * @return the JobBaseProperties object itself. */ @@ -230,28 +292,34 @@ public JobBaseProperties withServices(Map services) { /** * Get the status property: Status of the job. - * + * * @return the status value. */ public JobStatus status() { return this.status; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public JobBaseProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public JobBaseProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public JobBaseProperties withTags(Map tags) { super.withTags(tags); @@ -260,7 +328,7 @@ public JobBaseProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -269,15 +337,22 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (notificationSetting() != null) { + notificationSetting().validate(); + } + if (secretsConfiguration() != null) { + secretsConfiguration().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } if (services() != null) { - services() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + services().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java index c9675b3e0c18b..3bab8ed889ed0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of JobBase entities. */ +/** + * A paginated list of JobBase entities. + */ @Fluent public final class JobBaseResourceArmPaginatedResult { /* @@ -24,13 +26,15 @@ public final class JobBaseResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of JobBaseResourceArmPaginatedResult class. */ + /** + * Creates an instance of JobBaseResourceArmPaginatedResult class. + */ public JobBaseResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -39,7 +43,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. - * + * * @param nextLink the nextLink value to set. * @return the JobBaseResourceArmPaginatedResult object itself. */ @@ -50,7 +54,7 @@ public JobBaseResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type JobBase. - * + * * @return the value value. */ public List value() { @@ -59,7 +63,7 @@ public List value() { /** * Set the value property: An array of objects of type JobBase. - * + * * @param value the value value to set. * @return the JobBaseResourceArmPaginatedResult object itself. */ @@ -70,7 +74,7 @@ public JobBaseResourceArmPaginatedResult withValue(List 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/JobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java index 5cba43503e851..ec32a5f370e0c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Command job definition. */ +/** + * Command job definition. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,13 +21,12 @@ @JsonTypeName("JobInput") @JsonSubTypes({ @JsonSubTypes.Type(name = "mltable", value = MLTableJobInput.class), - @JsonSubTypes.Type(name = "custom_model", value = CustomModelJobInput.class), @JsonSubTypes.Type(name = "mlflow_model", value = MLFlowModelJobInput.class), + @JsonSubTypes.Type(name = "custom_model", value = CustomModelJobInput.class), @JsonSubTypes.Type(name = "literal", value = LiteralJobInput.class), @JsonSubTypes.Type(name = "triton_model", value = TritonModelJobInput.class), @JsonSubTypes.Type(name = "uri_file", value = UriFileJobInput.class), - @JsonSubTypes.Type(name = "uri_folder", value = UriFolderJobInput.class) -}) + @JsonSubTypes.Type(name = "uri_folder", value = UriFolderJobInput.class) }) @Fluent public class JobInput { /* @@ -34,13 +35,15 @@ public class JobInput { @JsonProperty(value = "description") private String description; - /** Creates an instance of JobInput class. */ + /** + * Creates an instance of JobInput class. + */ public JobInput() { } /** * Get the description property: Description for the input. - * + * * @return the description value. */ public String description() { @@ -49,7 +52,7 @@ public String description() { /** * Set the description property: Description for the input. - * + * * @param description the description value to set. * @return the JobInput object itself. */ @@ -60,7 +63,7 @@ public JobInput withDescription(String 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/JobInputType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java index 92e6f586c7933..162674620037c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine the Job Input Type. */ +/** + * Enum to determine the Job Input Type. + */ public final class JobInputType extends ExpandableStringEnum { - /** Static value literal for JobInputType. */ + /** + * Static value literal for JobInputType. + */ public static final JobInputType LITERAL = fromString("literal"); - /** Static value uri_file for JobInputType. */ + /** + * Static value uri_file for JobInputType. + */ public static final JobInputType URI_FILE = fromString("uri_file"); - /** Static value uri_folder for JobInputType. */ + /** + * Static value uri_folder for JobInputType. + */ public static final JobInputType URI_FOLDER = fromString("uri_folder"); - /** Static value mltable for JobInputType. */ + /** + * Static value mltable for JobInputType. + */ public static final JobInputType MLTABLE = fromString("mltable"); - /** Static value custom_model for JobInputType. */ + /** + * Static value custom_model for JobInputType. + */ public static final JobInputType CUSTOM_MODEL = fromString("custom_model"); - /** Static value mlflow_model for JobInputType. */ + /** + * Static value mlflow_model for JobInputType. + */ public static final JobInputType MLFLOW_MODEL = fromString("mlflow_model"); - /** Static value triton_model for JobInputType. */ + /** + * Static value triton_model for JobInputType. + */ public static final JobInputType TRITON_MODEL = fromString("triton_model"); /** * Creates a new instance of JobInputType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public JobInputType() { /** * Creates or finds a JobInputType from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobInputType. */ @@ -53,7 +69,7 @@ public static JobInputType fromString(String name) { /** * Gets known JobInputType values. - * + * * @return known JobInputType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java index c79da820462ac..fb8111508a669 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** The JobLimits model. */ +/** + * The JobLimits model. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -20,8 +22,7 @@ @JsonTypeName("JobLimits") @JsonSubTypes({ @JsonSubTypes.Type(name = "Command", value = CommandJobLimits.class), - @JsonSubTypes.Type(name = "Sweep", value = SweepJobLimits.class) -}) + @JsonSubTypes.Type(name = "Sweep", value = SweepJobLimits.class) }) @Fluent public class JobLimits { /* @@ -31,14 +32,16 @@ public class JobLimits { @JsonProperty(value = "timeout") private Duration timeout; - /** Creates an instance of JobLimits class. */ + /** + * Creates an instance of JobLimits class. + */ public JobLimits() { } /** * Get the timeout property: The max run duration in ISO 8601 format, after which the job will be cancelled. Only * supports duration with precision as low as Seconds. - * + * * @return the timeout value. */ public Duration timeout() { @@ -48,7 +51,7 @@ public Duration timeout() { /** * Set the timeout property: The max run duration in ISO 8601 format, after which the job will be cancelled. Only * supports duration with precision as low as Seconds. - * + * * @param timeout the timeout value to set. * @return the JobLimits object itself. */ @@ -59,7 +62,7 @@ public JobLimits withTimeout(Duration timeout) { /** * 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/JobLimitsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java index 943280f65918d..042a3498489b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for JobLimitsType. */ +/** + * Defines values for JobLimitsType. + */ public final class JobLimitsType extends ExpandableStringEnum { - /** Static value Command for JobLimitsType. */ + /** + * Static value Command for JobLimitsType. + */ public static final JobLimitsType COMMAND = fromString("Command"); - /** Static value Sweep for JobLimitsType. */ + /** + * Static value Sweep for JobLimitsType. + */ public static final JobLimitsType SWEEP = fromString("Sweep"); /** * Creates a new instance of JobLimitsType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public JobLimitsType() { /** * Creates or finds a JobLimitsType from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobLimitsType. */ @@ -38,7 +44,7 @@ public static JobLimitsType fromString(String name) { /** * Gets known JobLimitsType values. - * + * * @return known JobLimitsType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java index b8c523ed40f23..85ad728271748 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Job output definition container information on where to find job output/logs. */ +/** + * Job output definition container information on where to find job output/logs. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -23,8 +25,7 @@ @JsonSubTypes.Type(name = "mltable", value = MLTableJobOutput.class), @JsonSubTypes.Type(name = "triton_model", value = TritonModelJobOutput.class), @JsonSubTypes.Type(name = "uri_file", value = UriFileJobOutput.class), - @JsonSubTypes.Type(name = "uri_folder", value = UriFolderJobOutput.class) -}) + @JsonSubTypes.Type(name = "uri_folder", value = UriFolderJobOutput.class) }) @Fluent public class JobOutput { /* @@ -33,13 +34,15 @@ public class JobOutput { @JsonProperty(value = "description") private String description; - /** Creates an instance of JobOutput class. */ + /** + * Creates an instance of JobOutput class. + */ public JobOutput() { } /** * Get the description property: Description for the output. - * + * * @return the description value. */ public String description() { @@ -48,7 +51,7 @@ public String description() { /** * Set the description property: Description for the output. - * + * * @param description the description value to set. * @return the JobOutput object itself. */ @@ -59,7 +62,7 @@ public JobOutput withDescription(String 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/JobOutputType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java index c3d9ba0102f33..2efcbade7c824 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine the Job Output Type. */ +/** + * Enum to determine the Job Output Type. + */ public final class JobOutputType extends ExpandableStringEnum { - /** Static value uri_file for JobOutputType. */ + /** + * Static value uri_file for JobOutputType. + */ public static final JobOutputType URI_FILE = fromString("uri_file"); - /** Static value uri_folder for JobOutputType. */ + /** + * Static value uri_folder for JobOutputType. + */ public static final JobOutputType URI_FOLDER = fromString("uri_folder"); - /** Static value mltable for JobOutputType. */ + /** + * Static value mltable for JobOutputType. + */ public static final JobOutputType MLTABLE = fromString("mltable"); - /** Static value custom_model for JobOutputType. */ + /** + * Static value custom_model for JobOutputType. + */ public static final JobOutputType CUSTOM_MODEL = fromString("custom_model"); - /** Static value mlflow_model for JobOutputType. */ + /** + * Static value mlflow_model for JobOutputType. + */ public static final JobOutputType MLFLOW_MODEL = fromString("mlflow_model"); - /** Static value triton_model for JobOutputType. */ + /** + * Static value triton_model for JobOutputType. + */ public static final JobOutputType TRITON_MODEL = fromString("triton_model"); /** * Creates a new instance of JobOutputType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public JobOutputType() { /** * Creates or finds a JobOutputType from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobOutputType. */ @@ -50,7 +64,7 @@ public static JobOutputType fromString(String name) { /** * Gets known JobOutputType values. - * + * * @return known JobOutputType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobProvisioningState.java new file mode 100644 index 0000000000000..d5224ebb4627b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobProvisioningState.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Enum to determine the job provisioning state. + */ +public final class JobProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for JobProvisioningState. + */ + public static final JobProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for JobProvisioningState. + */ + public static final JobProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for JobProvisioningState. + */ + public static final JobProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value InProgress for JobProvisioningState. + */ + public static final JobProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** + * Creates a new instance of JobProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobProvisioningState() { + } + + /** + * Creates or finds a JobProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobProvisioningState. + */ + @JsonCreator + public static JobProvisioningState fromString(String name) { + return fromString(name, JobProvisioningState.class); + } + + /** + * Gets known JobProvisioningState values. + * + * @return known JobProvisioningState values. + */ + public static Collection values() { + return values(JobProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java index 37e80aca4c90c..dc629fe25ddde 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java @@ -6,9 +6,12 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; -/** The JobResourceConfiguration model. */ +/** + * The JobResourceConfiguration model. + */ @Fluent public final class JobResourceConfiguration extends ResourceConfiguration { /* @@ -25,7 +28,9 @@ public final class JobResourceConfiguration extends ResourceConfiguration { @JsonProperty(value = "shmSize") private String shmSize; - /** Creates an instance of JobResourceConfiguration class. */ + /** + * Creates an instance of JobResourceConfiguration class. + */ public JobResourceConfiguration() { } @@ -33,7 +38,7 @@ public JobResourceConfiguration() { * Get the dockerArgs property: Extra arguments to pass to the Docker run command. This would override any * parameters that have already been set by the system, or in this section. This parameter is only supported for * Azure ML compute types. - * + * * @return the dockerArgs value. */ public String dockerArgs() { @@ -44,7 +49,7 @@ public String dockerArgs() { * Set the dockerArgs property: Extra arguments to pass to the Docker run command. This would override any * parameters that have already been set by the system, or in this section. This parameter is only supported for * Azure ML compute types. - * + * * @param dockerArgs the dockerArgs value to set. * @return the JobResourceConfiguration object itself. */ @@ -57,7 +62,7 @@ public JobResourceConfiguration withDockerArgs(String dockerArgs) { * Get the shmSize property: Size of the docker container's shared memory block. This should be in the format of * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), * m(megabytes), or g(gigabytes). - * + * * @return the shmSize value. */ public String shmSize() { @@ -68,7 +73,7 @@ public String shmSize() { * Set the shmSize property: Size of the docker container's shared memory block. This should be in the format of * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), * m(megabytes), or g(gigabytes). - * + * * @param shmSize the shmSize value to set. * @return the JobResourceConfiguration object itself. */ @@ -77,21 +82,45 @@ public JobResourceConfiguration withShmSize(String shmSize) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public JobResourceConfiguration withInstanceCount(Integer instanceCount) { super.withInstanceCount(instanceCount); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public JobResourceConfiguration withInstanceType(String instanceType) { super.withInstanceType(instanceType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public JobResourceConfiguration withLocations(List locations) { + super.withLocations(locations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JobResourceConfiguration withMaxInstanceCount(Integer maxInstanceCount) { + super.withMaxInstanceCount(maxInstanceCount); + return this; + } + + /** + * {@inheritDoc} + */ @Override public JobResourceConfiguration withProperties(Map properties) { super.withProperties(properties); @@ -100,7 +129,7 @@ public JobResourceConfiguration withProperties(Map properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java index c1c7ffbdf77ad..e9b99c20e98cf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The JobScheduleAction model. */ +/** + * The JobScheduleAction model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") @JsonTypeName("CreateJob") @Fluent @@ -21,13 +23,15 @@ public final class JobScheduleAction extends ScheduleActionBase { @JsonProperty(value = "jobDefinition", required = true) private JobBaseProperties jobDefinition; - /** Creates an instance of JobScheduleAction class. */ + /** + * Creates an instance of JobScheduleAction class. + */ public JobScheduleAction() { } /** * Get the jobDefinition property: [Required] Defines Schedule action definition details. - * + * * @return the jobDefinition value. */ public JobBaseProperties jobDefinition() { @@ -36,7 +40,7 @@ public JobBaseProperties jobDefinition() { /** * Set the jobDefinition property: [Required] Defines Schedule action definition details. - * + * * @param jobDefinition the jobDefinition value to set. * @return the JobScheduleAction object itself. */ @@ -47,16 +51,15 @@ public JobScheduleAction withJobDefinition(JobBaseProperties jobDefinition) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (jobDefinition() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property jobDefinition in model JobScheduleAction")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property jobDefinition in model JobScheduleAction")); } else { jobDefinition().validate(); } 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..1c17e92b59813 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Job endpoint definition. */ +/** + * Job endpoint definition. + */ @Fluent public final class JobService { /* @@ -31,7 +33,14 @@ public final class JobService { private String jobServiceType; /* - * Port for endpoint. + * 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 set by user. */ @JsonProperty(value = "port") private Integer port; @@ -49,13 +58,15 @@ public final class JobService { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; - /** Creates an instance of JobService class. */ + /** + * Creates an instance of JobService class. + */ public JobService() { } /** * Get the endpoint property: Url for endpoint. - * + * * @return the endpoint value. */ public String endpoint() { @@ -64,7 +75,7 @@ public String endpoint() { /** * Set the endpoint property: Url for endpoint. - * + * * @param endpoint the endpoint value to set. * @return the JobService object itself. */ @@ -75,7 +86,7 @@ public JobService withEndpoint(String endpoint) { /** * Get the errorMessage property: Any error in the service. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -84,7 +95,7 @@ public String errorMessage() { /** * Get the jobServiceType property: Endpoint type. - * + * * @return the jobServiceType value. */ public String jobServiceType() { @@ -93,7 +104,7 @@ public String jobServiceType() { /** * Set the jobServiceType property: Endpoint type. - * + * * @param jobServiceType the jobServiceType value to set. * @return the JobService object itself. */ @@ -103,8 +114,30 @@ public JobService withJobServiceType(String jobServiceType) { } /** - * Get the port property: Port for endpoint. - * + * 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 set by user. + * * @return the port value. */ public Integer port() { @@ -112,8 +145,8 @@ public Integer port() { } /** - * Set the port property: Port for endpoint. - * + * Set the port property: Port for endpoint set by user. + * * @param port the port value to set. * @return the JobService object itself. */ @@ -124,7 +157,7 @@ public JobService withPort(Integer port) { /** * Get the properties property: Additional properties to set on the endpoint. - * + * * @return the properties value. */ public Map properties() { @@ -133,7 +166,7 @@ public Map properties() { /** * Set the properties property: Additional properties to set on the endpoint. - * + * * @param properties the properties value to set. * @return the JobService object itself. */ @@ -144,7 +177,7 @@ public JobService withProperties(Map properties) { /** * Get the status property: Status of endpoint. - * + * * @return the status value. */ public String status() { @@ -153,9 +186,12 @@ public String status() { /** * Validates the instance. - * + * * @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/JobStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java index 009ec1b6995b5..e196e4d630967 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java @@ -8,53 +8,88 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The status of a job. */ +/** + * The status of a job. + */ public final class JobStatus extends ExpandableStringEnum { - /** Static value NotStarted for JobStatus. */ + /** + * Static value NotStarted for JobStatus. + */ public static final JobStatus NOT_STARTED = fromString("NotStarted"); - /** Static value Starting for JobStatus. */ + /** + * Static value Starting for JobStatus. + */ public static final JobStatus STARTING = fromString("Starting"); - /** Static value Provisioning for JobStatus. */ + /** + * Static value Provisioning for JobStatus. + */ public static final JobStatus PROVISIONING = fromString("Provisioning"); - /** Static value Preparing for JobStatus. */ + /** + * Static value Preparing for JobStatus. + */ public static final JobStatus PREPARING = fromString("Preparing"); - /** Static value Queued for JobStatus. */ + /** + * Static value Queued for JobStatus. + */ public static final JobStatus QUEUED = fromString("Queued"); - /** Static value Running for JobStatus. */ + /** + * Static value Running for JobStatus. + */ public static final JobStatus RUNNING = fromString("Running"); - /** Static value Finalizing for JobStatus. */ + /** + * Static value Finalizing for JobStatus. + */ public static final JobStatus FINALIZING = fromString("Finalizing"); - /** Static value CancelRequested for JobStatus. */ + /** + * Static value CancelRequested for JobStatus. + */ public static final JobStatus CANCEL_REQUESTED = fromString("CancelRequested"); - /** Static value Completed for JobStatus. */ + /** + * Static value Completed for JobStatus. + */ public static final JobStatus COMPLETED = fromString("Completed"); - /** Static value Failed for JobStatus. */ + /** + * Static value Failed for JobStatus. + */ public static final JobStatus FAILED = fromString("Failed"); - /** Static value Canceled for JobStatus. */ + /** + * Static value Canceled for JobStatus. + */ public static final JobStatus CANCELED = fromString("Canceled"); - /** Static value NotResponding for JobStatus. */ + /** + * Static value NotResponding for JobStatus. + */ public static final JobStatus NOT_RESPONDING = fromString("NotResponding"); - /** Static value Paused for JobStatus. */ + /** + * Static value Paused for JobStatus. + */ public static final JobStatus PAUSED = fromString("Paused"); - /** Static value Unknown for JobStatus. */ + /** + * Static value Unknown for JobStatus. + */ public static final JobStatus UNKNOWN = fromString("Unknown"); + /** + * Static value Scheduled for JobStatus. + */ + public static final JobStatus SCHEDULED = fromString("Scheduled"); + /** * Creates a new instance of JobStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -63,7 +98,7 @@ public JobStatus() { /** * Creates or finds a JobStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobStatus. */ @@ -74,7 +109,7 @@ public static JobStatus fromString(String name) { /** * Gets known JobStatus values. - * + * * @return known JobStatus values. */ public static Collection values() { 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..6d9de9b36f9f2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.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.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/JobType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java index 681eb7abb0448..848dc6d116eaa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java @@ -8,23 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine the type of job. */ +/** + * Enum to determine the type of job. + */ public final class JobType extends ExpandableStringEnum { - /** Static value AutoML for JobType. */ + /** + * Static value AutoML for JobType. + */ public static final JobType AUTO_ML = fromString("AutoML"); - /** Static value Command for JobType. */ + /** + * Static value Command for JobType. + */ public static final JobType COMMAND = fromString("Command"); - /** Static value Sweep for JobType. */ + /** + * Static value Labeling for JobType. + */ + public static final JobType LABELING = fromString("Labeling"); + + /** + * Static value Sweep for JobType. + */ public static final JobType SWEEP = fromString("Sweep"); - /** Static value Pipeline for JobType. */ + /** + * Static value Pipeline for JobType. + */ public static final JobType PIPELINE = fromString("Pipeline"); + /** + * Static value Spark for JobType. + */ + public static final JobType SPARK = fromString("Spark"); + + /** + * Static value FineTuning for JobType. + */ + public static final JobType FINE_TUNING = fromString("FineTuning"); + /** * Creates a new instance of JobType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +58,7 @@ public JobType() { /** * Creates or finds a JobType from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobType. */ @@ -44,7 +69,7 @@ public static JobType fromString(String name) { /** * Gets known JobType values. - * + * * @return known JobType values. */ public static Collection values() { 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..b713d8ea5de4b 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Jobs. */ +/** + * Resource collection API of Jobs. + */ public interface Jobs { /** * Lists Jobs in the 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. @@ -24,31 +26,30 @@ public interface Jobs { /** * Lists Jobs in the workspace. - * + * * @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 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 property names (and optionally values). Example: prop1,prop2=value2. + * @param assetName Asset name the job's named output is registered with. + * @param scheduled Indicator whether the job is scheduled job. + * @param scheduleId The scheduled id for listing the job triggered from. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 JobBase entities as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - String jobType, - String tag, - ListViewType listViewType, + PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, String tag, + ListViewType listViewType, String properties, String assetName, Boolean scheduled, String scheduleId, Context context); /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -60,7 +61,7 @@ PagedIterable list( /** * Deletes a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -73,7 +74,7 @@ PagedIterable list( /** * Gets a Job by name/id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -87,7 +88,7 @@ PagedIterable list( /** * Gets a Job by name/id. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -100,7 +101,7 @@ PagedIterable list( /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -112,7 +113,7 @@ PagedIterable list( /** * Cancels a Job (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param id The name and identifier for the Job. This is case-sensitive. @@ -125,7 +126,7 @@ PagedIterable list( /** * Gets a Job by name/id. - * + * * @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. @@ -136,7 +137,7 @@ PagedIterable list( /** * Gets a Job by name/id. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,7 +149,7 @@ PagedIterable list( /** * Deletes a Job (asynchronous). - * + * * @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. @@ -158,7 +159,7 @@ PagedIterable list( /** * Deletes a Job (asynchronous). - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,7 +170,7 @@ PagedIterable list( /** * Begins definition for a new JobBase resource. - * + * * @param name resource name. * @return the first stage of the new JobBase definition. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java new file mode 100644 index 0000000000000..5e0c1aaacc806 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java @@ -0,0 +1,107 @@ +// Copyright (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; + +/** + * Jupyter kernel configuration. + */ +@Fluent +public final class JupyterKernelConfig { + /* + * Argument to the the runtime + */ + @JsonProperty(value = "argv") + private List argv; + + /* + * Display name of the kernel + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Language of the kernel [Example value: python] + */ + @JsonProperty(value = "language") + private String language; + + /** + * Creates an instance of JupyterKernelConfig class. + */ + public JupyterKernelConfig() { + } + + /** + * Get the argv property: Argument to the the runtime. + * + * @return the argv value. + */ + public List argv() { + return this.argv; + } + + /** + * Set the argv property: Argument to the the runtime. + * + * @param argv the argv value to set. + * @return the JupyterKernelConfig object itself. + */ + public JupyterKernelConfig withArgv(List argv) { + this.argv = argv; + return this; + } + + /** + * Get the displayName property: Display name of the kernel. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the kernel. + * + * @param displayName the displayName value to set. + * @return the JupyterKernelConfig object itself. + */ + public JupyterKernelConfig withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the language property: Language of the kernel [Example value: python]. + * + * @return the language value. + */ + public String language() { + return this.language; + } + + /** + * Set the language property: Language of the kernel [Example value: python]. + * + * @param language the language value to set. + * @return the JupyterKernelConfig object itself. + */ + public JupyterKernelConfig withLanguage(String language) { + this.language = language; + 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/KerberosCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.java new file mode 100644 index 0000000000000..2a45546fec1ea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The KerberosCredentials model. + */ +@Fluent +public class KerberosCredentials { + /* + * [Required] IP Address or DNS HostName. + */ + @JsonProperty(value = "kerberosKdcAddress", required = true) + private String kerberosKdcAddress; + + /* + * [Required] Kerberos Username + */ + @JsonProperty(value = "kerberosPrincipal", required = true) + private String kerberosPrincipal; + + /* + * [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or + * service. + */ + @JsonProperty(value = "kerberosRealm", required = true) + private String kerberosRealm; + + /** + * Creates an instance of KerberosCredentials class. + */ + public KerberosCredentials() { + } + + /** + * Get the kerberosKdcAddress property: [Required] IP Address or DNS HostName. + * + * @return the kerberosKdcAddress value. + */ + public String kerberosKdcAddress() { + return this.kerberosKdcAddress; + } + + /** + * Set the kerberosKdcAddress property: [Required] IP Address or DNS HostName. + * + * @param kerberosKdcAddress the kerberosKdcAddress value to set. + * @return the KerberosCredentials object itself. + */ + public KerberosCredentials withKerberosKdcAddress(String kerberosKdcAddress) { + this.kerberosKdcAddress = kerberosKdcAddress; + return this; + } + + /** + * Get the kerberosPrincipal property: [Required] Kerberos Username. + * + * @return the kerberosPrincipal value. + */ + public String kerberosPrincipal() { + return this.kerberosPrincipal; + } + + /** + * Set the kerberosPrincipal property: [Required] Kerberos Username. + * + * @param kerberosPrincipal the kerberosPrincipal value to set. + * @return the KerberosCredentials object itself. + */ + public KerberosCredentials withKerberosPrincipal(String kerberosPrincipal) { + this.kerberosPrincipal = kerberosPrincipal; + return this; + } + + /** + * Get the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority + * to authenticate a user, host or service. + * + * @return the kerberosRealm value. + */ + public String kerberosRealm() { + return this.kerberosRealm; + } + + /** + * Set the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority + * to authenticate a user, host or service. + * + * @param kerberosRealm the kerberosRealm value to set. + * @return the KerberosCredentials object itself. + */ + public KerberosCredentials withKerberosRealm(String kerberosRealm) { + this.kerberosRealm = kerberosRealm; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kerberosKdcAddress() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property kerberosKdcAddress in model KerberosCredentials")); + } + if (kerberosPrincipal() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property kerberosPrincipal in model KerberosCredentials")); + } + if (kerberosRealm() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property kerberosRealm in model KerberosCredentials")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KerberosCredentials.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.java new file mode 100644 index 0000000000000..449db6808f4f1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.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.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 KerberosKeytabCredentials model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") +@JsonTypeName("KerberosKeytab") +@Fluent +public final class KerberosKeytabCredentials extends DatastoreCredentials { + /* + * [Required] Keytab secrets. + */ + @JsonProperty(value = "secrets") + private KerberosKeytabSecrets secrets; + + /* + * [Required] IP Address or DNS HostName. + */ + @JsonProperty(value = "kerberosKdcAddress", required = true) + private String kerberosKdcAddress; + + /* + * [Required] Kerberos Username + */ + @JsonProperty(value = "kerberosPrincipal", required = true) + private String kerberosPrincipal; + + /* + * [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or + * service. + */ + @JsonProperty(value = "kerberosRealm", required = true) + private String kerberosRealm; + + /** + * Creates an instance of KerberosKeytabCredentials class. + */ + public KerberosKeytabCredentials() { + } + + /** + * Get the secrets property: [Required] Keytab secrets. + * + * @return the secrets value. + */ + public KerberosKeytabSecrets secrets() { + return this.secrets; + } + + /** + * Set the secrets property: [Required] Keytab secrets. + * + * @param secrets the secrets value to set. + * @return the KerberosKeytabCredentials object itself. + */ + public KerberosKeytabCredentials withSecrets(KerberosKeytabSecrets secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the kerberosKdcAddress property: [Required] IP Address or DNS HostName. + * + * @return the kerberosKdcAddress value. + */ + public String kerberosKdcAddress() { + return this.kerberosKdcAddress; + } + + /** + * Set the kerberosKdcAddress property: [Required] IP Address or DNS HostName. + * + * @param kerberosKdcAddress the kerberosKdcAddress value to set. + * @return the KerberosKeytabCredentials object itself. + */ + public KerberosKeytabCredentials withKerberosKdcAddress(String kerberosKdcAddress) { + this.kerberosKdcAddress = kerberosKdcAddress; + return this; + } + + /** + * Get the kerberosPrincipal property: [Required] Kerberos Username. + * + * @return the kerberosPrincipal value. + */ + public String kerberosPrincipal() { + return this.kerberosPrincipal; + } + + /** + * Set the kerberosPrincipal property: [Required] Kerberos Username. + * + * @param kerberosPrincipal the kerberosPrincipal value to set. + * @return the KerberosKeytabCredentials object itself. + */ + public KerberosKeytabCredentials withKerberosPrincipal(String kerberosPrincipal) { + this.kerberosPrincipal = kerberosPrincipal; + return this; + } + + /** + * Get the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority + * to authenticate a user, host or service. + * + * @return the kerberosRealm value. + */ + public String kerberosRealm() { + return this.kerberosRealm; + } + + /** + * Set the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority + * to authenticate a user, host or service. + * + * @param kerberosRealm the kerberosRealm value to set. + * @return the KerberosKeytabCredentials object itself. + */ + public KerberosKeytabCredentials withKerberosRealm(String kerberosRealm) { + this.kerberosRealm = kerberosRealm; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (secrets() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property secrets in model KerberosKeytabCredentials")); + } else { + secrets().validate(); + } + if (kerberosKdcAddress() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property kerberosKdcAddress in model KerberosKeytabCredentials")); + } + if (kerberosPrincipal() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property kerberosPrincipal in model KerberosKeytabCredentials")); + } + if (kerberosRealm() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property kerberosRealm in model KerberosKeytabCredentials")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KerberosKeytabCredentials.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.java new file mode 100644 index 0000000000000..46b55231acbf6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The KerberosKeytabSecrets model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") +@JsonTypeName("KerberosKeytab") +@Fluent +public final class KerberosKeytabSecrets extends DatastoreSecretsInner { + /* + * Kerberos keytab secret. + */ + @JsonProperty(value = "kerberosKeytab") + private String kerberosKeytab; + + /** + * Creates an instance of KerberosKeytabSecrets class. + */ + public KerberosKeytabSecrets() { + } + + /** + * Get the kerberosKeytab property: Kerberos keytab secret. + * + * @return the kerberosKeytab value. + */ + public String kerberosKeytab() { + return this.kerberosKeytab; + } + + /** + * Set the kerberosKeytab property: Kerberos keytab secret. + * + * @param kerberosKeytab the kerberosKeytab value to set. + * @return the KerberosKeytabSecrets object itself. + */ + public KerberosKeytabSecrets withKerberosKeytab(String kerberosKeytab) { + this.kerberosKeytab = kerberosKeytab; + 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/KerberosPasswordCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.java new file mode 100644 index 0000000000000..42686bc71fd44 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.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.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 KerberosPasswordCredentials model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") +@JsonTypeName("KerberosPassword") +@Fluent +public final class KerberosPasswordCredentials extends DatastoreCredentials { + /* + * [Required] Kerberos password secrets. + */ + @JsonProperty(value = "secrets") + private KerberosPasswordSecrets secrets; + + /* + * [Required] IP Address or DNS HostName. + */ + @JsonProperty(value = "kerberosKdcAddress", required = true) + private String kerberosKdcAddress; + + /* + * [Required] Kerberos Username + */ + @JsonProperty(value = "kerberosPrincipal", required = true) + private String kerberosPrincipal; + + /* + * [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or + * service. + */ + @JsonProperty(value = "kerberosRealm", required = true) + private String kerberosRealm; + + /** + * Creates an instance of KerberosPasswordCredentials class. + */ + public KerberosPasswordCredentials() { + } + + /** + * Get the secrets property: [Required] Kerberos password secrets. + * + * @return the secrets value. + */ + public KerberosPasswordSecrets secrets() { + return this.secrets; + } + + /** + * Set the secrets property: [Required] Kerberos password secrets. + * + * @param secrets the secrets value to set. + * @return the KerberosPasswordCredentials object itself. + */ + public KerberosPasswordCredentials withSecrets(KerberosPasswordSecrets secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the kerberosKdcAddress property: [Required] IP Address or DNS HostName. + * + * @return the kerberosKdcAddress value. + */ + public String kerberosKdcAddress() { + return this.kerberosKdcAddress; + } + + /** + * Set the kerberosKdcAddress property: [Required] IP Address or DNS HostName. + * + * @param kerberosKdcAddress the kerberosKdcAddress value to set. + * @return the KerberosPasswordCredentials object itself. + */ + public KerberosPasswordCredentials withKerberosKdcAddress(String kerberosKdcAddress) { + this.kerberosKdcAddress = kerberosKdcAddress; + return this; + } + + /** + * Get the kerberosPrincipal property: [Required] Kerberos Username. + * + * @return the kerberosPrincipal value. + */ + public String kerberosPrincipal() { + return this.kerberosPrincipal; + } + + /** + * Set the kerberosPrincipal property: [Required] Kerberos Username. + * + * @param kerberosPrincipal the kerberosPrincipal value to set. + * @return the KerberosPasswordCredentials object itself. + */ + public KerberosPasswordCredentials withKerberosPrincipal(String kerberosPrincipal) { + this.kerberosPrincipal = kerberosPrincipal; + return this; + } + + /** + * Get the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority + * to authenticate a user, host or service. + * + * @return the kerberosRealm value. + */ + public String kerberosRealm() { + return this.kerberosRealm; + } + + /** + * Set the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority + * to authenticate a user, host or service. + * + * @param kerberosRealm the kerberosRealm value to set. + * @return the KerberosPasswordCredentials object itself. + */ + public KerberosPasswordCredentials withKerberosRealm(String kerberosRealm) { + this.kerberosRealm = kerberosRealm; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (secrets() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property secrets in model KerberosPasswordCredentials")); + } else { + secrets().validate(); + } + if (kerberosKdcAddress() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property kerberosKdcAddress in model KerberosPasswordCredentials")); + } + if (kerberosPrincipal() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property kerberosPrincipal in model KerberosPasswordCredentials")); + } + if (kerberosRealm() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property kerberosRealm in model KerberosPasswordCredentials")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KerberosPasswordCredentials.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.java new file mode 100644 index 0000000000000..6fb749acc62e6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The KerberosPasswordSecrets model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") +@JsonTypeName("KerberosPassword") +@Fluent +public final class KerberosPasswordSecrets extends DatastoreSecretsInner { + /* + * Kerberos password secret. + */ + @JsonProperty(value = "kerberosPassword") + private String kerberosPassword; + + /** + * Creates an instance of KerberosPasswordSecrets class. + */ + public KerberosPasswordSecrets() { + } + + /** + * Get the kerberosPassword property: Kerberos password secret. + * + * @return the kerberosPassword value. + */ + public String kerberosPassword() { + return this.kerberosPassword; + } + + /** + * Set the kerberosPassword property: Kerberos password secret. + * + * @param kerberosPassword the kerberosPassword value to set. + * @return the KerberosPasswordSecrets object itself. + */ + public KerberosPasswordSecrets withKerberosPassword(String kerberosPassword) { + this.kerberosPassword = kerberosPassword; + 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/KeyType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java index 5485b2f4e8bc7..3798ffb0ae529 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for KeyType. */ +/** + * Defines values for KeyType. + */ public final class KeyType extends ExpandableStringEnum { - /** Static value Primary for KeyType. */ + /** + * Static value Primary for KeyType. + */ public static final KeyType PRIMARY = fromString("Primary"); - /** Static value Secondary for KeyType. */ + /** + * Static value Secondary for KeyType. + */ public static final KeyType SECONDARY = fromString("Secondary"); /** * Creates a new instance of KeyType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public KeyType() { /** * Creates or finds a KeyType from its string representation. - * + * * @param name a name to look for. * @return the corresponding KeyType. */ @@ -38,7 +44,7 @@ public static KeyType fromString(String name) { /** * Gets known KeyType values. - * + * * @return known KeyType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java new file mode 100644 index 0000000000000..11324c57a5c2c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java @@ -0,0 +1,120 @@ +// Copyright (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; + +/** + * Customer Key vault properties. + */ +@Fluent +public final class KeyVaultProperties { + /* + * Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities + */ + @JsonProperty(value = "identityClientId") + private String identityClientId; + + /* + * KeyVault key identifier to encrypt the data + */ + @JsonProperty(value = "keyIdentifier", required = true) + private String keyIdentifier; + + /* + * KeyVault Arm Id that contains the data encryption key + */ + @JsonProperty(value = "keyVaultArmId", required = true) + private String keyVaultArmId; + + /** + * Creates an instance of KeyVaultProperties class. + */ + public KeyVaultProperties() { + } + + /** + * Get the identityClientId property: Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities. + * + * @return the identityClientId value. + */ + public String identityClientId() { + return this.identityClientId; + } + + /** + * Set the identityClientId property: Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities. + * + * @param identityClientId the identityClientId value to set. + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withIdentityClientId(String identityClientId) { + this.identityClientId = identityClientId; + return this; + } + + /** + * Get the keyIdentifier property: KeyVault key identifier to encrypt the data. + * + * @return the keyIdentifier value. + */ + public String keyIdentifier() { + return this.keyIdentifier; + } + + /** + * Set the keyIdentifier property: KeyVault key identifier to encrypt the data. + * + * @param keyIdentifier the keyIdentifier value to set. + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyIdentifier(String keyIdentifier) { + this.keyIdentifier = keyIdentifier; + return this; + } + + /** + * Get the keyVaultArmId property: KeyVault Arm Id that contains the data encryption key. + * + * @return the keyVaultArmId value. + */ + public String keyVaultArmId() { + return this.keyVaultArmId; + } + + /** + * Set the keyVaultArmId property: KeyVault Arm Id that contains the data encryption key. + * + * @param keyVaultArmId the keyVaultArmId value to set. + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVaultArmId(String keyVaultArmId) { + this.keyVaultArmId = keyVaultArmId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (keyIdentifier() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property keyIdentifier in model KeyVaultProperties")); + } + if (keyVaultArmId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property keyVaultArmId in model KeyVaultProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KeyVaultProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java index e5f2de0d139f2..b6b4704c3ab98 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A Machine Learning compute based on Kubernetes Compute. */ +/** + * A Machine Learning compute based on Kubernetes Compute. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("Kubernetes") @Fluent @@ -20,13 +22,15 @@ public final class Kubernetes extends Compute { @JsonProperty(value = "properties") private KubernetesProperties properties; - /** Creates an instance of Kubernetes class. */ + /** + * Creates an instance of Kubernetes class. + */ public Kubernetes() { } /** * Get the properties property: Properties of Kubernetes. - * + * * @return the properties value. */ public KubernetesProperties properties() { @@ -35,7 +39,7 @@ public KubernetesProperties properties() { /** * Set the properties property: Properties of Kubernetes. - * + * * @param properties the properties value to set. * @return the Kubernetes object itself. */ @@ -44,28 +48,36 @@ public Kubernetes withProperties(KubernetesProperties properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Kubernetes withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Kubernetes withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Kubernetes withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Kubernetes withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -74,7 +86,7 @@ public Kubernetes withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java index 9a07bac3c9c53..ebd9ec75770f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Properties specific to a KubernetesOnlineDeployment. */ +/** + * Properties specific to a KubernetesOnlineDeployment. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") @JsonTypeName("Kubernetes") @Fluent @@ -21,13 +23,15 @@ public final class KubernetesOnlineDeployment extends OnlineDeploymentProperties @JsonProperty(value = "containerResourceRequirements") private ContainerResourceRequirements containerResourceRequirements; - /** Creates an instance of KubernetesOnlineDeployment class. */ + /** + * Creates an instance of KubernetesOnlineDeployment class. + */ public KubernetesOnlineDeployment() { } /** * Get the containerResourceRequirements property: The resource requirements for the container (cpu and memory). - * + * * @return the containerResourceRequirements value. */ public ContainerResourceRequirements containerResourceRequirements() { @@ -36,109 +40,146 @@ public ContainerResourceRequirements containerResourceRequirements() { /** * Set the containerResourceRequirements property: The resource requirements for the container (cpu and memory). - * + * * @param containerResourceRequirements the containerResourceRequirements value to set. * @return the KubernetesOnlineDeployment object itself. */ - public KubernetesOnlineDeployment withContainerResourceRequirements( - ContainerResourceRequirements containerResourceRequirements) { + public KubernetesOnlineDeployment + withContainerResourceRequirements(ContainerResourceRequirements containerResourceRequirements) { this.containerResourceRequirements = containerResourceRequirements; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { super.withAppInsightsEnabled(appInsightsEnabled); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public KubernetesOnlineDeployment withDataCollector(DataCollector dataCollector) { + super.withDataCollector(dataCollector); + return this; + } + + /** + * {@inheritDoc} + */ @Override - public KubernetesOnlineDeployment withEgressPublicNetworkAccess( - EgressPublicNetworkAccessType egressPublicNetworkAccess) { + public KubernetesOnlineDeployment + withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withInstanceType(String instanceType) { super.withInstanceType(instanceType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { super.withLivenessProbe(livenessProbe); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withModel(String model) { super.withModel(model); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { super.withModelMountPath(modelMountPath); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { super.withReadinessProbe(readinessProbe); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { super.withRequestSettings(requestSettings); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { super.withScaleSettings(scaleSettings); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { super.withCodeConfiguration(codeConfiguration); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withEnvironmentId(String environmentId) { super.withEnvironmentId(environmentId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withEnvironmentVariables(Map environmentVariables) { super.withEnvironmentVariables(environmentVariables); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public KubernetesOnlineDeployment withProperties(Map properties) { super.withProperties(properties); @@ -147,7 +188,7 @@ public KubernetesOnlineDeployment withProperties(Map properties) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java index a361ed5f3a585..1c51a1393fceb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Kubernetes properties. */ +/** + * Kubernetes properties. + */ @Fluent public final class KubernetesProperties { /* @@ -61,13 +63,15 @@ public final class KubernetesProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map instanceTypes; - /** Creates an instance of KubernetesProperties class. */ + /** + * Creates an instance of KubernetesProperties class. + */ public KubernetesProperties() { } /** * Get the relayConnectionString property: Relay connection string. - * + * * @return the relayConnectionString value. */ public String relayConnectionString() { @@ -76,7 +80,7 @@ public String relayConnectionString() { /** * Set the relayConnectionString property: Relay connection string. - * + * * @param relayConnectionString the relayConnectionString value to set. * @return the KubernetesProperties object itself. */ @@ -87,7 +91,7 @@ public KubernetesProperties withRelayConnectionString(String relayConnectionStri /** * Get the serviceBusConnectionString property: ServiceBus connection string. - * + * * @return the serviceBusConnectionString value. */ public String serviceBusConnectionString() { @@ -96,7 +100,7 @@ public String serviceBusConnectionString() { /** * Set the serviceBusConnectionString property: ServiceBus connection string. - * + * * @param serviceBusConnectionString the serviceBusConnectionString value to set. * @return the KubernetesProperties object itself. */ @@ -107,7 +111,7 @@ public KubernetesProperties withServiceBusConnectionString(String serviceBusConn /** * Get the extensionPrincipalId property: Extension principal-id. - * + * * @return the extensionPrincipalId value. */ public String extensionPrincipalId() { @@ -116,7 +120,7 @@ public String extensionPrincipalId() { /** * Set the extensionPrincipalId property: Extension principal-id. - * + * * @param extensionPrincipalId the extensionPrincipalId value to set. * @return the KubernetesProperties object itself. */ @@ -127,7 +131,7 @@ public KubernetesProperties withExtensionPrincipalId(String extensionPrincipalId /** * Get the extensionInstanceReleaseTrain property: Extension instance release train. - * + * * @return the extensionInstanceReleaseTrain value. */ public String extensionInstanceReleaseTrain() { @@ -136,7 +140,7 @@ public String extensionInstanceReleaseTrain() { /** * Set the extensionInstanceReleaseTrain property: Extension instance release train. - * + * * @param extensionInstanceReleaseTrain the extensionInstanceReleaseTrain value to set. * @return the KubernetesProperties object itself. */ @@ -147,7 +151,7 @@ public KubernetesProperties withExtensionInstanceReleaseTrain(String extensionIn /** * Get the vcName property: VC name. - * + * * @return the vcName value. */ public String vcName() { @@ -156,7 +160,7 @@ public String vcName() { /** * Set the vcName property: VC name. - * + * * @param vcName the vcName value to set. * @return the KubernetesProperties object itself. */ @@ -167,7 +171,7 @@ public KubernetesProperties withVcName(String vcName) { /** * Get the namespace property: Compute namespace. - * + * * @return the namespace value. */ public String namespace() { @@ -176,7 +180,7 @@ public String namespace() { /** * Set the namespace property: Compute namespace. - * + * * @param namespace the namespace value to set. * @return the KubernetesProperties object itself. */ @@ -187,7 +191,7 @@ public KubernetesProperties withNamespace(String namespace) { /** * Get the defaultInstanceType property: Default instance type. - * + * * @return the defaultInstanceType value. */ public String defaultInstanceType() { @@ -196,7 +200,7 @@ public String defaultInstanceType() { /** * Set the defaultInstanceType property: Default instance type. - * + * * @param defaultInstanceType the defaultInstanceType value to set. * @return the KubernetesProperties object itself. */ @@ -207,7 +211,7 @@ public KubernetesProperties withDefaultInstanceType(String defaultInstanceType) /** * Get the instanceTypes property: Instance Type Schema. - * + * * @return the instanceTypes value. */ public Map instanceTypes() { @@ -216,7 +220,7 @@ public Map instanceTypes() { /** * Set the instanceTypes property: Instance Type Schema. - * + * * @param instanceTypes the instanceTypes value to set. * @return the KubernetesProperties object itself. */ @@ -227,19 +231,16 @@ public KubernetesProperties withInstanceTypes(Map in /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (instanceTypes() != null) { - instanceTypes() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + instanceTypes().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java index 98634b93fcb39..2e18e3af119e7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Kubernetes Compute Schema. */ +/** + * Kubernetes Compute Schema. + */ @Fluent public class KubernetesSchema { /* @@ -16,13 +18,15 @@ public class KubernetesSchema { @JsonProperty(value = "properties") private KubernetesProperties properties; - /** Creates an instance of KubernetesSchema class. */ + /** + * Creates an instance of KubernetesSchema class. + */ public KubernetesSchema() { } /** * Get the properties property: Properties of Kubernetes. - * + * * @return the properties value. */ public KubernetesProperties properties() { @@ -31,7 +35,7 @@ public KubernetesProperties properties() { /** * Set the properties property: Properties of Kubernetes. - * + * * @param properties the properties value to set. * @return the KubernetesSchema object itself. */ @@ -42,7 +46,7 @@ public KubernetesSchema withProperties(KubernetesProperties properties) { /** * 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/LabelCategory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelCategory.java new file mode 100644 index 0000000000000..cb74f2d28457e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelCategory.java @@ -0,0 +1,116 @@ +// Copyright (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; + +/** + * Label category definition. + */ +@Fluent +public final class LabelCategory { + /* + * Dictionary of label classes in this category. + */ + @JsonProperty(value = "classes") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map classes; + + /* + * Display name of the label category. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Indicates whether it is allowed to select multiple classes in this category. + */ + @JsonProperty(value = "multiSelect") + private MultiSelect multiSelect; + + /** + * Creates an instance of LabelCategory class. + */ + public LabelCategory() { + } + + /** + * Get the classes property: Dictionary of label classes in this category. + * + * @return the classes value. + */ + public Map classes() { + return this.classes; + } + + /** + * Set the classes property: Dictionary of label classes in this category. + * + * @param classes the classes value to set. + * @return the LabelCategory object itself. + */ + public LabelCategory withClasses(Map classes) { + this.classes = classes; + return this; + } + + /** + * Get the displayName property: Display name of the label category. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the label category. + * + * @param displayName the displayName value to set. + * @return the LabelCategory object itself. + */ + public LabelCategory withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the multiSelect property: Indicates whether it is allowed to select multiple classes in this category. + * + * @return the multiSelect value. + */ + public MultiSelect multiSelect() { + return this.multiSelect; + } + + /** + * Set the multiSelect property: Indicates whether it is allowed to select multiple classes in this category. + * + * @param multiSelect the multiSelect value to set. + * @return the LabelCategory object itself. + */ + public LabelCategory withMultiSelect(MultiSelect multiSelect) { + this.multiSelect = multiSelect; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (classes() != null) { + classes().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelClass.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelClass.java new file mode 100644 index 0000000000000..5eec31d8ea5de --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelClass.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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Label class definition. + */ +@Fluent +public final class LabelClass { + /* + * Display name of the label class. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Dictionary of subclasses of the label class. + */ + @JsonProperty(value = "subclasses") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map subclasses; + + /** + * Creates an instance of LabelClass class. + */ + public LabelClass() { + } + + /** + * Get the displayName property: Display name of the label class. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the label class. + * + * @param displayName the displayName value to set. + * @return the LabelClass object itself. + */ + public LabelClass withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the subclasses property: Dictionary of subclasses of the label class. + * + * @return the subclasses value. + */ + public Map subclasses() { + return this.subclasses; + } + + /** + * Set the subclasses property: Dictionary of subclasses of the label class. + * + * @param subclasses the subclasses value to set. + * @return the LabelClass object itself. + */ + public LabelClass withSubclasses(Map subclasses) { + this.subclasses = subclasses; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subclasses() != null) { + subclasses().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingDataConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingDataConfiguration.java new file mode 100644 index 0000000000000..a288752ec9561 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingDataConfiguration.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Labeling data configuration definition. + */ +@Fluent +public final class LabelingDataConfiguration { + /* + * Resource Id of the data asset to perform labeling. + */ + @JsonProperty(value = "dataId") + private String dataId; + + /* + * Indicates whether to enable incremental data refresh. + */ + @JsonProperty(value = "incrementalDataRefresh") + private IncrementalDataRefresh incrementalDataRefresh; + + /** + * Creates an instance of LabelingDataConfiguration class. + */ + public LabelingDataConfiguration() { + } + + /** + * Get the dataId property: Resource Id of the data asset to perform labeling. + * + * @return the dataId value. + */ + public String dataId() { + return this.dataId; + } + + /** + * Set the dataId property: Resource Id of the data asset to perform labeling. + * + * @param dataId the dataId value to set. + * @return the LabelingDataConfiguration object itself. + */ + public LabelingDataConfiguration withDataId(String dataId) { + this.dataId = dataId; + return this; + } + + /** + * Get the incrementalDataRefresh property: Indicates whether to enable incremental data refresh. + * + * @return the incrementalDataRefresh value. + */ + public IncrementalDataRefresh incrementalDataRefresh() { + return this.incrementalDataRefresh; + } + + /** + * Set the incrementalDataRefresh property: Indicates whether to enable incremental data refresh. + * + * @param incrementalDataRefresh the incrementalDataRefresh value to set. + * @return the LabelingDataConfiguration object itself. + */ + public LabelingDataConfiguration withIncrementalDataRefresh(IncrementalDataRefresh incrementalDataRefresh) { + this.incrementalDataRefresh = incrementalDataRefresh; + 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/LabelingJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJob.java new file mode 100644 index 0000000000000..0e6c3a681522f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJob.java @@ -0,0 +1,257 @@ +// Copyright (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.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; + +/** + * An immutable client-side representation of LabelingJob. + */ +public interface LabelingJob { + /** + * 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. + */ + LabelingJobProperties 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.LabelingJobInner object. + * + * @return the inner object. + */ + LabelingJobInner innerModel(); + + /** + * The entirety of the LabelingJob definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The LabelingJob definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the LabelingJob definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the LabelingJob 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 LabelingJob 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(LabelingJobPropertiesInner properties); + } + + /** + * The stage of the LabelingJob 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. + */ + LabelingJob create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + LabelingJob create(Context context); + } + } + + /** + * Begins update for the LabelingJob resource. + * + * @return the stage of resource update. + */ + LabelingJob.Update update(); + + /** + * The template for LabelingJob update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + LabelingJob apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + LabelingJob apply(Context context); + } + + /** + * The LabelingJob update stages. + */ + interface UpdateStages { + /** + * The stage of the LabelingJob 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(LabelingJobPropertiesInner properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + LabelingJob refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + LabelingJob refresh(Context context); + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + ExportSummary exportLabels(ExportSummaryInner body); + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + ExportSummary exportLabels(ExportSummaryInner body, Context context); + + /** + * Pause a labeling job. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition along with {@link Response}. + */ + Response pauseWithResponse(Context context); + + /** + * Pause a labeling job. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + LabelingJobProperties pause(); + + /** + * Resume a labeling job (asynchronous). + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + LabelingJobProperties resume(); + + /** + * Resume a labeling job (asynchronous). + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + LabelingJobProperties resume(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobImageProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobImageProperties.java new file mode 100644 index 0000000000000..ea6a3455ca3b6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobImageProperties.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.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of a labeling job for image data. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mediaType") +@JsonTypeName("Image") +@Fluent +public final class LabelingJobImageProperties extends LabelingJobMediaProperties { + /* + * Annotation type of image labeling job. + */ + @JsonProperty(value = "annotationType") + private ImageAnnotationType annotationType; + + /** + * Creates an instance of LabelingJobImageProperties class. + */ + public LabelingJobImageProperties() { + } + + /** + * Get the annotationType property: Annotation type of image labeling job. + * + * @return the annotationType value. + */ + public ImageAnnotationType annotationType() { + return this.annotationType; + } + + /** + * Set the annotationType property: Annotation type of image labeling job. + * + * @param annotationType the annotationType value to set. + * @return the LabelingJobImageProperties object itself. + */ + public LabelingJobImageProperties withAnnotationType(ImageAnnotationType annotationType) { + this.annotationType = annotationType; + 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/LabelingJobInstructions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobInstructions.java new file mode 100644 index 0000000000000..aa67ae5f00eb5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobInstructions.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; + +/** + * Instructions for labeling job. + */ +@Fluent +public final class LabelingJobInstructions { + /* + * The link to a page with detailed labeling instructions for labelers. + */ + @JsonProperty(value = "uri") + private String uri; + + /** + * Creates an instance of LabelingJobInstructions class. + */ + public LabelingJobInstructions() { + } + + /** + * Get the uri property: The link to a page with detailed labeling instructions for labelers. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: The link to a page with detailed labeling instructions for labelers. + * + * @param uri the uri value to set. + * @return the LabelingJobInstructions object itself. + */ + public LabelingJobInstructions withUri(String uri) { + this.uri = uri; + 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/LabelingJobMediaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobMediaProperties.java new file mode 100644 index 0000000000000..ec5cf1c3d8748 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobMediaProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Properties of a labeling job. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "mediaType", + defaultImpl = LabelingJobMediaProperties.class) +@JsonTypeName("LabelingJobMediaProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Image", value = LabelingJobImageProperties.class), + @JsonSubTypes.Type(name = "Text", value = LabelingJobTextProperties.class) }) +@Immutable +public class LabelingJobMediaProperties { + /** + * Creates an instance of LabelingJobMediaProperties class. + */ + public LabelingJobMediaProperties() { + } + + /** + * 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/LabelingJobProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobProperties.java new file mode 100644 index 0000000000000..7930e52b313b2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobProperties.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.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** + * An immutable client-side representation of LabelingJobProperties. + */ +public interface LabelingJobProperties { + /** + * Gets the description property: The asset description text. + * + * @return the description value. + */ + String description(); + + /** + * Gets the properties property: The asset property dictionary. + * + * @return the properties value. + */ + Map properties(); + + /** + * Gets the tags property: Tag dictionary. Tags can be added, removed, and updated. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the componentId property: ARM resource ID of the component resource. + * + * @return the componentId value. + */ + String componentId(); + + /** + * Gets the computeId property: ARM resource ID of the compute resource. + * + * @return the computeId value. + */ + String computeId(); + + /** + * Gets the displayName property: Display name of job. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in + * the "Default" experiment. + * + * @return the experimentName value. + */ + String experimentName(); + + /** + * Gets the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, + * UserIdentity or null. + * Defaults to AmlToken if null. + * + * @return the identity value. + */ + IdentityConfiguration identity(); + + /** + * Gets the isArchived property: Is the asset archived?. + * + * @return the isArchived value. + */ + Boolean isArchived(); + + /** + * Gets the notificationSetting property: Notification setting for the job. + * + * @return the notificationSetting value. + */ + NotificationSetting notificationSetting(); + + /** + * Gets the secretsConfiguration property: Configuration for secrets to be made available during runtime. + * + * @return the secretsConfiguration value. + */ + Map secretsConfiguration(); + + /** + * Gets the services property: List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + * + * @return the services value. + */ + Map services(); + + /** + * Gets the status property: Status of the job. + * + * @return the status value. + */ + JobStatus status(); + + /** + * Gets the createdDateTime property: Created time of the job in UTC timezone. + * + * @return the createdDateTime value. + */ + OffsetDateTime createdDateTime(); + + /** + * Gets the dataConfiguration property: Configuration of data used in the job. + * + * @return the dataConfiguration value. + */ + LabelingDataConfiguration dataConfiguration(); + + /** + * Gets the jobInstructions property: Labeling instructions of the job. + * + * @return the jobInstructions value. + */ + LabelingJobInstructions jobInstructions(); + + /** + * Gets the labelCategories property: Label categories of the job. + * + * @return the labelCategories value. + */ + Map labelCategories(); + + /** + * Gets the labelingJobMediaProperties property: Media type specific properties in the job. + * + * @return the labelingJobMediaProperties value. + */ + LabelingJobMediaProperties labelingJobMediaProperties(); + + /** + * Gets the mlAssistConfiguration property: Configuration of MLAssist feature in the job. + * + * @return the mlAssistConfiguration value. + */ + MLAssistConfiguration mlAssistConfiguration(); + + /** + * Gets the progressMetrics property: Progress metrics of the job. + * + * @return the progressMetrics value. + */ + ProgressMetrics progressMetrics(); + + /** + * Gets the projectId property: Internal id of the job(Previously called project). + * + * @return the projectId value. + */ + UUID projectId(); + + /** + * Gets the provisioningState property: Specifies the labeling job provisioning state. + * + * @return the provisioningState value. + */ + JobProvisioningState provisioningState(); + + /** + * Gets the statusMessages property: Status messages of the job. + * + * @return the statusMessages value. + */ + List statusMessages(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner object. + * + * @return the inner object. + */ + LabelingJobPropertiesInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..df2138f6c5c7e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A paginated list of LabelingJob entities. + */ +@Fluent +public final class LabelingJobResourceArmPaginatedResult { + /* + * The link to the next page of LabelingJob objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type LabelingJob. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of LabelingJobResourceArmPaginatedResult class. + */ + public LabelingJobResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of LabelingJob 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 LabelingJob objects. If null, there are no additional + * pages. + * + * @param nextLink the nextLink value to set. + * @return the LabelingJobResourceArmPaginatedResult object itself. + */ + public LabelingJobResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type LabelingJob. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type LabelingJob. + * + * @param value the value value to set. + * @return the LabelingJobResourceArmPaginatedResult object itself. + */ + public LabelingJobResourceArmPaginatedResult 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/LabelingJobTextProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobTextProperties.java new file mode 100644 index 0000000000000..27bdedbb07a3b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobTextProperties.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.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of a labeling job for text data. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mediaType") +@JsonTypeName("Text") +@Fluent +public final class LabelingJobTextProperties extends LabelingJobMediaProperties { + /* + * Annotation type of text labeling job. + */ + @JsonProperty(value = "annotationType") + private TextAnnotationType annotationType; + + /** + * Creates an instance of LabelingJobTextProperties class. + */ + public LabelingJobTextProperties() { + } + + /** + * Get the annotationType property: Annotation type of text labeling job. + * + * @return the annotationType value. + */ + public TextAnnotationType annotationType() { + return this.annotationType; + } + + /** + * Set the annotationType property: Annotation type of text labeling job. + * + * @param annotationType the annotationType value to set. + * @return the LabelingJobTextProperties object itself. + */ + public LabelingJobTextProperties withAnnotationType(TextAnnotationType annotationType) { + this.annotationType = annotationType; + 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/LabelingJobs.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobs.java new file mode 100644 index 0000000000000..77462654260c0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelingJobs.java @@ -0,0 +1,236 @@ +// Copyright (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.ExportSummaryInner; + +/** + * Resource collection API of LabelingJobs. + */ +public interface LabelingJobs { + /** + * Lists labeling jobs in the 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 a paginated list of LabelingJob entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists labeling jobs in the workspace. + * + * @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 top Number of labeling jobs to return. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 LabelingJob entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer top, + Context context); + + /** + * Delete a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 deleteWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + + /** + * Delete a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 id); + + /** + * Gets a labeling job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + + /** + * Gets a labeling job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a labeling job by name/id. + */ + LabelingJob get(String resourceGroupName, String workspaceName, String id); + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + ExportSummary exportLabels(String resourceGroupName, String workspaceName, String id, ExportSummaryInner body); + + /** + * Export labels from a labeling job (asynchronous). Using the URL in the Location header, the status of the job + * export operation can be tracked. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param body The export summary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + ExportSummary exportLabels(String resourceGroupName, String workspaceName, String id, ExportSummaryInner body, + Context context); + + /** + * Pause a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition along with {@link Response}. + */ + Response pauseWithResponse(String resourceGroupName, String workspaceName, String id, + Context context); + + /** + * Pause a labeling job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + LabelingJobProperties pause(String resourceGroupName, String workspaceName, String id); + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + LabelingJobProperties resume(String resourceGroupName, String workspaceName, String id); + + /** + * Resume a labeling job (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param id The name and identifier for the LabelingJob. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return labeling job definition. + */ + LabelingJobProperties resume(String resourceGroupName, String workspaceName, String id, Context context); + + /** + * Gets a labeling job by name/id. + * + * @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 a labeling job by name/id along with {@link Response}. + */ + LabelingJob getById(String id); + + /** + * Gets a labeling job by name/id. + * + * @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 a labeling job by name/id along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a labeling job. + * + * @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 a labeling job. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new LabelingJob resource. + * + * @param name resource name. + * @return the first stage of the new LabelingJob definition. + */ + LabelingJob.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java new file mode 100644 index 0000000000000..3798fdb16f32c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The LakeHouseArtifact model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "artifactType") +@JsonTypeName("LakeHouse") +@Fluent +public final class LakeHouseArtifact extends OneLakeArtifact { + /** + * Creates an instance of LakeHouseArtifact class. + */ + public LakeHouseArtifact() { + } + + /** + * {@inheritDoc} + */ + @Override + public LakeHouseArtifact withArtifactName(String artifactName) { + super.withArtifactName(artifactName); + 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/LearningRateScheduler.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java index 1b916e37dd4c6..fc37b808d6bc2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Learning rate scheduler enum. */ +/** + * Learning rate scheduler enum. + */ public final class LearningRateScheduler extends ExpandableStringEnum { - /** Static value None for LearningRateScheduler. */ + /** + * Static value None for LearningRateScheduler. + */ public static final LearningRateScheduler NONE = fromString("None"); - /** Static value WarmupCosine for LearningRateScheduler. */ + /** + * Static value WarmupCosine for LearningRateScheduler. + */ public static final LearningRateScheduler WARMUP_COSINE = fromString("WarmupCosine"); - /** Static value Step for LearningRateScheduler. */ + /** + * Static value Step for LearningRateScheduler. + */ public static final LearningRateScheduler STEP = fromString("Step"); /** * Creates a new instance of LearningRateScheduler value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public LearningRateScheduler() { /** * Creates or finds a LearningRateScheduler from its string representation. - * + * * @param name a name to look for. * @return the corresponding LearningRateScheduler. */ @@ -41,7 +49,7 @@ public static LearningRateScheduler fromString(String name) { /** * Gets known LearningRateScheduler values. - * + * * @return known LearningRateScheduler values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.java index 4eb345cb6c34b..af6acf9bd83e9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The List Aml user feature operation response. */ +/** + * The List Aml user feature operation response. + */ @Immutable public final class ListAmlUserFeatureResult { /* @@ -25,13 +27,15 @@ public final class ListAmlUserFeatureResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ListAmlUserFeatureResult class. */ + /** + * Creates an instance of ListAmlUserFeatureResult class. + */ public ListAmlUserFeatureResult() { } /** * Get the value property: The list of AML user facing features. - * + * * @return the value value. */ public List value() { @@ -41,7 +45,7 @@ public List value() { /** * Get the nextLink property: The URI to fetch the next page of AML user features information. Call ListNext() with * this to fetch the next page of AML user features information. - * + * * @return the nextLink value. */ public String nextLink() { @@ -50,7 +54,7 @@ public String nextLink() { /** * 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/ListNotebookKeysResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java index 7ee8bc352a961..e765d948242c9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; -/** An immutable client-side representation of ListNotebookKeysResult. */ +/** + * An immutable client-side representation of ListNotebookKeysResult. + */ public interface ListNotebookKeysResult { /** - * Gets the primaryAccessKey property: The primaryAccessKey property. - * + * Gets the primaryAccessKey property: The primary access key of the Notebook. + * * @return the primaryAccessKey value. */ String primaryAccessKey(); /** - * Gets the secondaryAccessKey property: The secondaryAccessKey property. - * + * Gets the secondaryAccessKey property: The secondary access key of the Notebook. + * * @return the secondaryAccessKey value. */ String secondaryAccessKey(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner object. - * + * * @return the inner object. */ ListNotebookKeysResultInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java index 53a4f6c3e392d..a97793267473f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java @@ -6,18 +6,20 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner; -/** An immutable client-side representation of ListStorageAccountKeysResult. */ +/** + * An immutable client-side representation of ListStorageAccountKeysResult. + */ public interface ListStorageAccountKeysResult { /** - * Gets the userStorageKey property: The userStorageKey property. - * + * Gets the userStorageKey property: The access key of the storage. + * * @return the userStorageKey value. */ String userStorageKey(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner object. - * + * * @return the inner object. */ ListStorageAccountKeysResultInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.java index dd06b71d3580f..052eb7028dea0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The List Usages operation response. */ +/** + * The List Usages operation response. + */ @Immutable public final class ListUsagesResult { /* @@ -25,13 +27,15 @@ public final class ListUsagesResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ListUsagesResult class. */ + /** + * Creates an instance of ListUsagesResult class. + */ public ListUsagesResult() { } /** * Get the value property: The list of AML resource usages. - * + * * @return the value value. */ public List value() { @@ -39,9 +43,9 @@ public List value() { } /** - * Get the nextLink property: The URI to fetch the next page of AML resource usage information. Call ListNext() with - * this to fetch the next page of AML resource usage information. - * + * Get the nextLink property: The URI to fetch the next page of AML resource usage information. Call ListNext() + * with this to fetch the next page of AML resource usage information. + * * @return the nextLink value. */ public String nextLink() { @@ -50,7 +54,7 @@ public String nextLink() { /** * 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/ListViewType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java index 8f096a4b8567c..3f706ad1f9927 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ListViewType. */ +/** + * Defines values for ListViewType. + */ public final class ListViewType extends ExpandableStringEnum { - /** Static value ActiveOnly for ListViewType. */ + /** + * Static value ActiveOnly for ListViewType. + */ public static final ListViewType ACTIVE_ONLY = fromString("ActiveOnly"); - /** Static value ArchivedOnly for ListViewType. */ + /** + * Static value ArchivedOnly for ListViewType. + */ public static final ListViewType ARCHIVED_ONLY = fromString("ArchivedOnly"); - /** Static value All for ListViewType. */ + /** + * Static value All for ListViewType. + */ public static final ListViewType ALL = fromString("All"); /** * Creates a new instance of ListViewType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ListViewType() { /** * Creates or finds a ListViewType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ListViewType. */ @@ -41,7 +49,7 @@ public static ListViewType fromString(String name) { /** * Gets known ListViewType values. - * + * * @return known ListViewType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java index 37ea530b96fb2..feefb6112a4dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java @@ -6,46 +6,48 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner; -/** An immutable client-side representation of ListWorkspaceKeysResult. */ +/** + * An immutable client-side representation of ListWorkspaceKeysResult. + */ public interface ListWorkspaceKeysResult { /** - * Gets the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - String userStorageKey(); - - /** - * Gets the userStorageResourceId property: The userStorageResourceId property. - * - * @return the userStorageResourceId value. - */ - String userStorageResourceId(); - - /** - * Gets the appInsightsInstrumentationKey property: The appInsightsInstrumentationKey property. - * + * Gets the appInsightsInstrumentationKey property: The access key of the workspace app insights. + * * @return the appInsightsInstrumentationKey value. */ String appInsightsInstrumentationKey(); /** * Gets the containerRegistryCredentials property: The containerRegistryCredentials property. - * + * * @return the containerRegistryCredentials value. */ RegistryListCredentialsResult containerRegistryCredentials(); /** * Gets the notebookAccessKeys property: The notebookAccessKeys property. - * + * * @return the notebookAccessKeys value. */ ListNotebookKeysResult notebookAccessKeys(); + /** + * Gets the userStorageArmId property: The arm Id key of the workspace storage. + * + * @return the userStorageArmId value. + */ + String userStorageArmId(); + + /** + * Gets the userStorageKey property: The access key of the workspace storage. + * + * @return the userStorageKey value. + */ + String userStorageKey(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner object. - * + * * @return the inner object. */ ListWorkspaceKeysResultInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.java index a54a6f6a93f09..fc032e1ed07c6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The List WorkspaceQuotasByVMFamily operation response. */ +/** + * The List WorkspaceQuotasByVMFamily operation response. + */ @Immutable public final class ListWorkspaceQuotas { /* @@ -25,13 +27,15 @@ public final class ListWorkspaceQuotas { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ListWorkspaceQuotas class. */ + /** + * Creates an instance of ListWorkspaceQuotas class. + */ public ListWorkspaceQuotas() { } /** * Get the value property: The list of Workspace Quotas by VM Family. - * + * * @return the value value. */ public List value() { @@ -41,7 +45,7 @@ public List value() { /** * Get the nextLink property: The URI to fetch the next page of workspace quota information by VM Family. Call * ListNext() with this to fetch the next page of Workspace Quota information. - * + * * @return the nextLink value. */ public String nextLink() { @@ -50,7 +54,7 @@ public String nextLink() { /** * 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/LiteralJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java index bd08d1b9305af..918f6bd6fc1ac 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Literal input type. */ +/** + * Literal input type. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") @JsonTypeName("literal") @Fluent @@ -21,13 +23,15 @@ public final class LiteralJobInput extends JobInput { @JsonProperty(value = "value", required = true) private String value; - /** Creates an instance of LiteralJobInput class. */ + /** + * Creates an instance of LiteralJobInput class. + */ public LiteralJobInput() { } /** * Get the value property: [Required] Literal value for the input. - * + * * @return the value value. */ public String value() { @@ -36,7 +40,7 @@ public String value() { /** * Set the value property: [Required] Literal value for the input. - * + * * @param value the value value to set. * @return the LiteralJobInput object itself. */ @@ -45,7 +49,9 @@ public LiteralJobInput withValue(String value) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public LiteralJobInput withDescription(String description) { super.withDescription(description); @@ -54,16 +60,15 @@ public LiteralJobInput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model LiteralJobInput")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model LiteralJobInput")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java index 045fe35c90231..37f8916572bb4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Load Balancer Type. */ +/** + * Load Balancer Type. + */ public final class LoadBalancerType extends ExpandableStringEnum { - /** Static value PublicIp for LoadBalancerType. */ + /** + * Static value PublicIp for LoadBalancerType. + */ public static final LoadBalancerType PUBLIC_IP = fromString("PublicIp"); - /** Static value InternalLoadBalancer for LoadBalancerType. */ + /** + * Static value InternalLoadBalancer for LoadBalancerType. + */ public static final LoadBalancerType INTERNAL_LOAD_BALANCER = fromString("InternalLoadBalancer"); /** * Creates a new instance of LoadBalancerType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public LoadBalancerType() { /** * Creates or finds a LoadBalancerType from its string representation. - * + * * @param name a name to look for. * @return the corresponding LoadBalancerType. */ @@ -38,7 +44,7 @@ public static LoadBalancerType fromString(String name) { /** * Gets known LoadBalancerType values. - * + * * @return known LoadBalancerType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogTrainingMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogTrainingMetrics.java new file mode 100644 index 0000000000000..bc40c07e818b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogTrainingMetrics.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 LogTrainingMetrics. + */ +public final class LogTrainingMetrics extends ExpandableStringEnum { + /** + * Static value Enable for LogTrainingMetrics. + */ + public static final LogTrainingMetrics ENABLE = fromString("Enable"); + + /** + * Static value Disable for LogTrainingMetrics. + */ + public static final LogTrainingMetrics DISABLE = fromString("Disable"); + + /** + * Creates a new instance of LogTrainingMetrics value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogTrainingMetrics() { + } + + /** + * Creates or finds a LogTrainingMetrics from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogTrainingMetrics. + */ + @JsonCreator + public static LogTrainingMetrics fromString(String name) { + return fromString(name, LogTrainingMetrics.class); + } + + /** + * Gets known LogTrainingMetrics values. + * + * @return known LogTrainingMetrics values. + */ + public static Collection values() { + return values(LogTrainingMetrics.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogValidationLoss.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogValidationLoss.java new file mode 100644 index 0000000000000..b3f7f23a0234b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogValidationLoss.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 LogValidationLoss. + */ +public final class LogValidationLoss extends ExpandableStringEnum { + /** + * Static value Enable for LogValidationLoss. + */ + public static final LogValidationLoss ENABLE = fromString("Enable"); + + /** + * Static value Disable for LogValidationLoss. + */ + public static final LogValidationLoss DISABLE = fromString("Disable"); + + /** + * Creates a new instance of LogValidationLoss value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LogValidationLoss() { + } + + /** + * Creates or finds a LogValidationLoss from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogValidationLoss. + */ + @JsonCreator + public static LogValidationLoss fromString(String name) { + return fromString(name, LogValidationLoss.class); + } + + /** + * Gets known LogValidationLoss values. + * + * @return known LogValidationLoss values. + */ + public static Collection values() { + return values(LogValidationLoss.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java index 0d8fac3b0e253..d0e448d37863a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum for setting log verbosity. */ +/** + * Enum for setting log verbosity. + */ public final class LogVerbosity extends ExpandableStringEnum { - /** Static value NotSet for LogVerbosity. */ + /** + * Static value NotSet for LogVerbosity. + */ public static final LogVerbosity NOT_SET = fromString("NotSet"); - /** Static value Debug for LogVerbosity. */ + /** + * Static value Debug for LogVerbosity. + */ public static final LogVerbosity DEBUG = fromString("Debug"); - /** Static value Info for LogVerbosity. */ + /** + * Static value Info for LogVerbosity. + */ public static final LogVerbosity INFO = fromString("Info"); - /** Static value Warning for LogVerbosity. */ + /** + * Static value Warning for LogVerbosity. + */ public static final LogVerbosity WARNING = fromString("Warning"); - /** Static value Error for LogVerbosity. */ + /** + * Static value Error for LogVerbosity. + */ public static final LogVerbosity ERROR = fromString("Error"); - /** Static value Critical for LogVerbosity. */ + /** + * Static value Critical for LogVerbosity. + */ public static final LogVerbosity CRITICAL = fromString("Critical"); /** * Creates a new instance of LogVerbosity value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public LogVerbosity() { /** * Creates or finds a LogVerbosity from its string representation. - * + * * @param name a name to look for. * @return the corresponding LogVerbosity. */ @@ -50,7 +64,7 @@ public static LogVerbosity fromString(String name) { /** * Gets known LogVerbosity values. - * + * * @return known LogVerbosity values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfiguration.java new file mode 100644 index 0000000000000..15906ff716950 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfiguration.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Labeling MLAssist configuration definition. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "mlAssist", + defaultImpl = MLAssistConfiguration.class) +@JsonTypeName("MLAssistConfiguration") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Disabled", value = MLAssistConfigurationDisabled.class), + @JsonSubTypes.Type(name = "Enabled", value = MLAssistConfigurationEnabled.class) }) +@Immutable +public class MLAssistConfiguration { + /** + * Creates an instance of MLAssistConfiguration class. + */ + public MLAssistConfiguration() { + } + + /** + * 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/MLAssistConfigurationDisabled.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.java new file mode 100644 index 0000000000000..7a1a5acb3c260 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationDisabled.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.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Labeling MLAssist configuration definition when MLAssist is disabled. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mlAssist") +@JsonTypeName("Disabled") +@Immutable +public final class MLAssistConfigurationDisabled extends MLAssistConfiguration { + /** + * Creates an instance of MLAssistConfigurationDisabled class. + */ + public MLAssistConfigurationDisabled() { + } + + /** + * 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/MLAssistConfigurationEnabled.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationEnabled.java new file mode 100644 index 0000000000000..173fb294f742b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationEnabled.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Labeling MLAssist configuration definition when MLAssist is enabled. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mlAssist") +@JsonTypeName("Enabled") +@Fluent +public final class MLAssistConfigurationEnabled extends MLAssistConfiguration { + /* + * [Required] AML compute binding used in inferencing. + */ + @JsonProperty(value = "inferencingComputeBinding", required = true) + private String inferencingComputeBinding; + + /* + * [Required] AML compute binding used in training. + */ + @JsonProperty(value = "trainingComputeBinding", required = true) + private String trainingComputeBinding; + + /** + * Creates an instance of MLAssistConfigurationEnabled class. + */ + public MLAssistConfigurationEnabled() { + } + + /** + * Get the inferencingComputeBinding property: [Required] AML compute binding used in inferencing. + * + * @return the inferencingComputeBinding value. + */ + public String inferencingComputeBinding() { + return this.inferencingComputeBinding; + } + + /** + * Set the inferencingComputeBinding property: [Required] AML compute binding used in inferencing. + * + * @param inferencingComputeBinding the inferencingComputeBinding value to set. + * @return the MLAssistConfigurationEnabled object itself. + */ + public MLAssistConfigurationEnabled withInferencingComputeBinding(String inferencingComputeBinding) { + this.inferencingComputeBinding = inferencingComputeBinding; + return this; + } + + /** + * Get the trainingComputeBinding property: [Required] AML compute binding used in training. + * + * @return the trainingComputeBinding value. + */ + public String trainingComputeBinding() { + return this.trainingComputeBinding; + } + + /** + * Set the trainingComputeBinding property: [Required] AML compute binding used in training. + * + * @param trainingComputeBinding the trainingComputeBinding value to set. + * @return the MLAssistConfigurationEnabled object itself. + */ + public MLAssistConfigurationEnabled withTrainingComputeBinding(String trainingComputeBinding) { + this.trainingComputeBinding = trainingComputeBinding; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (inferencingComputeBinding() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property inferencingComputeBinding in model MLAssistConfigurationEnabled")); + } + if (trainingComputeBinding() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property trainingComputeBinding in model MLAssistConfigurationEnabled")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MLAssistConfigurationEnabled.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationType.java new file mode 100644 index 0000000000000..9e3ba454c076a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLAssistConfigurationType.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 MLAssistConfigurationType. + */ +public final class MLAssistConfigurationType extends ExpandableStringEnum { + /** + * Static value Enabled for MLAssistConfigurationType. + */ + public static final MLAssistConfigurationType ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for MLAssistConfigurationType. + */ + public static final MLAssistConfigurationType DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MLAssistConfigurationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MLAssistConfigurationType() { + } + + /** + * Creates or finds a MLAssistConfigurationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MLAssistConfigurationType. + */ + @JsonCreator + public static MLAssistConfigurationType fromString(String name) { + return fromString(name, MLAssistConfigurationType.class); + } + + /** + * Gets known MLAssistConfigurationType values. + * + * @return known MLAssistConfigurationType values. + */ + public static Collection values() { + return values(MLAssistConfigurationType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowAutologgerState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowAutologgerState.java new file mode 100644 index 0000000000000..fd0402dc02917 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowAutologgerState.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 state of mlflow autologger. + */ +public final class MLFlowAutologgerState extends ExpandableStringEnum { + /** + * Static value Enabled for MLFlowAutologgerState. + */ + public static final MLFlowAutologgerState ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for MLFlowAutologgerState. + */ + public static final MLFlowAutologgerState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MLFlowAutologgerState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MLFlowAutologgerState() { + } + + /** + * Creates or finds a MLFlowAutologgerState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MLFlowAutologgerState. + */ + @JsonCreator + public static MLFlowAutologgerState fromString(String name) { + return fromString(name, MLFlowAutologgerState.class); + } + + /** + * Gets known MLFlowAutologgerState values. + * + * @return known MLFlowAutologgerState values. + */ + public static Collection values() { + return values(MLFlowAutologgerState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java index 375ee999b449c..03d13e221a4b3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The MLFlowModelJobInput model. */ +/** + * The MLFlowModelJobInput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") @JsonTypeName("mlflow_model") @Fluent @@ -21,19 +23,27 @@ public final class MLFlowModelJobInput extends JobInput { @JsonProperty(value = "mode") private InputDeliveryMode mode; + /* + * Input Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * [Required] Input Asset URI. */ @JsonProperty(value = "uri", required = true) private String uri; - /** Creates an instance of MLFlowModelJobInput class. */ + /** + * Creates an instance of MLFlowModelJobInput class. + */ public MLFlowModelJobInput() { } /** * Get the mode property: Input Asset Delivery Mode. - * + * * @return the mode value. */ public InputDeliveryMode mode() { @@ -42,7 +52,7 @@ public InputDeliveryMode mode() { /** * Set the mode property: Input Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the MLFlowModelJobInput object itself. */ @@ -51,9 +61,29 @@ public MLFlowModelJobInput withMode(InputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Input Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Input Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the MLFlowModelJobInput object itself. + */ + public MLFlowModelJobInput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: [Required] Input Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -62,7 +92,7 @@ public String uri() { /** * Set the uri property: [Required] Input Asset URI. - * + * * @param uri the uri value to set. * @return the MLFlowModelJobInput object itself. */ @@ -71,7 +101,9 @@ public MLFlowModelJobInput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MLFlowModelJobInput withDescription(String description) { super.withDescription(description); @@ -80,16 +112,15 @@ public MLFlowModelJobInput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (uri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model MLFlowModelJobInput")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property uri in model MLFlowModelJobInput")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java index e695c2c2e12c4..5b1bec772f9da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java @@ -9,30 +9,118 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The MLFlowModelJobOutput model. */ +/** + * The MLFlowModelJobOutput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") @JsonTypeName("mlflow_model") @Fluent public final class MLFlowModelJobOutput extends JobOutput { + /* + * Output Asset Name. + */ + @JsonProperty(value = "assetName") + private String assetName; + + /* + * Output Asset Version. + */ + @JsonProperty(value = "assetVersion") + private String assetVersion; + + /* + * Auto delete setting of output data asset. + */ + @JsonProperty(value = "autoDeleteSetting") + private AutoDeleteSetting autoDeleteSetting; + /* * Output Asset Delivery Mode. */ @JsonProperty(value = "mode") private OutputDeliveryMode mode; + /* + * Output Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * Output Asset URI. */ @JsonProperty(value = "uri") private String uri; - /** Creates an instance of MLFlowModelJobOutput class. */ + /** + * Creates an instance of MLFlowModelJobOutput class. + */ public MLFlowModelJobOutput() { } + /** + * Get the assetName property: Output Asset Name. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Output Asset Name. + * + * @param assetName the assetName value to set. + * @return the MLFlowModelJobOutput object itself. + */ + public MLFlowModelJobOutput withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the assetVersion property: Output Asset Version. + * + * @return the assetVersion value. + */ + public String assetVersion() { + return this.assetVersion; + } + + /** + * Set the assetVersion property: Output Asset Version. + * + * @param assetVersion the assetVersion value to set. + * @return the MLFlowModelJobOutput object itself. + */ + public MLFlowModelJobOutput withAssetVersion(String assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @return the autoDeleteSetting value. + */ + public AutoDeleteSetting autoDeleteSetting() { + return this.autoDeleteSetting; + } + + /** + * Set the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @param autoDeleteSetting the autoDeleteSetting value to set. + * @return the MLFlowModelJobOutput object itself. + */ + public MLFlowModelJobOutput withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + this.autoDeleteSetting = autoDeleteSetting; + return this; + } + /** * Get the mode property: Output Asset Delivery Mode. - * + * * @return the mode value. */ public OutputDeliveryMode mode() { @@ -41,7 +129,7 @@ public OutputDeliveryMode mode() { /** * Set the mode property: Output Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the MLFlowModelJobOutput object itself. */ @@ -50,9 +138,29 @@ public MLFlowModelJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Output Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Output Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the MLFlowModelJobOutput object itself. + */ + public MLFlowModelJobOutput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: Output Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -61,7 +169,7 @@ public String uri() { /** * Set the uri property: Output Asset URI. - * + * * @param uri the uri value to set. * @return the MLFlowModelJobOutput object itself. */ @@ -70,7 +178,9 @@ public MLFlowModelJobOutput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MLFlowModelJobOutput withDescription(String description) { super.withDescription(description); @@ -79,11 +189,14 @@ public MLFlowModelJobOutput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (autoDeleteSetting() != null) { + autoDeleteSetting().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java index 009f42261a0e6..523b69163fa7f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java @@ -11,7 +11,9 @@ import java.util.List; import java.util.Map; -/** MLTable data definition. */ +/** + * MLTable data definition. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") @JsonTypeName("mltable") @Fluent @@ -22,13 +24,15 @@ public final class MLTableData extends DataVersionBaseProperties { @JsonProperty(value = "referencedUris") private List referencedUris; - /** Creates an instance of MLTableData class. */ + /** + * Creates an instance of MLTableData class. + */ public MLTableData() { } /** * Get the referencedUris property: Uris referenced in the MLTable definition (required for lineage). - * + * * @return the referencedUris value. */ public List referencedUris() { @@ -37,7 +41,7 @@ public List referencedUris() { /** * Set the referencedUris property: Uris referenced in the MLTable definition (required for lineage). - * + * * @param referencedUris the referencedUris value to set. * @return the MLTableData object itself. */ @@ -46,42 +50,81 @@ public MLTableData withReferencedUris(List referencedUris) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MLTableData withDataUri(String dataUri) { super.withDataUri(dataUri); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public MLTableData withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MLTableData withStage(String stage) { + super.withStage(stage); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MLTableData withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + return this; + } + + /** + * {@inheritDoc} + */ @Override public MLTableData withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MLTableData withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MLTableData withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MLTableData withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MLTableData withTags(Map tags) { super.withTags(tags); @@ -90,7 +133,7 @@ public MLTableData withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java index fa1f992030c3d..f9b72f508d53c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The MLTableJobInput model. */ +/** + * The MLTableJobInput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") @JsonTypeName("mltable") @Fluent @@ -21,19 +23,27 @@ public final class MLTableJobInput extends JobInput { @JsonProperty(value = "mode") private InputDeliveryMode mode; + /* + * Input Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * [Required] Input Asset URI. */ @JsonProperty(value = "uri", required = true) private String uri; - /** Creates an instance of MLTableJobInput class. */ + /** + * Creates an instance of MLTableJobInput class. + */ public MLTableJobInput() { } /** * Get the mode property: Input Asset Delivery Mode. - * + * * @return the mode value. */ public InputDeliveryMode mode() { @@ -42,7 +52,7 @@ public InputDeliveryMode mode() { /** * Set the mode property: Input Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the MLTableJobInput object itself. */ @@ -51,9 +61,29 @@ public MLTableJobInput withMode(InputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Input Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Input Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the MLTableJobInput object itself. + */ + public MLTableJobInput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: [Required] Input Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -62,7 +92,7 @@ public String uri() { /** * Set the uri property: [Required] Input Asset URI. - * + * * @param uri the uri value to set. * @return the MLTableJobInput object itself. */ @@ -71,7 +101,9 @@ public MLTableJobInput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MLTableJobInput withDescription(String description) { super.withDescription(description); @@ -80,16 +112,15 @@ public MLTableJobInput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (uri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model MLTableJobInput")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property uri in model MLTableJobInput")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java index 168360d6a0155..c2101ba16451f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java @@ -9,30 +9,118 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The MLTableJobOutput model. */ +/** + * The MLTableJobOutput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") @JsonTypeName("mltable") @Fluent public final class MLTableJobOutput extends JobOutput { + /* + * Output Asset Name. + */ + @JsonProperty(value = "assetName") + private String assetName; + + /* + * Output Asset Version. + */ + @JsonProperty(value = "assetVersion") + private String assetVersion; + + /* + * Auto delete setting of output data asset. + */ + @JsonProperty(value = "autoDeleteSetting") + private AutoDeleteSetting autoDeleteSetting; + /* * Output Asset Delivery Mode. */ @JsonProperty(value = "mode") private OutputDeliveryMode mode; + /* + * Output Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * Output Asset URI. */ @JsonProperty(value = "uri") private String uri; - /** Creates an instance of MLTableJobOutput class. */ + /** + * Creates an instance of MLTableJobOutput class. + */ public MLTableJobOutput() { } + /** + * Get the assetName property: Output Asset Name. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Output Asset Name. + * + * @param assetName the assetName value to set. + * @return the MLTableJobOutput object itself. + */ + public MLTableJobOutput withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the assetVersion property: Output Asset Version. + * + * @return the assetVersion value. + */ + public String assetVersion() { + return this.assetVersion; + } + + /** + * Set the assetVersion property: Output Asset Version. + * + * @param assetVersion the assetVersion value to set. + * @return the MLTableJobOutput object itself. + */ + public MLTableJobOutput withAssetVersion(String assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @return the autoDeleteSetting value. + */ + public AutoDeleteSetting autoDeleteSetting() { + return this.autoDeleteSetting; + } + + /** + * Set the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @param autoDeleteSetting the autoDeleteSetting value to set. + * @return the MLTableJobOutput object itself. + */ + public MLTableJobOutput withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + this.autoDeleteSetting = autoDeleteSetting; + return this; + } + /** * Get the mode property: Output Asset Delivery Mode. - * + * * @return the mode value. */ public OutputDeliveryMode mode() { @@ -41,7 +129,7 @@ public OutputDeliveryMode mode() { /** * Set the mode property: Output Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the MLTableJobOutput object itself. */ @@ -50,9 +138,29 @@ public MLTableJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Output Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Output Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the MLTableJobOutput object itself. + */ + public MLTableJobOutput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: Output Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -61,7 +169,7 @@ public String uri() { /** * Set the uri property: Output Asset URI. - * + * * @param uri the uri value to set. * @return the MLTableJobOutput object itself. */ @@ -70,7 +178,9 @@ public MLTableJobOutput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MLTableJobOutput withDescription(String description) { super.withDescription(description); @@ -79,11 +189,14 @@ public MLTableJobOutput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (autoDeleteSetting() != null) { + autoDeleteSetting().validate(); + } } } 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..b4b3d2cc89c8a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /** + * Creates an instance of ManagedComputeIdentity class. + */ + public ManagedComputeIdentity() { + } + + /** + * 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 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..7500be5df18a4 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 @@ -10,11 +10,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.UUID; -/** Managed identity configuration. */ +/** + * Managed identity configuration. + */ @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. */ @@ -33,14 +35,16 @@ public class ManagedIdentity extends IdentityConfiguration { @JsonProperty(value = "resourceId") private String resourceId; - /** Creates an instance of ManagedIdentity class. */ + /** + * Creates an instance of ManagedIdentity class. + */ public ManagedIdentity() { } /** * Get the clientId property: Specifies a user-assigned identity by client ID. For system-assigned, do not set this * field. - * + * * @return the clientId value. */ public UUID clientId() { @@ -50,7 +54,7 @@ public UUID clientId() { /** * Set the clientId property: Specifies a user-assigned identity by client ID. For system-assigned, do not set this * field. - * + * * @param clientId the clientId value to set. * @return the ManagedIdentity object itself. */ @@ -62,7 +66,7 @@ public ManagedIdentity withClientId(UUID clientId) { /** * Get the objectId property: Specifies a user-assigned identity by object ID. For system-assigned, do not set this * field. - * + * * @return the objectId value. */ public UUID objectId() { @@ -72,7 +76,7 @@ public UUID objectId() { /** * Set the objectId property: Specifies a user-assigned identity by object ID. For system-assigned, do not set this * field. - * + * * @param objectId the objectId value to set. * @return the ManagedIdentity object itself. */ @@ -84,7 +88,7 @@ public ManagedIdentity withObjectId(UUID objectId) { /** * Get the resourceId property: Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not * set this field. - * + * * @return the resourceId value. */ public String resourceId() { @@ -94,7 +98,7 @@ public String resourceId() { /** * Set the resourceId property: Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not * set this field. - * + * * @param resourceId the resourceId value to set. * @return the ManagedIdentity object itself. */ @@ -105,7 +109,7 @@ public ManagedIdentity withResourceId(String resourceId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java index a117d892d2775..5b7a134f611fd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java @@ -8,8 +8,12 @@ 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.List; -/** The ManagedIdentityAuthTypeWorkspaceConnectionProperties model. */ +/** + * The ManagedIdentityAuthTypeWorkspaceConnectionProperties model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("ManagedIdentity") @Fluent @@ -20,13 +24,15 @@ public final class ManagedIdentityAuthTypeWorkspaceConnectionProperties extends @JsonProperty(value = "credentials") private WorkspaceConnectionManagedIdentity credentials; - /** Creates an instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties class. */ + /** + * Creates an instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties class. + */ public ManagedIdentityAuthTypeWorkspaceConnectionProperties() { } /** * Get the credentials property: The credentials property. - * + * * @return the credentials value. */ public WorkspaceConnectionManagedIdentity credentials() { @@ -35,47 +41,73 @@ public WorkspaceConnectionManagedIdentity credentials() { /** * Set the credentials property: The credentials property. - * + * * @param credentials the credentials value to set. * @return the ManagedIdentityAuthTypeWorkspaceConnectionProperties object itself. */ - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCredentials( - WorkspaceConnectionManagedIdentity credentials) { + public ManagedIdentityAuthTypeWorkspaceConnectionProperties + withCredentials(WorkspaceConnectionManagedIdentity credentials) { this.credentials = credentials; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { super.withCategory(category); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..bb7544bec44d6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java @@ -0,0 +1,172 @@ +// Copyright (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..4b98c899ebb15 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.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; + +/** + * 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..0a0f251111775 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.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.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..1189d89702786 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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..75b1024a79586 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.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.ManagedNetworkSettingsInner; +import java.util.List; +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 changeableIsolationModes property: The changeableIsolationModes property. + * + * @return the changeableIsolationModes value. + */ + List changeableIsolationModes(); + + /** + * 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..a92e4ca002121 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace 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 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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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 Azure Machine Learning Workspace Name. + * @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..395b2efe03590 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.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; + +/** + * 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/ManagedOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java index 41a6593e52d78..0d537ccea1c66 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java @@ -9,108 +9,149 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Properties specific to a ManagedOnlineDeployment. */ +/** + * Properties specific to a ManagedOnlineDeployment. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") @JsonTypeName("Managed") @Fluent public final class ManagedOnlineDeployment extends OnlineDeploymentProperties { - /** Creates an instance of ManagedOnlineDeployment class. */ + /** + * Creates an instance of ManagedOnlineDeployment class. + */ public ManagedOnlineDeployment() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { super.withAppInsightsEnabled(appInsightsEnabled); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineDeployment withDataCollector(DataCollector dataCollector) { + super.withDataCollector(dataCollector); + return this; + } + + /** + * {@inheritDoc} + */ @Override - public ManagedOnlineDeployment withEgressPublicNetworkAccess( - EgressPublicNetworkAccessType egressPublicNetworkAccess) { + public ManagedOnlineDeployment + withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withInstanceType(String instanceType) { super.withInstanceType(instanceType); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { super.withLivenessProbe(livenessProbe); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withModel(String model) { super.withModel(model); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { super.withModelMountPath(modelMountPath); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { super.withReadinessProbe(readinessProbe); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { super.withRequestSettings(requestSettings); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { super.withScaleSettings(scaleSettings); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { super.withCodeConfiguration(codeConfiguration); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withEnvironmentId(String environmentId) { super.withEnvironmentId(environmentId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withEnvironmentVariables(Map environmentVariables) { super.withEnvironmentVariables(environmentVariables); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedOnlineDeployment withProperties(Map properties) { super.withProperties(properties); @@ -119,7 +160,7 @@ public ManagedOnlineDeployment withProperties(Map properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java new file mode 100644 index 0000000000000..5a1e6955572b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The ManagedOnlineEndpointDeploymentResourceProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("managedOnlineEndpoint") +@Fluent +public final class ManagedOnlineEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /** + * Creates an instance of ManagedOnlineEndpointDeploymentResourceProperties class. + */ + public ManagedOnlineEndpointDeploymentResourceProperties() { + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointDeploymentResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + 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/ManagedOnlineEndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java new file mode 100644 index 0000000000000..66e4868e258ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java @@ -0,0 +1,69 @@ +// Copyright (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; + +/** + * The ManagedOnlineEndpointResourceProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("managedOnlineEndpoint") +@Fluent +public final class ManagedOnlineEndpointResourceProperties extends EndpointResourceProperties { + /** + * Creates an instance of ManagedOnlineEndpointResourceProperties class. + */ + public ManagedOnlineEndpointResourceProperties() { + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withName(String name) { + super.withName(name); + 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/ManagedResourceGroupAssignedIdentities.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.java new file mode 100644 index 0000000000000..4a1374c36d3b4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.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; + +/** + * Details for managed resource group assigned identities. + */ +@Fluent +public final class ManagedResourceGroupAssignedIdentities { + /* + * Identity principal Id + */ + @JsonProperty(value = "principalId") + private String principalId; + + /** + * Creates an instance of ManagedResourceGroupAssignedIdentities class. + */ + public ManagedResourceGroupAssignedIdentities() { + } + + /** + * Get the principalId property: Identity principal Id. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principalId property: Identity principal Id. + * + * @param principalId the principalId value to set. + * @return the ManagedResourceGroupAssignedIdentities object itself. + */ + public ManagedResourceGroupAssignedIdentities withPrincipalId(String principalId) { + this.principalId = principalId; + 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/ManagedResourceGroupSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java new file mode 100644 index 0000000000000..c8ad45c9acc9f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.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 java.util.List; + +/** + * Managed resource group settings. + */ +@Fluent +public final class ManagedResourceGroupSettings { + /* + * List of assigned identities for the managed resource group + */ + @JsonProperty(value = "assignedIdentities") + private List assignedIdentities; + + /** + * Creates an instance of ManagedResourceGroupSettings class. + */ + public ManagedResourceGroupSettings() { + } + + /** + * Get the assignedIdentities property: List of assigned identities for the managed resource group. + * + * @return the assignedIdentities value. + */ + public List assignedIdentities() { + return this.assignedIdentities; + } + + /** + * Set the assignedIdentities property: List of assigned identities for the managed resource group. + * + * @param assignedIdentities the assignedIdentities value to set. + * @return the ManagedResourceGroupSettings object itself. + */ + public ManagedResourceGroupSettings + withAssignedIdentities(List assignedIdentities) { + this.assignedIdentities = assignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (assignedIdentities() != null) { + assignedIdentities().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java index 3fc7e30e4fcc9..dea9a13b31eec 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java @@ -11,7 +11,9 @@ import java.util.Map; import java.util.UUID; -/** Managed service identity (system assigned and/or user assigned identities). */ +/** + * Managed service identity (system assigned and/or user assigned identities). + */ @Fluent public class ManagedServiceIdentity { /* @@ -37,21 +39,24 @@ public class ManagedServiceIdentity { /* * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; - /** Creates an instance of ManagedServiceIdentity class. */ + /** + * Creates an instance of ManagedServiceIdentity class. + */ public ManagedServiceIdentity() { } /** * Get the principalId property: The service principal ID of the system assigned identity. This property will only * be provided for a system assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -59,9 +64,9 @@ public UUID principalId() { } /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided + * for a system assigned identity. + * * @return the tenantId value. */ public UUID tenantId() { @@ -71,7 +76,7 @@ public UUID tenantId() { /** * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are * allowed). - * + * * @return the type value. */ public ManagedServiceIdentityType type() { @@ -81,7 +86,7 @@ public ManagedServiceIdentityType type() { /** * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are * allowed). - * + * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. */ @@ -95,7 +100,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { * userAssignedIdentities dictionary keys will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -107,7 +112,7 @@ public Map userAssignedIdentities() { * userAssignedIdentities dictionary keys will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. */ @@ -118,24 +123,20 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java index b066c34ad136d..1300a554c808e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java @@ -8,24 +8,34 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** Static value None for ManagedServiceIdentityType. */ + /** + * Static value None for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType NONE = fromString("None"); - /** Static value SystemAssigned for ManagedServiceIdentityType. */ + /** + * Static value SystemAssigned for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value UserAssigned for ManagedServiceIdentityType. */ + /** + * Static value UserAssigned for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - /** Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = - fromString("SystemAssigned,UserAssigned"); + /** + * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + = fromString("SystemAssigned,UserAssigned"); /** * Creates a new instance of ManagedServiceIdentityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public ManagedServiceIdentityType() { /** * Creates or finds a ManagedServiceIdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedServiceIdentityType. */ @@ -45,7 +55,7 @@ public static ManagedServiceIdentityType fromString(String name) { /** * Gets known ManagedServiceIdentityType values. - * + * * @return known ManagedServiceIdentityType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java new file mode 100644 index 0000000000000..81ef0b4516487 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java @@ -0,0 +1,73 @@ +// Copyright (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; + +/** + * The MarketplacePlan model. + */ +@Immutable +public final class MarketplacePlan { + /* + * The Offer ID of the Marketplace Plan. + */ + @JsonProperty(value = "offerId", access = JsonProperty.Access.WRITE_ONLY) + private String offerId; + + /* + * The Plan ID of the Marketplace Plan. + */ + @JsonProperty(value = "planId", access = JsonProperty.Access.WRITE_ONLY) + private String planId; + + /* + * The Publisher ID of the Marketplace Plan. + */ + @JsonProperty(value = "publisherId", access = JsonProperty.Access.WRITE_ONLY) + private String publisherId; + + /** + * Creates an instance of MarketplacePlan class. + */ + public MarketplacePlan() { + } + + /** + * Get the offerId property: The Offer ID of the Marketplace Plan. + * + * @return the offerId value. + */ + public String offerId() { + return this.offerId; + } + + /** + * Get the planId property: The Plan ID of the Marketplace Plan. + * + * @return the planId value. + */ + public String planId() { + return this.planId; + } + + /** + * Get the publisherId property: The Publisher ID of the Marketplace Plan. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + + /** + * 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/MarketplaceSubscription.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java new file mode 100644 index 0000000000000..6ce854789abeb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java @@ -0,0 +1,189 @@ +// Copyright (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.MarketplaceSubscriptionInner; + +/** + * An immutable client-side representation of MarketplaceSubscription. + */ +public interface MarketplaceSubscription { + /** + * 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. + */ + MarketplaceSubscriptionProperties 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.MarketplaceSubscriptionInner object. + * + * @return the inner object. + */ + MarketplaceSubscriptionInner innerModel(); + + /** + * The entirety of the MarketplaceSubscription definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The MarketplaceSubscription definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the MarketplaceSubscription definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the MarketplaceSubscription 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 MarketplaceSubscription 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(MarketplaceSubscriptionProperties properties); + } + + /** + * The stage of the MarketplaceSubscription 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. + */ + MarketplaceSubscription create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + MarketplaceSubscription create(Context context); + } + } + + /** + * Begins update for the MarketplaceSubscription resource. + * + * @return the stage of resource update. + */ + MarketplaceSubscription.Update update(); + + /** + * The template for MarketplaceSubscription update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + MarketplaceSubscription apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + MarketplaceSubscription apply(Context context); + } + + /** + * The MarketplaceSubscription update stages. + */ + interface UpdateStages { + /** + * The stage of the MarketplaceSubscription 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(MarketplaceSubscriptionProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + MarketplaceSubscription refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + MarketplaceSubscription refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java new file mode 100644 index 0000000000000..0e3adac10984f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The MarketplaceSubscriptionProperties model. + */ +@Fluent +public final class MarketplaceSubscriptionProperties { + /* + * Marketplace Plan associated with the Marketplace Subscription. + */ + @JsonProperty(value = "marketplacePlan", access = JsonProperty.Access.WRITE_ONLY) + private MarketplacePlan marketplacePlan; + + /* + * Current status of the Marketplace Subscription. + */ + @JsonProperty(value = "marketplaceSubscriptionStatus", access = JsonProperty.Access.WRITE_ONLY) + private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; + + /* + * [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + */ + @JsonProperty(value = "modelId", required = true) + private String modelId; + + /* + * Provisioning State of the Marketplace Subscription. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private MarketplaceSubscriptionProvisioningState provisioningState; + + /** + * Creates an instance of MarketplaceSubscriptionProperties class. + */ + public MarketplaceSubscriptionProperties() { + } + + /** + * Get the marketplacePlan property: Marketplace Plan associated with the Marketplace Subscription. + * + * @return the marketplacePlan value. + */ + public MarketplacePlan marketplacePlan() { + return this.marketplacePlan; + } + + /** + * Get the marketplaceSubscriptionStatus property: Current status of the Marketplace Subscription. + * + * @return the marketplaceSubscriptionStatus value. + */ + public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { + return this.marketplaceSubscriptionStatus; + } + + /** + * Get the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + * + * @return the modelId value. + */ + public String modelId() { + return this.modelId; + } + + /** + * Set the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + * + * @param modelId the modelId value to set. + * @return the MarketplaceSubscriptionProperties object itself. + */ + public MarketplaceSubscriptionProperties withModelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * Get the provisioningState property: Provisioning State of the Marketplace Subscription. + * + * @return the provisioningState value. + */ + public MarketplaceSubscriptionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (marketplacePlan() != null) { + marketplacePlan().validate(); + } + if (modelId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property modelId in model MarketplaceSubscriptionProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSubscriptionProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java new file mode 100644 index 0000000000000..555e38c9eccc4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java @@ -0,0 +1,74 @@ +// Copyright (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 MarketplaceSubscriptionProvisioningState. + */ +public final class MarketplaceSubscriptionProvisioningState + extends ExpandableStringEnum { + /** + * Static value Creating for MarketplaceSubscriptionProvisioningState. + */ + public static final MarketplaceSubscriptionProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Deleting for MarketplaceSubscriptionProvisioningState. + */ + public static final MarketplaceSubscriptionProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Succeeded for MarketplaceSubscriptionProvisioningState. + */ + public static final MarketplaceSubscriptionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for MarketplaceSubscriptionProvisioningState. + */ + public static final MarketplaceSubscriptionProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Updating for MarketplaceSubscriptionProvisioningState. + */ + public static final MarketplaceSubscriptionProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Canceled for MarketplaceSubscriptionProvisioningState. + */ + public static final MarketplaceSubscriptionProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of MarketplaceSubscriptionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MarketplaceSubscriptionProvisioningState() { + } + + /** + * Creates or finds a MarketplaceSubscriptionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MarketplaceSubscriptionProvisioningState. + */ + @JsonCreator + public static MarketplaceSubscriptionProvisioningState fromString(String name) { + return fromString(name, MarketplaceSubscriptionProvisioningState.class); + } + + /** + * Gets known MarketplaceSubscriptionProvisioningState values. + * + * @return known MarketplaceSubscriptionProvisioningState values. + */ + public static Collection values() { + return values(MarketplaceSubscriptionProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..535d64f159e28 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A paginated list of MarketplaceSubscription entities. + */ +@Fluent +public final class MarketplaceSubscriptionResourceArmPaginatedResult { + /* + * The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type MarketplaceSubscription. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of MarketplaceSubscriptionResourceArmPaginatedResult class. + */ + public MarketplaceSubscriptionResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of MarketplaceSubscription 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 MarketplaceSubscription objects. If null, there are no + * additional pages. + * + * @param nextLink the nextLink value to set. + * @return the MarketplaceSubscriptionResourceArmPaginatedResult object itself. + */ + public MarketplaceSubscriptionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type MarketplaceSubscription. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type MarketplaceSubscription. + * + * @param value the value value to set. + * @return the MarketplaceSubscriptionResourceArmPaginatedResult object itself. + */ + public MarketplaceSubscriptionResourceArmPaginatedResult 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/MarketplaceSubscriptionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java new file mode 100644 index 0000000000000..0ca491b97098b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for MarketplaceSubscriptionStatus. + */ +public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { + /** + * Static value PendingFulfillmentStart for MarketplaceSubscriptionStatus. + */ + public static final MarketplaceSubscriptionStatus PENDING_FULFILLMENT_START = fromString("PendingFulfillmentStart"); + + /** + * Static value Subscribed for MarketplaceSubscriptionStatus. + */ + public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); + + /** + * Static value Suspended for MarketplaceSubscriptionStatus. + */ + public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); + + /** + * Static value Unsubscribed for MarketplaceSubscriptionStatus. + */ + public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); + + /** + * Creates a new instance of MarketplaceSubscriptionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MarketplaceSubscriptionStatus() { + } + + /** + * Creates or finds a MarketplaceSubscriptionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding MarketplaceSubscriptionStatus. + */ + @JsonCreator + public static MarketplaceSubscriptionStatus fromString(String name) { + return fromString(name, MarketplaceSubscriptionStatus.class); + } + + /** + * Gets known MarketplaceSubscriptionStatus values. + * + * @return known MarketplaceSubscriptionStatus values. + */ + public static Collection values() { + return values(MarketplaceSubscriptionStatus.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java new file mode 100644 index 0000000000000..ef3e61d607736 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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 MarketplaceSubscriptions. + */ +public interface MarketplaceSubscriptions { + /** + * List 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 MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 workspaceName, String name); + + /** + * Delete Marketplace Subscription (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Marketplace Subscription 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 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + MarketplaceSubscription 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}. + */ + MarketplaceSubscription 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 Marketplace Subscription (asynchronous). + * + * @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 Marketplace Subscription (asynchronous). + * + * @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 MarketplaceSubscription resource. + * + * @param name resource name. + * @return the first stage of the new MarketplaceSubscription definition. + */ + MarketplaceSubscription.DefinitionStages.Blank define(String name); +} 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..3dec1e909738e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.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; + +/** + * 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..27ba75b4aefa4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java @@ -0,0 +1,170 @@ +// Copyright (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..449da3e99ff9a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/MediaType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MediaType.java new file mode 100644 index 0000000000000..974a5da83d920 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MediaType.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; + +/** + * Media type of data asset. + */ +public final class MediaType extends ExpandableStringEnum { + /** + * Static value Image for MediaType. + */ + public static final MediaType IMAGE = fromString("Image"); + + /** + * Static value Text for MediaType. + */ + public static final MediaType TEXT = fromString("Text"); + + /** + * Creates a new instance of MediaType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MediaType() { + } + + /** + * Creates or finds a MediaType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MediaType. + */ + @JsonCreator + public static MediaType fromString(String name) { + return fromString(name, MediaType.class); + } + + /** + * Gets known MediaType values. + * + * @return known MediaType values. + */ + public static Collection values() { + return values(MediaType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java index 786701cbc5483..8a54bd55d015a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java @@ -8,23 +8,31 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Defines an early termination policy based on running averages of the primary metric of all runs. */ +/** + * Defines an early termination policy based on running averages of the primary metric of all runs. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "policyType") @JsonTypeName("MedianStopping") @Fluent public final class MedianStoppingPolicy extends EarlyTerminationPolicy { - /** Creates an instance of MedianStoppingPolicy class. */ + /** + * Creates an instance of MedianStoppingPolicy class. + */ public MedianStoppingPolicy() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MedianStoppingPolicy withDelayEvaluation(Integer delayEvaluation) { super.withDelayEvaluation(delayEvaluation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { super.withEvaluationInterval(evaluationInterval); @@ -33,7 +41,7 @@ public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java new file mode 100644 index 0000000000000..0db750cbc61a8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.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; + +/** + * Indicates whether mlflow autologger is enabled for notebooks. + */ +public final class MlflowAutologger extends ExpandableStringEnum { + /** + * Static value Enabled for MlflowAutologger. + */ + public static final MlflowAutologger ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for MlflowAutologger. + */ + public static final MlflowAutologger DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MlflowAutologger value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MlflowAutologger() { + } + + /** + * Creates or finds a MlflowAutologger from its string representation. + * + * @param name a name to look for. + * @return the corresponding MlflowAutologger. + */ + @JsonCreator + public static MlflowAutologger fromString(String name) { + return fromString(name, MlflowAutologger.class); + } + + /** + * Gets known MlflowAutologger values. + * + * @return known MlflowAutologger values. + */ + public static Collection values() { + return values(MlflowAutologger.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelConfiguration.java new file mode 100644 index 0000000000000..1df07b962998d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelConfiguration.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Model configuration options. + */ +@Fluent +public final class ModelConfiguration { + /* + * Input delivery mode for the model. + */ + @JsonProperty(value = "mode") + private PackageInputDeliveryMode mode; + + /* + * Relative mounting path of the model in the target image. + */ + @JsonProperty(value = "mountPath") + private String mountPath; + + /** + * Creates an instance of ModelConfiguration class. + */ + public ModelConfiguration() { + } + + /** + * Get the mode property: Input delivery mode for the model. + * + * @return the mode value. + */ + public PackageInputDeliveryMode mode() { + return this.mode; + } + + /** + * Set the mode property: Input delivery mode for the model. + * + * @param mode the mode value to set. + * @return the ModelConfiguration object itself. + */ + public ModelConfiguration withMode(PackageInputDeliveryMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the mountPath property: Relative mounting path of the model in the target image. + * + * @return the mountPath value. + */ + public String mountPath() { + return this.mountPath; + } + + /** + * Set the mountPath property: Relative mounting path of the model in the target image. + * + * @param mountPath the mountPath value to set. + * @return the ModelConfiguration object itself. + */ + public ModelConfiguration withMountPath(String mountPath) { + this.mountPath = mountPath; + 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/ModelContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java index 0841f457eef91..d7c609b3de7f3 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 @@ -8,90 +8,103 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -/** An immutable client-side representation of ModelContainer. */ +/** + * An immutable client-side representation of ModelContainer. + */ public interface ModelContainer { /** * 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. */ ModelContainerProperties 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.ModelContainerInner object. - * + * * @return the inner object. */ ModelContainerInner innerModel(); - /** The entirety of the ModelContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the ModelContainer definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ModelContainer definition stages. */ + + /** + * The ModelContainer definition stages. + */ interface DefinitionStages { - /** The first stage of the ModelContainer definition. */ + /** + * The first stage of the ModelContainer definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ModelContainer definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the ModelContainer 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(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. @@ -99,67 +112,76 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ ModelContainer create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ModelContainer create(Context context); } } + /** * Begins update for the ModelContainer resource. - * + * * @return the stage of resource update. */ ModelContainer.Update update(); - /** The template for ModelContainer update. */ + /** + * The template for ModelContainer update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ ModelContainer apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ModelContainer apply(Context context); } - /** The ModelContainer update stages. */ + + /** + * The ModelContainer update stages. + */ interface UpdateStages { - /** The stage of the ModelContainer update allowing to specify properties. */ + /** + * The stage of the ModelContainer 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(ModelContainerProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ModelContainer refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/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..4f8e1e223f677 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,37 +5,65 @@ 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. */ +/** + * The ModelContainerProperties model. + */ @Fluent public final class ModelContainerProperties extends AssetContainer { - /** Creates an instance of ModelContainerProperties class. */ + /* + * 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() { } - /** {@inheritDoc} */ + /** + * 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) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ModelContainerProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ModelContainerProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ModelContainerProperties withTags(Map tags) { super.withTags(tags); @@ -44,7 +72,7 @@ public ModelContainerProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java index cccb640d70baa..e042fb6f03935 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of ModelContainer entities. */ +/** + * A paginated list of ModelContainer entities. + */ @Fluent public final class ModelContainerResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class ModelContainerResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of ModelContainerResourceArmPaginatedResult class. */ + /** + * Creates an instance of ModelContainerResourceArmPaginatedResult class. + */ public ModelContainerResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional * pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional * pages. - * + * * @param nextLink the nextLink value to set. * @return the ModelContainerResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public ModelContainerResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type ModelContainer. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type ModelContainer. - * + * * @param value the value value to set. * @return the ModelContainerResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public ModelContainerResourceArmPaginatedResult withValue(List list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + ListViewType listViewType, 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. @@ -60,7 +58,7 @@ PagedIterable list( /** * 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. @@ -72,7 +70,7 @@ PagedIterable list( /** * 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. @@ -82,12 +80,12 @@ PagedIterable list( * @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 workspaceName, String name, Context context); + Response getWithResponse(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. @@ -99,55 +97,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. - * - * @param id the resource ID. + * 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 container along with {@link Response}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + ModelContainerInner body, 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. + * 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 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/ModelDeprecationInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelDeprecationInfo.java new file mode 100644 index 0000000000000..8fca0faa7f582 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelDeprecationInfo.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cognitive Services account ModelDeprecationInfo. + */ +@Fluent +public final class ModelDeprecationInfo { + /* + * The datetime of deprecation of the fineTune Model. + */ + @JsonProperty(value = "fineTune") + private String fineTune; + + /* + * The datetime of deprecation of the inference Model. + */ + @JsonProperty(value = "inference") + private String inference; + + /** + * Creates an instance of ModelDeprecationInfo class. + */ + public ModelDeprecationInfo() { + } + + /** + * Get the fineTune property: The datetime of deprecation of the fineTune Model. + * + * @return the fineTune value. + */ + public String fineTune() { + return this.fineTune; + } + + /** + * Set the fineTune property: The datetime of deprecation of the fineTune Model. + * + * @param fineTune the fineTune value to set. + * @return the ModelDeprecationInfo object itself. + */ + public ModelDeprecationInfo withFineTune(String fineTune) { + this.fineTune = fineTune; + return this; + } + + /** + * Get the inference property: The datetime of deprecation of the inference Model. + * + * @return the inference value. + */ + public String inference() { + return this.inference; + } + + /** + * Set the inference property: The datetime of deprecation of the inference Model. + * + * @param inference the inference value to set. + * @return the ModelDeprecationInfo object itself. + */ + public ModelDeprecationInfo withInference(String inference) { + this.inference = inference; + 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/ModelLifecycleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java new file mode 100644 index 0000000000000..f1881015ffb7f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.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; + +/** + * Model lifecycle status. + */ +public final class ModelLifecycleStatus extends ExpandableStringEnum { + /** + * Static value GenerallyAvailable for ModelLifecycleStatus. + */ + public static final ModelLifecycleStatus GENERALLY_AVAILABLE = fromString("GenerallyAvailable"); + + /** + * Static value Preview for ModelLifecycleStatus. + */ + public static final ModelLifecycleStatus PREVIEW = fromString("Preview"); + + /** + * Creates a new instance of ModelLifecycleStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ModelLifecycleStatus() { + } + + /** + * Creates or finds a ModelLifecycleStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ModelLifecycleStatus. + */ + @JsonCreator + public static ModelLifecycleStatus fromString(String name) { + return fromString(name, ModelLifecycleStatus.class); + } + + /** + * Gets known ModelLifecycleStatus values. + * + * @return known ModelLifecycleStatus values. + */ + public static Collection values() { + return values(ModelLifecycleStatus.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPackageInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPackageInput.java new file mode 100644 index 0000000000000..3afaa38cc9799 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPackageInput.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.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Model package input options. + */ +@Fluent +public final class ModelPackageInput { + /* + * [Required] Type of the input included in the target image. + */ + @JsonProperty(value = "inputType", required = true) + private PackageInputType inputType; + + /* + * Input delivery mode of the input. + */ + @JsonProperty(value = "mode") + private PackageInputDeliveryMode mode; + + /* + * Relative mount path of the input in the target image. + */ + @JsonProperty(value = "mountPath") + private String mountPath; + + /* + * [Required] Location of the input. + */ + @JsonProperty(value = "path", required = true) + private PackageInputPathBase path; + + /** + * Creates an instance of ModelPackageInput class. + */ + public ModelPackageInput() { + } + + /** + * Get the inputType property: [Required] Type of the input included in the target image. + * + * @return the inputType value. + */ + public PackageInputType inputType() { + return this.inputType; + } + + /** + * Set the inputType property: [Required] Type of the input included in the target image. + * + * @param inputType the inputType value to set. + * @return the ModelPackageInput object itself. + */ + public ModelPackageInput withInputType(PackageInputType inputType) { + this.inputType = inputType; + return this; + } + + /** + * Get the mode property: Input delivery mode of the input. + * + * @return the mode value. + */ + public PackageInputDeliveryMode mode() { + return this.mode; + } + + /** + * Set the mode property: Input delivery mode of the input. + * + * @param mode the mode value to set. + * @return the ModelPackageInput object itself. + */ + public ModelPackageInput withMode(PackageInputDeliveryMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the mountPath property: Relative mount path of the input in the target image. + * + * @return the mountPath value. + */ + public String mountPath() { + return this.mountPath; + } + + /** + * Set the mountPath property: Relative mount path of the input in the target image. + * + * @param mountPath the mountPath value to set. + * @return the ModelPackageInput object itself. + */ + public ModelPackageInput withMountPath(String mountPath) { + this.mountPath = mountPath; + return this; + } + + /** + * Get the path property: [Required] Location of the input. + * + * @return the path value. + */ + public PackageInputPathBase path() { + return this.path; + } + + /** + * Set the path property: [Required] Location of the input. + * + * @param path the path value to set. + * @return the ModelPackageInput object itself. + */ + public ModelPackageInput withPath(PackageInputPathBase path) { + this.path = path; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (inputType() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property inputType in model ModelPackageInput")); + } + if (path() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property path in model ModelPackageInput")); + } else { + path().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ModelPackageInput.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPerformanceMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPerformanceMetricThresholdBase.java new file mode 100644 index 0000000000000..80e9cc0cccb66 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPerformanceMetricThresholdBase.java @@ -0,0 +1,71 @@ +// Copyright (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 ModelPerformanceMetricThresholdBase model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "modelType", + defaultImpl = ModelPerformanceMetricThresholdBase.class) +@JsonTypeName("ModelPerformanceMetricThresholdBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "Classification", value = ClassificationModelPerformanceMetricThreshold.class), + @JsonSubTypes.Type(name = "Regression", value = RegressionModelPerformanceMetricThreshold.class) }) +@Fluent +public class ModelPerformanceMetricThresholdBase { + /* + * 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 ModelPerformanceMetricThresholdBase class. + */ + public ModelPerformanceMetricThresholdBase() { + } + + /** + * 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 ModelPerformanceMetricThresholdBase object itself. + */ + public ModelPerformanceMetricThresholdBase 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/ModelPerformanceSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPerformanceSignal.java new file mode 100644 index 0000000000000..a9b4a41e96771 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelPerformanceSignal.java @@ -0,0 +1,184 @@ +// Copyright (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; +import java.util.Map; + +/** + * Model performance signal definition. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "signalType") +@JsonTypeName("ModelPerformance") +@Fluent +public final class ModelPerformanceSignal extends MonitoringSignalBase { + /* + * The data segment. + */ + @JsonProperty(value = "dataSegment") + private MonitoringDataSegment dataSegment; + + /* + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @JsonProperty(value = "metricThreshold", required = true) + private ModelPerformanceMetricThresholdBase metricThreshold; + + /* + * [Required] The data produced by the production service which performance will be calculated for. + */ + @JsonProperty(value = "productionData", required = true) + private List productionData; + + /* + * [Required] The reference data used as the basis to calculate model performance. + */ + @JsonProperty(value = "referenceData", required = true) + private MonitoringInputDataBase referenceData; + + /** + * Creates an instance of ModelPerformanceSignal class. + */ + public ModelPerformanceSignal() { + } + + /** + * Get the dataSegment property: The data segment. + * + * @return the dataSegment value. + */ + public MonitoringDataSegment dataSegment() { + return this.dataSegment; + } + + /** + * Set the dataSegment property: The data segment. + * + * @param dataSegment the dataSegment value to set. + * @return the ModelPerformanceSignal object itself. + */ + public ModelPerformanceSignal withDataSegment(MonitoringDataSegment dataSegment) { + this.dataSegment = dataSegment; + return this; + } + + /** + * Get the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @return the metricThreshold value. + */ + public ModelPerformanceMetricThresholdBase 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 ModelPerformanceSignal object itself. + */ + public ModelPerformanceSignal withMetricThreshold(ModelPerformanceMetricThresholdBase metricThreshold) { + this.metricThreshold = metricThreshold; + return this; + } + + /** + * Get the productionData property: [Required] The data produced by the production service which performance will + * be calculated for. + * + * @return the productionData value. + */ + public List productionData() { + return this.productionData; + } + + /** + * Set the productionData property: [Required] The data produced by the production service which performance will + * be calculated for. + * + * @param productionData the productionData value to set. + * @return the ModelPerformanceSignal object itself. + */ + public ModelPerformanceSignal withProductionData(List productionData) { + this.productionData = productionData; + return this; + } + + /** + * Get the referenceData property: [Required] The reference data used as the basis to calculate model performance. + * + * @return the referenceData value. + */ + public MonitoringInputDataBase referenceData() { + return this.referenceData; + } + + /** + * Set the referenceData property: [Required] The reference data used as the basis to calculate model performance. + * + * @param referenceData the referenceData value to set. + * @return the ModelPerformanceSignal object itself. + */ + public ModelPerformanceSignal withReferenceData(MonitoringInputDataBase referenceData) { + this.referenceData = referenceData; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ModelPerformanceSignal withNotificationTypes(List notificationTypes) { + super.withNotificationTypes(notificationTypes); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ModelPerformanceSignal 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 (dataSegment() != null) { + dataSegment().validate(); + } + if (metricThreshold() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property metricThreshold in model ModelPerformanceSignal")); + } else { + metricThreshold().validate(); + } + if (productionData() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property productionData in model ModelPerformanceSignal")); + } else { + productionData().forEach(e -> e.validate()); + } + if (referenceData() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property referenceData in model ModelPerformanceSignal")); + } else { + referenceData().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ModelPerformanceSignal.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java new file mode 100644 index 0000000000000..082c20b2e8a02 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.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 type of fine tuning. + */ +public final class ModelProvider extends ExpandableStringEnum { + /** + * Static value AzureOpenAI for ModelProvider. + */ + public static final ModelProvider AZURE_OPEN_AI = fromString("AzureOpenAI"); + + /** + * Static value Custom for ModelProvider. + */ + public static final ModelProvider CUSTOM = fromString("Custom"); + + /** + * Creates a new instance of ModelProvider value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ModelProvider() { + } + + /** + * Creates or finds a ModelProvider from its string representation. + * + * @param name a name to look for. + * @return the corresponding ModelProvider. + */ + @JsonCreator + public static ModelProvider fromString(String name) { + return fromString(name, ModelProvider.class); + } + + /** + * Gets known ModelProvider values. + * + * @return known ModelProvider values. + */ + public static Collection values() { + return values(ModelProvider.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java new file mode 100644 index 0000000000000..d2aaa0a59bc4b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ModelSettings model. + */ +@Fluent +public final class ModelSettings { + /* + * [Required] + */ + @JsonProperty(value = "modelId", required = true) + private String modelId; + + /** + * Creates an instance of ModelSettings class. + */ + public ModelSettings() { + } + + /** + * Get the modelId property: [Required]. + * + * @return the modelId value. + */ + public String modelId() { + return this.modelId; + } + + /** + * Set the modelId property: [Required]. + * + * @param modelId the modelId value to set. + * @return the ModelSettings object itself. + */ + public ModelSettings withModelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (modelId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property modelId in model ModelSettings")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ModelSettings.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java index 79c3c14802b88..180496405371f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Image model size. */ +/** + * Image model size. + */ public final class ModelSize extends ExpandableStringEnum { - /** Static value None for ModelSize. */ + /** + * Static value None for ModelSize. + */ public static final ModelSize NONE = fromString("None"); - /** Static value Small for ModelSize. */ + /** + * Static value Small for ModelSize. + */ public static final ModelSize SMALL = fromString("Small"); - /** Static value Medium for ModelSize. */ + /** + * Static value Medium for ModelSize. + */ public static final ModelSize MEDIUM = fromString("Medium"); - /** Static value Large for ModelSize. */ + /** + * Static value Large for ModelSize. + */ public static final ModelSize LARGE = fromString("Large"); - /** Static value ExtraLarge for ModelSize. */ + /** + * Static value ExtraLarge for ModelSize. + */ public static final ModelSize EXTRA_LARGE = fromString("ExtraLarge"); /** * Creates a new instance of ModelSize value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public ModelSize() { /** * Creates or finds a ModelSize from its string representation. - * + * * @param name a name to look for. * @return the corresponding ModelSize. */ @@ -47,7 +59,7 @@ public static ModelSize fromString(String name) { /** * Gets known ModelSize values. - * + * * @return known ModelSize values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSku.java new file mode 100644 index 0000000000000..90dc5addf4ffd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSku.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.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Describes an available Cognitive Services Model SKU. + */ +@Fluent +public final class ModelSku { + /* + * The name of the model SKU. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The usage name of the model SKU. + */ + @JsonProperty(value = "usageName") + private String usageName; + + /* + * The datetime of deprecation of the model SKU. + */ + @JsonProperty(value = "deprecationDate") + private OffsetDateTime deprecationDate; + + /* + * The capacity configuration. + */ + @JsonProperty(value = "capacity") + private CapacityConfig capacity; + + /* + * The list of rateLimit. + */ + @JsonProperty(value = "rateLimits") + private List rateLimits; + + /** + * Creates an instance of ModelSku class. + */ + public ModelSku() { + } + + /** + * Get the name property: The name of the model SKU. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the model SKU. + * + * @param name the name value to set. + * @return the ModelSku object itself. + */ + public ModelSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get the usageName property: The usage name of the model SKU. + * + * @return the usageName value. + */ + public String usageName() { + return this.usageName; + } + + /** + * Set the usageName property: The usage name of the model SKU. + * + * @param usageName the usageName value to set. + * @return the ModelSku object itself. + */ + public ModelSku withUsageName(String usageName) { + this.usageName = usageName; + return this; + } + + /** + * Get the deprecationDate property: The datetime of deprecation of the model SKU. + * + * @return the deprecationDate value. + */ + public OffsetDateTime deprecationDate() { + return this.deprecationDate; + } + + /** + * Set the deprecationDate property: The datetime of deprecation of the model SKU. + * + * @param deprecationDate the deprecationDate value to set. + * @return the ModelSku object itself. + */ + public ModelSku withDeprecationDate(OffsetDateTime deprecationDate) { + this.deprecationDate = deprecationDate; + return this; + } + + /** + * Get the capacity property: The capacity configuration. + * + * @return the capacity value. + */ + public CapacityConfig capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The capacity configuration. + * + * @param capacity the capacity value to set. + * @return the ModelSku object itself. + */ + public ModelSku withCapacity(CapacityConfig capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the rateLimits property: The list of rateLimit. + * + * @return the rateLimits value. + */ + public List rateLimits() { + return this.rateLimits; + } + + /** + * Set the rateLimits property: The list of rateLimit. + * + * @param rateLimits the rateLimits value to set. + * @return the ModelSku object itself. + */ + public ModelSku withRateLimits(List rateLimits) { + this.rateLimits = rateLimits; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capacity() != null) { + capacity().validate(); + } + if (rateLimits() != null) { + rateLimits().forEach(e -> e.validate()); + } + } +} 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..12daa2080a441 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.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.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"); + + /** + * Static value QuestionAnswering for ModelTaskType. + */ + public static final ModelTaskType QUESTION_ANSWERING = fromString("QuestionAnswering"); + + /** + * 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..3e9b5ec5a7c98 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,95 +4,109 @@ 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; -/** An immutable client-side representation of ModelVersion. */ +/** + * An immutable client-side representation of ModelVersion. + */ public interface ModelVersion { /** * 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. */ ModelVersionProperties 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.ModelVersionInner object. - * + * * @return the inner object. */ ModelVersionInner innerModel(); - /** The entirety of the ModelVersion definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the ModelVersion definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The ModelVersion definition stages. */ + + /** + * The ModelVersion definition stages. + */ interface DefinitionStages { - /** The first stage of the ModelVersion definition. */ + /** + * The first stage of the ModelVersion definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ModelVersion definition allowing to specify parent resource. */ + + /** + * 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. */ + + /** + * The stage of the ModelVersion 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(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. @@ -100,69 +114,125 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ ModelVersion create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ModelVersion create(Context context); } } + /** * Begins update for the ModelVersion resource. - * + * * @return the stage of resource update. */ ModelVersion.Update update(); - /** The template for ModelVersion update. */ + /** + * The template for ModelVersion update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ ModelVersion apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ModelVersion apply(Context context); } - /** The ModelVersion update stages. */ + + /** + * The ModelVersion update stages. + */ interface UpdateStages { - /** The stage of the ModelVersion update allowing to specify properties. */ + /** + * The stage of the ModelVersion 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(ModelVersionProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ModelVersion refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ ModelVersion refresh(Context context); + + /** + * Model Version Package operation. + * + * @param body Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + PackageResponse packageMethod(PackageRequest body); + + /** + * Model Version Package operation. + * + * @param body Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + PackageResponse packageMethod(PackageRequest body, 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..9da8b66d801c6 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Model asset version details. */ +/** + * Model asset version details. + */ @Fluent public final class ModelVersionProperties extends AssetBase { /* @@ -19,6 +21,12 @@ public final class ModelVersionProperties extends AssetBase { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map flavors; + /* + * Intellectual Property details. Used if model is an Intellectual Property. + */ + @JsonProperty(value = "intellectualProperty") + private IntellectualProperty intellectualProperty; + /* * Name of the training job which produced this model */ @@ -37,13 +45,27 @@ public final class ModelVersionProperties extends AssetBase { @JsonProperty(value = "modelUri") private String modelUri; - /** Creates an instance of ModelVersionProperties class. */ + /* + * 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() { } /** * Get the flavors property: Mapping of model flavors to their properties. - * + * * @return the flavors value. */ public Map flavors() { @@ -52,7 +74,7 @@ public Map flavors() { /** * Set the flavors property: Mapping of model flavors to their properties. - * + * * @param flavors the flavors value to set. * @return the ModelVersionProperties object itself. */ @@ -61,9 +83,29 @@ public ModelVersionProperties withFlavors(Map flavors) { return this; } + /** + * Get the intellectualProperty property: Intellectual Property details. Used if model is an Intellectual Property. + * + * @return the intellectualProperty value. + */ + public IntellectualProperty intellectualProperty() { + return this.intellectualProperty; + } + + /** + * Set the intellectualProperty property: Intellectual Property details. Used if model is an Intellectual Property. + * + * @param intellectualProperty the intellectualProperty value to set. + * @return the ModelVersionProperties object itself. + */ + public ModelVersionProperties withIntellectualProperty(IntellectualProperty intellectualProperty) { + this.intellectualProperty = intellectualProperty; + return this; + } + /** * Get the jobName property: Name of the training job which produced this model. - * + * * @return the jobName value. */ public String jobName() { @@ -72,7 +114,7 @@ public String jobName() { /** * Set the jobName property: Name of the training job which produced this model. - * + * * @param jobName the jobName value to set. * @return the ModelVersionProperties object itself. */ @@ -83,7 +125,7 @@ public ModelVersionProperties withJobName(String jobName) { /** * Get the modelType property: The storage format for this entity. Used for NCD. - * + * * @return the modelType value. */ public String modelType() { @@ -92,7 +134,7 @@ public String modelType() { /** * Set the modelType property: The storage format for this entity. Used for NCD. - * + * * @param modelType the modelType value to set. * @return the ModelVersionProperties object itself. */ @@ -103,7 +145,7 @@ public ModelVersionProperties withModelType(String modelType) { /** * Get the modelUri property: The URI path to the model contents. - * + * * @return the modelUri value. */ public String modelUri() { @@ -112,7 +154,7 @@ public String modelUri() { /** * Set the modelUri property: The URI path to the model contents. - * + * * @param modelUri the modelUri value to set. * @return the ModelVersionProperties object itself. */ @@ -121,35 +163,83 @@ public ModelVersionProperties withModelUri(String modelUri) { return this; } - /** {@inheritDoc} */ + /** + * 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 withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + return this; + } + + /** + * {@inheritDoc} + */ @Override public ModelVersionProperties withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ModelVersionProperties withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ModelVersionProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ModelVersionProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ModelVersionProperties withTags(Map tags) { super.withTags(tags); @@ -158,21 +248,21 @@ public ModelVersionProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (flavors() != null) { - flavors() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + flavors().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (intellectualProperty() != null) { + intellectualProperty().validate(); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java index c5a4f372df037..2b1ab59a3aba3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of ModelVersion entities. */ +/** + * A paginated list of ModelVersion entities. + */ @Fluent public final class ModelVersionResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class ModelVersionResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of ModelVersionResourceArmPaginatedResult class. */ + /** + * Creates an instance of ModelVersionResourceArmPaginatedResult class. + */ public ModelVersionResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional * pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional * pages. - * + * * @param nextLink the nextLink value to set. * @return the ModelVersionResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public ModelVersionResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type ModelVersion. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type ModelVersion. - * + * * @param value the value value to set. * @return the ModelVersionResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public ModelVersionResourceArmPaginatedResult withValue(List /** * 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/ModelVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java index 050389e0716e0..138b768d37ae0 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,12 +7,15 @@ 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. */ +/** + * Resource collection API of ModelVersions. + */ public interface ModelVersions { /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -25,7 +28,7 @@ public interface ModelVersions { /** * List model versions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Model name. This is case-sensitive. @@ -39,31 +42,20 @@ public interface ModelVersions { * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. * @param feed Name of the feed. * @param listViewType View type for including/excluding (for example) archived entities. + * @param stage Model 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 ModelVersion entities as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, + String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, + String feed, ListViewType listViewType, 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. @@ -74,12 +66,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); + Response deleteWithResponse(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. @@ -92,7 +84,7 @@ Response deleteWithResponse( /** * 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. @@ -103,12 +95,12 @@ Response deleteWithResponse( * @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); + 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. @@ -121,55 +113,98 @@ Response getWithResponse( ModelVersion get(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. - * - * @param id the resource ID. + * 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 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. - * - * @param id the resource ID. - * @param context The context to associate with this operation. + * 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 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. - * - * @param id the resource ID. + * Model Version Package 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 Package operation request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. */ - void deleteById(String id); + PackageResponse packageMethod(String resourceGroupName, String workspaceName, String name, String version, + PackageRequest body); /** - * Delete version. - * - * @param id the resource ID. + * Model Version Package 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 Package operation request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return package response returned after async package operation completes successfully. */ - Response deleteByIdWithResponse(String id, Context context); + PackageResponse packageMethod(String resourceGroupName, String workspaceName, String name, String version, + PackageRequest body, Context context); /** - * Begins definition for a new ModelVersion resource. - * - * @param name resource name. - * @return the first stage of the new ModelVersion definition. + * 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. */ - ModelVersion.DefinitionStages.Blank define(String name); + 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. + */ + 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..83a97f891f4df --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.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; + +/** + * 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..38f86ce533ccc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..8aab5380361fe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.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; + +/** + * 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..7a819b2caef39 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.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; + +/** + * 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..0f7f36a55ad63 --- /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 ARM resource ID of either the model or deployment targeted by this 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 ARM resource ID of either the model or deployment targeted by this + * monitor. + * + * @return the monitoringTarget value. + */ + public MonitoringTarget monitoringTarget() { + return this.monitoringTarget; + } + + /** + * Set the monitoringTarget property: The ARM resource ID of either the model or deployment targeted by this + * 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..269ae4585df9b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The MonitorEmailNotificationSettings model. + */ +@Fluent +public final class MonitorEmailNotificationSettings { + /* + * This is 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: This is 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: This is 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..53d549b6ec391 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.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.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..2ff5fea5f9e39 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.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.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/MonitoringDataSegment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringDataSegment.java new file mode 100644 index 0000000000000..5a181d8b0287b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringDataSegment.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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The MonitoringDataSegment model. + */ +@Fluent +public final class MonitoringDataSegment { + /* + * The feature to segment the data on. + */ + @JsonProperty(value = "feature") + private String feature; + + /* + * Filters for only the specified values of the given segmented feature. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Creates an instance of MonitoringDataSegment class. + */ + public MonitoringDataSegment() { + } + + /** + * Get the feature property: The feature to segment the data on. + * + * @return the feature value. + */ + public String feature() { + return this.feature; + } + + /** + * Set the feature property: The feature to segment the data on. + * + * @param feature the feature value to set. + * @return the MonitoringDataSegment object itself. + */ + public MonitoringDataSegment withFeature(String feature) { + this.feature = feature; + return this; + } + + /** + * Get the values property: Filters for only the specified values of the given segmented feature. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: Filters for only the specified values of the given segmented feature. + * + * @param values the values value to set. + * @return the MonitoringDataSegment object itself. + */ + public MonitoringDataSegment withValues(List values) { + this.values = values; + 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/MonitoringFeatureDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java new file mode 100644 index 0000000000000..2e6fba796569b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.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 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..b0a815151abb6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.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.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..9a9cb8baa75b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.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.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..5af12d7bcc0a0 --- /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..87ba79bdb0175 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.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.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/MonitoringModelType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringModelType.java new file mode 100644 index 0000000000000..0091210d93ca5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringModelType.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 MonitoringModelType. + */ +public final class MonitoringModelType extends ExpandableStringEnum { + /** + * Static value Classification for MonitoringModelType. + */ + public static final MonitoringModelType CLASSIFICATION = fromString("Classification"); + + /** + * Static value Regression for MonitoringModelType. + */ + public static final MonitoringModelType REGRESSION = fromString("Regression"); + + /** + * Creates a new instance of MonitoringModelType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MonitoringModelType() { + } + + /** + * Creates or finds a MonitoringModelType from its string representation. + * + * @param name a name to look for. + * @return the corresponding MonitoringModelType. + */ + @JsonCreator + public static MonitoringModelType fromString(String name) { + return fromString(name, MonitoringModelType.class); + } + + /** + * Gets known MonitoringModelType values. + * + * @return known MonitoringModelType values. + */ + public static Collection values() { + return values(MonitoringModelType.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..5b9cdfeb84079 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.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 MonitoringNotificationType. + */ +public final class MonitoringNotificationType extends ExpandableStringEnum { + /** + * Static value AmlNotification for MonitoringNotificationType. + */ + public static final MonitoringNotificationType AML_NOTIFICATION = fromString("AmlNotification"); + + /** + * Static value AzureMonitor for MonitoringNotificationType. + */ + public static final MonitoringNotificationType AZURE_MONITOR = fromString("AzureMonitor"); + + /** + * 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..565dc278d93cf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.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.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 = "GenerationSafetyQuality", value = GenerationSafetyQualityMonitoringSignal.class), + @JsonSubTypes.Type(name = "GenerationTokenStatistics", value = GenerationTokenUsageSignal.class), + @JsonSubTypes.Type(name = "ModelPerformance", value = ModelPerformanceSignal.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..7a5ace0a98645 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.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.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"); + + /** + * Static value ModelPerformance for MonitoringSignalType. + */ + public static final MonitoringSignalType MODEL_PERFORMANCE = fromString("ModelPerformance"); + + /** + * Static value GenerationSafetyQuality for MonitoringSignalType. + */ + public static final MonitoringSignalType GENERATION_SAFETY_QUALITY = fromString("GenerationSafetyQuality"); + + /** + * Static value GenerationTokenStatistics for MonitoringSignalType. + */ + public static final MonitoringSignalType GENERATION_TOKEN_STATISTICS = fromString("GenerationTokenStatistics"); + + /** + * 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..bd5160c61dcde --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.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.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 { + /* + * The ARM resource ID of either the deployment targeted by this monitor. + */ + @JsonProperty(value = "deploymentId") + private String deploymentId; + + /* + * The ARM resource ID of either the model targeted by this monitor. + */ + @JsonProperty(value = "modelId") + private String modelId; + + /* + * [Required] The machine learning task type of the model. + */ + @JsonProperty(value = "taskType", required = true) + private ModelTaskType taskType; + + /** + * Creates an instance of MonitoringTarget class. + */ + public MonitoringTarget() { + } + + /** + * Get the deploymentId property: The ARM resource ID of either the deployment targeted by this monitor. + * + * @return the deploymentId value. + */ + public String deploymentId() { + return this.deploymentId; + } + + /** + * Set the deploymentId property: The ARM resource ID of either the deployment 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: The ARM resource ID of either the model targeted by this monitor. + * + * @return the modelId value. + */ + public String modelId() { + return this.modelId; + } + + /** + * Set the modelId property: The ARM resource ID of either the model 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 model. + * + * @return the taskType value. + */ + public ModelTaskType taskType() { + return this.taskType; + } + + /** + * Set the taskType property: [Required] The machine learning task type of the 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..7a4c3ca762ee1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.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 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/MonitoringWorkspaceConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringWorkspaceConnection.java new file mode 100644 index 0000000000000..bbab8c793d8b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringWorkspaceConnection.java @@ -0,0 +1,94 @@ +// Copyright (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; + +/** + * Monitoring workspace connection definition. + */ +@Fluent +public final class MonitoringWorkspaceConnection { + /* + * The properties of a workspace service connection to store as environment variables in the submitted jobs. + * Key is workspace connection property path, name is environment variable key. + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * The properties of a workspace service connection to store as secrets in the submitted jobs. + * Key is workspace connection property path, name is secret key. + */ + @JsonProperty(value = "secrets") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map secrets; + + /** + * Creates an instance of MonitoringWorkspaceConnection class. + */ + public MonitoringWorkspaceConnection() { + } + + /** + * Get the environmentVariables property: The properties of a workspace service connection to store as environment + * variables in the submitted jobs. + * Key is workspace connection property path, name is environment variable key. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: The properties of a workspace service connection to store as environment + * variables in the submitted jobs. + * Key is workspace connection property path, name is environment variable key. + * + * @param environmentVariables the environmentVariables value to set. + * @return the MonitoringWorkspaceConnection object itself. + */ + public MonitoringWorkspaceConnection withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the secrets property: The properties of a workspace service connection to store as secrets in the submitted + * jobs. + * Key is workspace connection property path, name is secret key. + * + * @return the secrets value. + */ + public Map secrets() { + return this.secrets; + } + + /** + * Set the secrets property: The properties of a workspace service connection to store as secrets in the submitted + * jobs. + * Key is workspace connection property path, name is secret key. + * + * @param secrets the secrets value to set. + * @return the MonitoringWorkspaceConnection object itself. + */ + public MonitoringWorkspaceConnection withSecrets(Map secrets) { + this.secrets = secrets; + 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/MountAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java index ea7e3aa4d0e0a..7da8d1cebecd2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Mount Action. */ +/** + * Mount Action. + */ public final class MountAction extends ExpandableStringEnum { - /** Static value Mount for MountAction. */ + /** + * Static value Mount for MountAction. + */ public static final MountAction MOUNT = fromString("Mount"); - /** Static value Unmount for MountAction. */ + /** + * Static value Unmount for MountAction. + */ public static final MountAction UNMOUNT = fromString("Unmount"); /** * Creates a new instance of MountAction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public MountAction() { /** * Creates or finds a MountAction from its string representation. - * + * * @param name a name to look for. * @return the corresponding MountAction. */ @@ -38,7 +44,7 @@ public static MountAction fromString(String name) { /** * Gets known MountAction values. - * + * * @return known MountAction values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java new file mode 100644 index 0000000000000..dc6538465a8d3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.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; + +/** + * Mount Mode. + */ +public final class MountMode extends ExpandableStringEnum { + /** + * Static value ReadOnly for MountMode. + */ + public static final MountMode READ_ONLY = fromString("ReadOnly"); + + /** + * Static value ReadWrite for MountMode. + */ + public static final MountMode READ_WRITE = fromString("ReadWrite"); + + /** + * Creates a new instance of MountMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MountMode() { + } + + /** + * Creates or finds a MountMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding MountMode. + */ + @JsonCreator + public static MountMode fromString(String name) { + return fromString(name, MountMode.class); + } + + /** + * Gets known MountMode values. + * + * @return known MountMode values. + */ + public static Collection values() { + return values(MountMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java index 4682b19476306..9419d7fef3a72 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Mount state. */ +/** + * Mount state. + */ public final class MountState extends ExpandableStringEnum { - /** Static value MountRequested for MountState. */ + /** + * Static value MountRequested for MountState. + */ public static final MountState MOUNT_REQUESTED = fromString("MountRequested"); - /** Static value Mounted for MountState. */ + /** + * Static value Mounted for MountState. + */ public static final MountState MOUNTED = fromString("Mounted"); - /** Static value MountFailed for MountState. */ + /** + * Static value MountFailed for MountState. + */ public static final MountState MOUNT_FAILED = fromString("MountFailed"); - /** Static value UnmountRequested for MountState. */ + /** + * Static value UnmountRequested for MountState. + */ public static final MountState UNMOUNT_REQUESTED = fromString("UnmountRequested"); - /** Static value UnmountFailed for MountState. */ + /** + * Static value UnmountFailed for MountState. + */ public static final MountState UNMOUNT_FAILED = fromString("UnmountFailed"); - /** Static value Unmounted for MountState. */ + /** + * Static value Unmounted for MountState. + */ public static final MountState UNMOUNTED = fromString("Unmounted"); /** * Creates a new instance of MountState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public MountState() { /** * Creates or finds a MountState from its string representation. - * + * * @param name a name to look for. * @return the corresponding MountState. */ @@ -50,7 +64,7 @@ public static MountState fromString(String name) { /** * Gets known MountState values. - * + * * @return known MountState values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java index 3aacc74147d05..644a3c0d7eca9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** MPI distribution configuration. */ +/** + * MPI distribution configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") @JsonTypeName("Mpi") @Fluent @@ -20,13 +22,15 @@ public final class Mpi extends DistributionConfiguration { @JsonProperty(value = "processCountPerInstance") private Integer processCountPerInstance; - /** Creates an instance of Mpi class. */ + /** + * Creates an instance of Mpi class. + */ public Mpi() { } /** * Get the processCountPerInstance property: Number of processes per MPI node. - * + * * @return the processCountPerInstance value. */ public Integer processCountPerInstance() { @@ -35,7 +39,7 @@ public Integer processCountPerInstance() { /** * Set the processCountPerInstance property: Number of processes per MPI node. - * + * * @param processCountPerInstance the processCountPerInstance value to set. * @return the Mpi object itself. */ @@ -46,7 +50,7 @@ public Mpi withProcessCountPerInstance(Integer processCountPerInstance) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MultiSelect.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MultiSelect.java new file mode 100644 index 0000000000000..b858442462eb6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MultiSelect.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; + +/** + * Whether multiSelect is enabled. + */ +public final class MultiSelect extends ExpandableStringEnum { + /** + * Static value Enabled for MultiSelect. + */ + public static final MultiSelect ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for MultiSelect. + */ + public static final MultiSelect DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MultiSelect value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MultiSelect() { + } + + /** + * Creates or finds a MultiSelect from its string representation. + * + * @param name a name to look for. + * @return the corresponding MultiSelect. + */ + @JsonCreator + public static MultiSelect fromString(String name) { + return fromString(name, MultiSelect.class); + } + + /** + * Gets known MultiSelect values. + * + * @return known MultiSelect values. + */ + public static Collection values() { + return values(MultiSelect.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java index 8613307ed6c03..db590932bbb21 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** N-Cross validations value. */ +/** + * N-Cross validations value. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,17 +20,18 @@ @JsonTypeName("NCrossValidations") @JsonSubTypes({ @JsonSubTypes.Type(name = "Auto", value = AutoNCrossValidations.class), - @JsonSubTypes.Type(name = "Custom", value = CustomNCrossValidations.class) -}) + @JsonSubTypes.Type(name = "Custom", value = CustomNCrossValidations.class) }) @Immutable public class NCrossValidations { - /** Creates an instance of NCrossValidations class. */ + /** + * Creates an instance of NCrossValidations class. + */ public NCrossValidations() { } /** * 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/NCrossValidationsMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java index 2aff7dcb0c65f..4c3497fdfd299 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Determines how N-Cross validations value is determined. */ +/** + * Determines how N-Cross validations value is determined. + */ public final class NCrossValidationsMode extends ExpandableStringEnum { - /** Static value Auto for NCrossValidationsMode. */ + /** + * Static value Auto for NCrossValidationsMode. + */ public static final NCrossValidationsMode AUTO = fromString("Auto"); - /** Static value Custom for NCrossValidationsMode. */ + /** + * Static value Custom for NCrossValidationsMode. + */ public static final NCrossValidationsMode CUSTOM = fromString("Custom"); /** * Creates a new instance of NCrossValidationsMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public NCrossValidationsMode() { /** * Creates or finds a NCrossValidationsMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding NCrossValidationsMode. */ @@ -38,7 +44,7 @@ public static NCrossValidationsMode fromString(String name) { /** * Gets known NCrossValidationsMode values. - * + * * @return known NCrossValidationsMode values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java index bf7109d15c4af..959948127f10a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** network of this container. */ +/** + * network of this container. + */ public final class Network extends ExpandableStringEnum { - /** Static value Bridge for Network. */ + /** + * Static value Bridge for Network. + */ public static final Network BRIDGE = fromString("Bridge"); - /** Static value Host for Network. */ + /** + * Static value Host for Network. + */ public static final Network HOST = fromString("Host"); /** * Creates a new instance of Network value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public Network() { /** * Creates or finds a Network from its string representation. - * + * * @param name a name to look for. * @return the corresponding Network. */ @@ -38,7 +44,7 @@ public static Network fromString(String name) { /** * Gets known Network values. - * + * * @return known Network values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpFixedParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpFixedParameters.java new file mode 100644 index 0000000000000..12f81c1f40d06 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpFixedParameters.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Fixed training parameters that won't be swept over during AutoML NLP training. + */ +@Fluent +public final class NlpFixedParameters { + /* + * Number of steps to accumulate gradients over before running a backward pass. + */ + @JsonProperty(value = "gradientAccumulationSteps") + private Integer gradientAccumulationSteps; + + /* + * The learning rate for the training procedure. + */ + @JsonProperty(value = "learningRate") + private Float learningRate; + + /* + * The type of learning rate schedule to use during the training procedure. + */ + @JsonProperty(value = "learningRateScheduler") + private NlpLearningRateScheduler learningRateScheduler; + + /* + * The name of the model to train. + */ + @JsonProperty(value = "modelName") + private String modelName; + + /* + * Number of training epochs. + */ + @JsonProperty(value = "numberOfEpochs") + private Integer numberOfEpochs; + + /* + * The batch size for the training procedure. + */ + @JsonProperty(value = "trainingBatchSize") + private Integer trainingBatchSize; + + /* + * The batch size to be used during evaluation. + */ + @JsonProperty(value = "validationBatchSize") + private Integer validationBatchSize; + + /* + * The warmup ratio, used alongside LrSchedulerType. + */ + @JsonProperty(value = "warmupRatio") + private Float warmupRatio; + + /* + * The weight decay for the training procedure. + */ + @JsonProperty(value = "weightDecay") + private Float weightDecay; + + /** + * Creates an instance of NlpFixedParameters class. + */ + public NlpFixedParameters() { + } + + /** + * Get the gradientAccumulationSteps property: Number of steps to accumulate gradients over before running a + * backward pass. + * + * @return the gradientAccumulationSteps value. + */ + public Integer gradientAccumulationSteps() { + return this.gradientAccumulationSteps; + } + + /** + * Set the gradientAccumulationSteps property: Number of steps to accumulate gradients over before running a + * backward pass. + * + * @param gradientAccumulationSteps the gradientAccumulationSteps value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withGradientAccumulationSteps(Integer gradientAccumulationSteps) { + this.gradientAccumulationSteps = gradientAccumulationSteps; + return this; + } + + /** + * Get the learningRate property: The learning rate for the training procedure. + * + * @return the learningRate value. + */ + public Float learningRate() { + return this.learningRate; + } + + /** + * Set the learningRate property: The learning rate for the training procedure. + * + * @param learningRate the learningRate value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withLearningRate(Float learningRate) { + this.learningRate = learningRate; + return this; + } + + /** + * Get the learningRateScheduler property: The type of learning rate schedule to use during the training procedure. + * + * @return the learningRateScheduler value. + */ + public NlpLearningRateScheduler learningRateScheduler() { + return this.learningRateScheduler; + } + + /** + * Set the learningRateScheduler property: The type of learning rate schedule to use during the training procedure. + * + * @param learningRateScheduler the learningRateScheduler value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withLearningRateScheduler(NlpLearningRateScheduler learningRateScheduler) { + this.learningRateScheduler = learningRateScheduler; + return this; + } + + /** + * Get the modelName property: The name of the model to train. + * + * @return the modelName value. + */ + public String modelName() { + return this.modelName; + } + + /** + * Set the modelName property: The name of the model to train. + * + * @param modelName the modelName value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withModelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Get the numberOfEpochs property: Number of training epochs. + * + * @return the numberOfEpochs value. + */ + public Integer numberOfEpochs() { + return this.numberOfEpochs; + } + + /** + * Set the numberOfEpochs property: Number of training epochs. + * + * @param numberOfEpochs the numberOfEpochs value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withNumberOfEpochs(Integer numberOfEpochs) { + this.numberOfEpochs = numberOfEpochs; + return this; + } + + /** + * Get the trainingBatchSize property: The batch size for the training procedure. + * + * @return the trainingBatchSize value. + */ + public Integer trainingBatchSize() { + return this.trainingBatchSize; + } + + /** + * Set the trainingBatchSize property: The batch size for the training procedure. + * + * @param trainingBatchSize the trainingBatchSize value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withTrainingBatchSize(Integer trainingBatchSize) { + this.trainingBatchSize = trainingBatchSize; + return this; + } + + /** + * Get the validationBatchSize property: The batch size to be used during evaluation. + * + * @return the validationBatchSize value. + */ + public Integer validationBatchSize() { + return this.validationBatchSize; + } + + /** + * Set the validationBatchSize property: The batch size to be used during evaluation. + * + * @param validationBatchSize the validationBatchSize value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withValidationBatchSize(Integer validationBatchSize) { + this.validationBatchSize = validationBatchSize; + return this; + } + + /** + * Get the warmupRatio property: The warmup ratio, used alongside LrSchedulerType. + * + * @return the warmupRatio value. + */ + public Float warmupRatio() { + return this.warmupRatio; + } + + /** + * Set the warmupRatio property: The warmup ratio, used alongside LrSchedulerType. + * + * @param warmupRatio the warmupRatio value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withWarmupRatio(Float warmupRatio) { + this.warmupRatio = warmupRatio; + return this; + } + + /** + * Get the weightDecay property: The weight decay for the training procedure. + * + * @return the weightDecay value. + */ + public Float weightDecay() { + return this.weightDecay; + } + + /** + * Set the weightDecay property: The weight decay for the training procedure. + * + * @param weightDecay the weightDecay value to set. + * @return the NlpFixedParameters object itself. + */ + public NlpFixedParameters withWeightDecay(Float weightDecay) { + this.weightDecay = weightDecay; + 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/NlpLearningRateScheduler.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpLearningRateScheduler.java new file mode 100644 index 0000000000000..843b3b9d93645 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpLearningRateScheduler.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Enum of learning rate schedulers that aligns with those supported by HF. + */ +public final class NlpLearningRateScheduler extends ExpandableStringEnum { + /** + * Static value None for NlpLearningRateScheduler. + */ + public static final NlpLearningRateScheduler NONE = fromString("None"); + + /** + * Static value Linear for NlpLearningRateScheduler. + */ + public static final NlpLearningRateScheduler LINEAR = fromString("Linear"); + + /** + * Static value Cosine for NlpLearningRateScheduler. + */ + public static final NlpLearningRateScheduler COSINE = fromString("Cosine"); + + /** + * Static value CosineWithRestarts for NlpLearningRateScheduler. + */ + public static final NlpLearningRateScheduler COSINE_WITH_RESTARTS = fromString("CosineWithRestarts"); + + /** + * Static value Polynomial for NlpLearningRateScheduler. + */ + public static final NlpLearningRateScheduler POLYNOMIAL = fromString("Polynomial"); + + /** + * Static value Constant for NlpLearningRateScheduler. + */ + public static final NlpLearningRateScheduler CONSTANT = fromString("Constant"); + + /** + * Static value ConstantWithWarmup for NlpLearningRateScheduler. + */ + public static final NlpLearningRateScheduler CONSTANT_WITH_WARMUP = fromString("ConstantWithWarmup"); + + /** + * Creates a new instance of NlpLearningRateScheduler value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NlpLearningRateScheduler() { + } + + /** + * Creates or finds a NlpLearningRateScheduler from its string representation. + * + * @param name a name to look for. + * @return the corresponding NlpLearningRateScheduler. + */ + @JsonCreator + public static NlpLearningRateScheduler fromString(String name) { + return fromString(name, NlpLearningRateScheduler.class); + } + + /** + * Gets known NlpLearningRateScheduler values. + * + * @return known NlpLearningRateScheduler values. + */ + public static Collection values() { + return values(NlpLearningRateScheduler.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpParameterSubspace.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpParameterSubspace.java new file mode 100644 index 0000000000000..f55a1b7411407 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpParameterSubspace.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Stringified search spaces for each parameter. See below examples. + */ +@Fluent +public final class NlpParameterSubspace { + /* + * Number of steps to accumulate gradients over before running a backward pass. + */ + @JsonProperty(value = "gradientAccumulationSteps") + private String gradientAccumulationSteps; + + /* + * The learning rate for the training procedure. + */ + @JsonProperty(value = "learningRate") + private String learningRate; + + /* + * The type of learning rate schedule to use during the training procedure. + */ + @JsonProperty(value = "learningRateScheduler") + private String learningRateScheduler; + + /* + * The name of the model to train. + */ + @JsonProperty(value = "modelName") + private String modelName; + + /* + * Number of training epochs. + */ + @JsonProperty(value = "numberOfEpochs") + private String numberOfEpochs; + + /* + * The batch size for the training procedure. + */ + @JsonProperty(value = "trainingBatchSize") + private String trainingBatchSize; + + /* + * The batch size to be used during evaluation. + */ + @JsonProperty(value = "validationBatchSize") + private String validationBatchSize; + + /* + * The warmup ratio, used alongside LrSchedulerType. + */ + @JsonProperty(value = "warmupRatio") + private String warmupRatio; + + /* + * The weight decay for the training procedure. + */ + @JsonProperty(value = "weightDecay") + private String weightDecay; + + /** + * Creates an instance of NlpParameterSubspace class. + */ + public NlpParameterSubspace() { + } + + /** + * Get the gradientAccumulationSteps property: Number of steps to accumulate gradients over before running a + * backward pass. + * + * @return the gradientAccumulationSteps value. + */ + public String gradientAccumulationSteps() { + return this.gradientAccumulationSteps; + } + + /** + * Set the gradientAccumulationSteps property: Number of steps to accumulate gradients over before running a + * backward pass. + * + * @param gradientAccumulationSteps the gradientAccumulationSteps value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withGradientAccumulationSteps(String gradientAccumulationSteps) { + this.gradientAccumulationSteps = gradientAccumulationSteps; + return this; + } + + /** + * Get the learningRate property: The learning rate for the training procedure. + * + * @return the learningRate value. + */ + public String learningRate() { + return this.learningRate; + } + + /** + * Set the learningRate property: The learning rate for the training procedure. + * + * @param learningRate the learningRate value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withLearningRate(String learningRate) { + this.learningRate = learningRate; + return this; + } + + /** + * Get the learningRateScheduler property: The type of learning rate schedule to use during the training procedure. + * + * @return the learningRateScheduler value. + */ + public String learningRateScheduler() { + return this.learningRateScheduler; + } + + /** + * Set the learningRateScheduler property: The type of learning rate schedule to use during the training procedure. + * + * @param learningRateScheduler the learningRateScheduler value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withLearningRateScheduler(String learningRateScheduler) { + this.learningRateScheduler = learningRateScheduler; + return this; + } + + /** + * Get the modelName property: The name of the model to train. + * + * @return the modelName value. + */ + public String modelName() { + return this.modelName; + } + + /** + * Set the modelName property: The name of the model to train. + * + * @param modelName the modelName value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withModelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Get the numberOfEpochs property: Number of training epochs. + * + * @return the numberOfEpochs value. + */ + public String numberOfEpochs() { + return this.numberOfEpochs; + } + + /** + * Set the numberOfEpochs property: Number of training epochs. + * + * @param numberOfEpochs the numberOfEpochs value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withNumberOfEpochs(String numberOfEpochs) { + this.numberOfEpochs = numberOfEpochs; + return this; + } + + /** + * Get the trainingBatchSize property: The batch size for the training procedure. + * + * @return the trainingBatchSize value. + */ + public String trainingBatchSize() { + return this.trainingBatchSize; + } + + /** + * Set the trainingBatchSize property: The batch size for the training procedure. + * + * @param trainingBatchSize the trainingBatchSize value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withTrainingBatchSize(String trainingBatchSize) { + this.trainingBatchSize = trainingBatchSize; + return this; + } + + /** + * Get the validationBatchSize property: The batch size to be used during evaluation. + * + * @return the validationBatchSize value. + */ + public String validationBatchSize() { + return this.validationBatchSize; + } + + /** + * Set the validationBatchSize property: The batch size to be used during evaluation. + * + * @param validationBatchSize the validationBatchSize value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withValidationBatchSize(String validationBatchSize) { + this.validationBatchSize = validationBatchSize; + return this; + } + + /** + * Get the warmupRatio property: The warmup ratio, used alongside LrSchedulerType. + * + * @return the warmupRatio value. + */ + public String warmupRatio() { + return this.warmupRatio; + } + + /** + * Set the warmupRatio property: The warmup ratio, used alongside LrSchedulerType. + * + * @param warmupRatio the warmupRatio value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withWarmupRatio(String warmupRatio) { + this.warmupRatio = warmupRatio; + return this; + } + + /** + * Get the weightDecay property: The weight decay for the training procedure. + * + * @return the weightDecay value. + */ + public String weightDecay() { + return this.weightDecay; + } + + /** + * Set the weightDecay property: The weight decay for the training procedure. + * + * @param weightDecay the weightDecay value to set. + * @return the NlpParameterSubspace object itself. + */ + public NlpParameterSubspace withWeightDecay(String weightDecay) { + this.weightDecay = weightDecay; + 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/NlpSweepSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpSweepSettings.java new file mode 100644 index 0000000000000..a40d36b8eb97b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpSweepSettings.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; + +/** + * Model sweeping and hyperparameter tuning related settings. + */ +@Fluent +public final class NlpSweepSettings { + /* + * Type of early termination policy for the sweeping job. + */ + @JsonProperty(value = "earlyTermination") + private EarlyTerminationPolicy earlyTermination; + + /* + * [Required] Type of sampling algorithm. + */ + @JsonProperty(value = "samplingAlgorithm", required = true) + private SamplingAlgorithmType samplingAlgorithm; + + /** + * Creates an instance of NlpSweepSettings class. + */ + public NlpSweepSettings() { + } + + /** + * Get the earlyTermination property: Type of early termination policy for the sweeping job. + * + * @return the earlyTermination value. + */ + public EarlyTerminationPolicy earlyTermination() { + return this.earlyTermination; + } + + /** + * Set the earlyTermination property: Type of early termination policy for the sweeping job. + * + * @param earlyTermination the earlyTermination value to set. + * @return the NlpSweepSettings object itself. + */ + public NlpSweepSettings withEarlyTermination(EarlyTerminationPolicy earlyTermination) { + this.earlyTermination = earlyTermination; + return this; + } + + /** + * Get the samplingAlgorithm property: [Required] Type of sampling algorithm. + * + * @return the samplingAlgorithm value. + */ + public SamplingAlgorithmType samplingAlgorithm() { + return this.samplingAlgorithm; + } + + /** + * Set the samplingAlgorithm property: [Required] Type of sampling algorithm. + * + * @param samplingAlgorithm the samplingAlgorithm value to set. + * @return the NlpSweepSettings object itself. + */ + public NlpSweepSettings withSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithm) { + this.samplingAlgorithm = samplingAlgorithm; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (earlyTermination() != null) { + earlyTermination().validate(); + } + if (samplingAlgorithm() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property samplingAlgorithm in model NlpSweepSettings")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NlpSweepSettings.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java index deab5558f7010..ce0f5e7bee2ce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java @@ -6,8 +6,12 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** Abstract class for NLP related AutoML tasks. NLP - Natural Language Processing. */ +/** + * Abstract class for NLP related AutoML tasks. + * NLP - Natural Language Processing. + */ @Fluent public class NlpVertical { /* @@ -16,25 +20,45 @@ public class NlpVertical { @JsonProperty(value = "featurizationSettings") private NlpVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private NlpFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private NlpSweepSettings sweepSettings; + /* * Validation data inputs. */ @JsonProperty(value = "validationData") private MLTableJobInput validationData; - /** Creates an instance of NlpVertical class. */ + /** + * Creates an instance of NlpVertical class. + */ public NlpVertical() { } /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @return the featurizationSettings value. */ public NlpVerticalFeaturizationSettings featurizationSettings() { @@ -43,7 +67,7 @@ public NlpVerticalFeaturizationSettings featurizationSettings() { /** * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @param featurizationSettings the featurizationSettings value to set. * @return the NlpVertical object itself. */ @@ -52,9 +76,29 @@ public NlpVertical withFeaturizationSettings(NlpVerticalFeaturizationSettings fe return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public NlpFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the NlpVertical object itself. + */ + public NlpVertical withFixedParameters(NlpFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. - * + * * @return the limitSettings value. */ public NlpVerticalLimitSettings limitSettings() { @@ -63,7 +107,7 @@ public NlpVerticalLimitSettings limitSettings() { /** * Set the limitSettings property: Execution constraints for AutoMLJob. - * + * * @param limitSettings the limitSettings value to set. * @return the NlpVertical object itself. */ @@ -72,9 +116,51 @@ public NlpVertical withLimitSettings(NlpVerticalLimitSettings limitSettings) { return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the NlpVertical object itself. + */ + public NlpVertical withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public NlpSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the NlpVertical object itself. + */ + public NlpVertical withSweepSettings(NlpSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -83,7 +169,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the NlpVertical object itself. */ @@ -94,16 +180,25 @@ public NlpVertical withValidationData(MLTableJobInput validationData) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } if (validationData() != null) { validationData().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java index fa5c771710dba..757cdfd33546e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java @@ -6,14 +6,20 @@ import com.azure.core.annotation.Fluent; -/** The NlpVerticalFeaturizationSettings model. */ +/** + * The NlpVerticalFeaturizationSettings model. + */ @Fluent public final class NlpVerticalFeaturizationSettings extends FeaturizationSettings { - /** Creates an instance of NlpVerticalFeaturizationSettings class. */ + /** + * Creates an instance of NlpVerticalFeaturizationSettings class. + */ public NlpVerticalFeaturizationSettings() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public NlpVerticalFeaturizationSettings withDatasetLanguage(String datasetLanguage) { super.withDatasetLanguage(datasetLanguage); @@ -22,7 +28,7 @@ public NlpVerticalFeaturizationSettings withDatasetLanguage(String datasetLangua /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java index 82dddc5df409e..820484f7b6e7c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; -/** Job execution constraints. */ +/** + * Job execution constraints. + */ @Fluent public final class NlpVerticalLimitSettings { /* @@ -17,6 +19,12 @@ public final class NlpVerticalLimitSettings { @JsonProperty(value = "maxConcurrentTrials") private Integer maxConcurrentTrials; + /* + * Maximum nodes to use for the experiment. + */ + @JsonProperty(value = "maxNodes") + private Integer maxNodes; + /* * Number of AutoML iterations. */ @@ -29,13 +37,21 @@ public final class NlpVerticalLimitSettings { @JsonProperty(value = "timeout") private Duration timeout; - /** Creates an instance of NlpVerticalLimitSettings class. */ + /* + * Timeout for individual HD trials. + */ + @JsonProperty(value = "trialTimeout") + private Duration trialTimeout; + + /** + * Creates an instance of NlpVerticalLimitSettings class. + */ public NlpVerticalLimitSettings() { } /** * Get the maxConcurrentTrials property: Maximum Concurrent AutoML iterations. - * + * * @return the maxConcurrentTrials value. */ public Integer maxConcurrentTrials() { @@ -44,7 +60,7 @@ public Integer maxConcurrentTrials() { /** * Set the maxConcurrentTrials property: Maximum Concurrent AutoML iterations. - * + * * @param maxConcurrentTrials the maxConcurrentTrials value to set. * @return the NlpVerticalLimitSettings object itself. */ @@ -53,9 +69,29 @@ public NlpVerticalLimitSettings withMaxConcurrentTrials(Integer maxConcurrentTri return this; } + /** + * Get the maxNodes property: Maximum nodes to use for the experiment. + * + * @return the maxNodes value. + */ + public Integer maxNodes() { + return this.maxNodes; + } + + /** + * Set the maxNodes property: Maximum nodes to use for the experiment. + * + * @param maxNodes the maxNodes value to set. + * @return the NlpVerticalLimitSettings object itself. + */ + public NlpVerticalLimitSettings withMaxNodes(Integer maxNodes) { + this.maxNodes = maxNodes; + return this; + } + /** * Get the maxTrials property: Number of AutoML iterations. - * + * * @return the maxTrials value. */ public Integer maxTrials() { @@ -64,7 +100,7 @@ public Integer maxTrials() { /** * Set the maxTrials property: Number of AutoML iterations. - * + * * @param maxTrials the maxTrials value to set. * @return the NlpVerticalLimitSettings object itself. */ @@ -75,7 +111,7 @@ public NlpVerticalLimitSettings withMaxTrials(Integer maxTrials) { /** * Get the timeout property: AutoML job timeout. - * + * * @return the timeout value. */ public Duration timeout() { @@ -84,7 +120,7 @@ public Duration timeout() { /** * Set the timeout property: AutoML job timeout. - * + * * @param timeout the timeout value to set. * @return the NlpVerticalLimitSettings object itself. */ @@ -93,9 +129,29 @@ public NlpVerticalLimitSettings withTimeout(Duration timeout) { return this; } + /** + * Get the trialTimeout property: Timeout for individual HD trials. + * + * @return the trialTimeout value. + */ + public Duration trialTimeout() { + return this.trialTimeout; + } + + /** + * Set the trialTimeout property: Timeout for individual HD trials. + * + * @param trialTimeout the trialTimeout value to set. + * @return the NlpVerticalLimitSettings object itself. + */ + public NlpVerticalLimitSettings withTrialTimeout(Duration trialTimeout) { + this.trialTimeout = trialTimeout; + 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/NodeState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java index ea30f45a6afbc..a14ece1341282 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. */ +/** + * State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + */ public final class NodeState extends ExpandableStringEnum { - /** Static value idle for NodeState. */ + /** + * Static value idle for NodeState. + */ public static final NodeState IDLE = fromString("idle"); - /** Static value running for NodeState. */ + /** + * Static value running for NodeState. + */ public static final NodeState RUNNING = fromString("running"); - /** Static value preparing for NodeState. */ + /** + * Static value preparing for NodeState. + */ public static final NodeState PREPARING = fromString("preparing"); - /** Static value unusable for NodeState. */ + /** + * Static value unusable for NodeState. + */ public static final NodeState UNUSABLE = fromString("unusable"); - /** Static value leaving for NodeState. */ + /** + * Static value leaving for NodeState. + */ public static final NodeState LEAVING = fromString("leaving"); - /** Static value preempted for NodeState. */ + /** + * Static value preempted for NodeState. + */ public static final NodeState PREEMPTED = fromString("preempted"); /** * Creates a new instance of NodeState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public NodeState() { /** * Creates or finds a NodeState from its string representation. - * + * * @param name a name to look for. * @return the corresponding NodeState. */ @@ -50,7 +64,7 @@ public static NodeState fromString(String name) { /** * Gets known NodeState values. - * + * * @return known NodeState values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java index a7004e0e8690f..c403dd2535df0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java @@ -7,12 +7,14 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Counts of various compute node states on the amlCompute. */ +/** + * Counts of various compute node states on the amlCompute. + */ @Immutable public final class NodeStateCounts { /* * Idle node count. - * + * * Number of compute nodes in idle state. */ @JsonProperty(value = "idleNodeCount", access = JsonProperty.Access.WRITE_ONLY) @@ -20,7 +22,7 @@ public final class NodeStateCounts { /* * Running node count. - * + * * Number of compute nodes which are running jobs. */ @JsonProperty(value = "runningNodeCount", access = JsonProperty.Access.WRITE_ONLY) @@ -28,7 +30,7 @@ public final class NodeStateCounts { /* * Preparing node count. - * + * * Number of compute nodes which are being prepared. */ @JsonProperty(value = "preparingNodeCount", access = JsonProperty.Access.WRITE_ONLY) @@ -36,7 +38,7 @@ public final class NodeStateCounts { /* * Unusable node count. - * + * * Number of compute nodes which are in unusable state. */ @JsonProperty(value = "unusableNodeCount", access = JsonProperty.Access.WRITE_ONLY) @@ -44,7 +46,7 @@ public final class NodeStateCounts { /* * Leaving node count. - * + * * Number of compute nodes which are leaving the amlCompute. */ @JsonProperty(value = "leavingNodeCount", access = JsonProperty.Access.WRITE_ONLY) @@ -52,21 +54,23 @@ public final class NodeStateCounts { /* * Preempted node count. - * + * * Number of compute nodes which are in preempted state. */ @JsonProperty(value = "preemptedNodeCount", access = JsonProperty.Access.WRITE_ONLY) private Integer preemptedNodeCount; - /** Creates an instance of NodeStateCounts class. */ + /** + * Creates an instance of NodeStateCounts class. + */ public NodeStateCounts() { } /** * Get the idleNodeCount property: Idle node count. - * - *

Number of compute nodes in idle state. - * + * + * Number of compute nodes in idle state. + * * @return the idleNodeCount value. */ public Integer idleNodeCount() { @@ -75,9 +79,9 @@ public Integer idleNodeCount() { /** * Get the runningNodeCount property: Running node count. - * - *

Number of compute nodes which are running jobs. - * + * + * Number of compute nodes which are running jobs. + * * @return the runningNodeCount value. */ public Integer runningNodeCount() { @@ -86,9 +90,9 @@ public Integer runningNodeCount() { /** * Get the preparingNodeCount property: Preparing node count. - * - *

Number of compute nodes which are being prepared. - * + * + * Number of compute nodes which are being prepared. + * * @return the preparingNodeCount value. */ public Integer preparingNodeCount() { @@ -97,9 +101,9 @@ public Integer preparingNodeCount() { /** * Get the unusableNodeCount property: Unusable node count. - * - *

Number of compute nodes which are in unusable state. - * + * + * Number of compute nodes which are in unusable state. + * * @return the unusableNodeCount value. */ public Integer unusableNodeCount() { @@ -108,9 +112,9 @@ public Integer unusableNodeCount() { /** * Get the leavingNodeCount property: Leaving node count. - * - *

Number of compute nodes which are leaving the amlCompute. - * + * + * Number of compute nodes which are leaving the amlCompute. + * * @return the leavingNodeCount value. */ public Integer leavingNodeCount() { @@ -119,9 +123,9 @@ public Integer leavingNodeCount() { /** * Get the preemptedNodeCount property: Preempted node count. - * - *

Number of compute nodes which are in preempted state. - * + * + * Number of compute nodes which are in preempted state. + * * @return the preemptedNodeCount value. */ public Integer preemptedNodeCount() { @@ -130,7 +134,7 @@ public Integer preemptedNodeCount() { /** * 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..100d7e976a41d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.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; + +/** + * 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..2744df1d94463 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.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 enumerated types for the nodes value. + */ +public final class NodesValueType extends ExpandableStringEnum { + /** + * Static value All for NodesValueType. + */ + public static final NodesValueType ALL = fromString("All"); + + /** + * Static value Custom for NodesValueType. + */ + public static final NodesValueType CUSTOM = fromString("Custom"); + + /** + * 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/NoneAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java index 79af891099d09..1b05b33b16472 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java @@ -7,47 +7,79 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; -/** The NoneAuthTypeWorkspaceConnectionProperties model. */ +/** + * The NoneAuthTypeWorkspaceConnectionProperties model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("None") @Fluent public final class NoneAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /** Creates an instance of NoneAuthTypeWorkspaceConnectionProperties class. */ + /** + * Creates an instance of NoneAuthTypeWorkspaceConnectionProperties class. + */ public NoneAuthTypeWorkspaceConnectionProperties() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public NoneAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { super.withCategory(category); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public NoneAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NoneAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public NoneAuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public NoneAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java index 01b0ba2366047..337d4a48d3f64 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Empty/none datastore credentials. */ +/** + * Empty/none datastore credentials. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") @JsonTypeName("None") @Immutable public final class NoneDatastoreCredentials extends DatastoreCredentials { - /** Creates an instance of NoneDatastoreCredentials class. */ + /** + * Creates an instance of NoneDatastoreCredentials class. + */ public NoneDatastoreCredentials() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java index 4e28342a32c7d..57e7beafb14d4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java @@ -6,67 +6,69 @@ import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; -/** An immutable client-side representation of NotebookAccessTokenResult. */ +/** + * An immutable client-side representation of NotebookAccessTokenResult. + */ public interface NotebookAccessTokenResult { /** - * Gets the notebookResourceId property: The notebookResourceId property. - * - * @return the notebookResourceId value. - */ - String notebookResourceId(); - - /** - * Gets the hostname property: The hostName property. - * - * @return the hostname value. + * Gets the accessToken property: The accessToken property. + * + * @return the accessToken value. */ - String hostname(); + String accessToken(); /** - * Gets the publicDns property: The publicDns property. - * - * @return the publicDns value. + * Gets the expiresIn property: The expiresIn property. + * + * @return the expiresIn value. */ - String publicDns(); + Integer expiresIn(); /** - * Gets the accessToken property: The accessToken property. - * - * @return the accessToken value. + * Gets the hostname property: The hostName property. + * + * @return the hostname value. */ - String accessToken(); + String hostname(); /** - * Gets the tokenType property: The tokenType property. - * - * @return the tokenType value. + * Gets the notebookResourceId property: The notebookResourceId property. + * + * @return the notebookResourceId value. */ - String tokenType(); + String notebookResourceId(); /** - * Gets the expiresIn property: The expiresIn property. - * - * @return the expiresIn value. + * Gets the publicDns property: The publicDns property. + * + * @return the publicDns value. */ - Integer expiresIn(); + String publicDns(); /** * Gets the refreshToken property: The refreshToken property. - * + * * @return the refreshToken value. */ String refreshToken(); /** * Gets the scope property: The scope property. - * + * * @return the scope value. */ String scope(); + /** + * Gets the tokenType property: The tokenType property. + * + * @return the tokenType value. + */ + String tokenType(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner object. - * + * * @return the inner object. */ NotebookAccessTokenResultInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java index ab2aef26e6b09..3915f4b1e152d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The NotebookPreparationError model. */ +/** + * The NotebookPreparationError model. + */ @Fluent public final class NotebookPreparationError { /* @@ -22,13 +24,15 @@ public final class NotebookPreparationError { @JsonProperty(value = "statusCode") private Integer statusCode; - /** Creates an instance of NotebookPreparationError class. */ + /** + * Creates an instance of NotebookPreparationError class. + */ public NotebookPreparationError() { } /** * Get the errorMessage property: The errorMessage property. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -37,7 +41,7 @@ public String errorMessage() { /** * Set the errorMessage property: The errorMessage property. - * + * * @param errorMessage the errorMessage value to set. * @return the NotebookPreparationError object itself. */ @@ -48,7 +52,7 @@ public NotebookPreparationError withErrorMessage(String errorMessage) { /** * Get the statusCode property: The statusCode property. - * + * * @return the statusCode value. */ public Integer statusCode() { @@ -57,7 +61,7 @@ public Integer statusCode() { /** * Set the statusCode property: The statusCode property. - * + * * @param statusCode the statusCode value to set. * @return the NotebookPreparationError object itself. */ @@ -68,7 +72,7 @@ public NotebookPreparationError withStatusCode(Integer statusCode) { /** * 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/NotebookResourceInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.java index f8aa5bb01e786..96443e7824f5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.java @@ -6,32 +6,41 @@ import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -/** An immutable client-side representation of NotebookResourceInfo. */ +/** + * An immutable client-side representation of NotebookResourceInfo. + */ public interface NotebookResourceInfo { /** * Gets the fqdn property: The fqdn property. - * + * * @return the fqdn value. */ String fqdn(); /** - * Gets the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @return the resourceId value. + * Gets the isPrivateLinkEnabled property: The isPrivateLinkEnabled property. + * + * @return the isPrivateLinkEnabled value. */ - String resourceId(); + Boolean isPrivateLinkEnabled(); /** * Gets the notebookPreparationError property: The error that occurs when preparing notebook. - * + * * @return the notebookPreparationError value. */ NotebookPreparationError notebookPreparationError(); + /** + * Gets the resourceId property: the data plane resourceId that used to initialize notebook component. + * + * @return the resourceId value. + */ + String resourceId(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner object. - * + * * @return the inner object. */ NotebookResourceInfoInner innerModel(); 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..bf1fe54b738dc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java @@ -0,0 +1,119 @@ +// Copyright (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..df1149de5de46 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.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 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..7637eb3ccc9ef --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.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.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..7f66501aeeaac --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.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.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..b4daa838c2a73 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.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.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..48a247c0f17db --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..4e6f9b0f68e89 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.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.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/OAuth2AuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java new file mode 100644 index 0000000000000..fc1a24523b0ad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,122 @@ +// Copyright (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; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The OAuth2AuthTypeWorkspaceConnectionProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("OAuth2") +@Fluent +public final class OAuth2AuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * ClientId and ClientSecret are required. Other properties are optional + * depending on each OAuth2 provider's implementation. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionOAuth2 credentials; + + /** + * Creates an instance of OAuth2AuthTypeWorkspaceConnectionProperties class. + */ + public OAuth2AuthTypeWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: ClientId and ClientSecret are required. Other properties are optional + * depending on each OAuth2 provider's implementation. + * + * @return the credentials value. + */ + public WorkspaceConnectionOAuth2 credentials() { + return this.credentials; + } + + /** + * Set the credentials property: ClientId and ClientSecret are required. Other properties are optional + * depending on each OAuth2 provider's implementation. + * + * @param credentials the credentials value to set. + * @return the OAuth2AuthTypeWorkspaceConnectionProperties object itself. + */ + public OAuth2AuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceConnectionOAuth2 credentials) { + this.credentials = credentials; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OAuth2AuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OAuth2AuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OAuth2AuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OAuth2AuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OAuth2AuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OAuth2AuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() != null) { + credentials().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java index 4bef9028bdad4..155524bc196e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Primary metrics for Image ObjectDetection task. */ +/** + * Primary metrics for Image ObjectDetection task. + */ public final class ObjectDetectionPrimaryMetrics extends ExpandableStringEnum { - /** Static value MeanAveragePrecision for ObjectDetectionPrimaryMetrics. */ + /** + * Static value MeanAveragePrecision for ObjectDetectionPrimaryMetrics. + */ public static final ObjectDetectionPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); /** * Creates a new instance of ObjectDetectionPrimaryMetrics value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ObjectDetectionPrimaryMetrics() { /** * Creates or finds a ObjectDetectionPrimaryMetrics from its string representation. - * + * * @param name a name to look for. * @return the corresponding ObjectDetectionPrimaryMetrics. */ @@ -35,7 +39,7 @@ public static ObjectDetectionPrimaryMetrics fromString(String name) { /** * Gets known ObjectDetectionPrimaryMetrics values. - * + * * @return known ObjectDetectionPrimaryMetrics values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java index bd09112175ace..3f121fdfe1f61 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Optimization objective. */ +/** + * Optimization objective. + */ @Fluent public final class Objective { /* @@ -23,13 +25,15 @@ public final class Objective { @JsonProperty(value = "primaryMetric", required = true) private String primaryMetric; - /** Creates an instance of Objective class. */ + /** + * Creates an instance of Objective class. + */ public Objective() { } /** * Get the goal property: [Required] Defines supported metric goals for hyperparameter tuning. - * + * * @return the goal value. */ public Goal goal() { @@ -38,7 +42,7 @@ public Goal goal() { /** * Set the goal property: [Required] Defines supported metric goals for hyperparameter tuning. - * + * * @param goal the goal value to set. * @return the Objective object itself. */ @@ -49,7 +53,7 @@ public Objective withGoal(Goal goal) { /** * Get the primaryMetric property: [Required] Name of the metric to optimize. - * + * * @return the primaryMetric value. */ public String primaryMetric() { @@ -58,7 +62,7 @@ public String primaryMetric() { /** * Set the primaryMetric property: [Required] Name of the metric to optimize. - * + * * @param primaryMetric the primaryMetric value to set. * @return the Objective object itself. */ @@ -69,7 +73,7 @@ public Objective withPrimaryMetric(String primaryMetric) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -78,9 +82,8 @@ public void validate() { .logExceptionAsError(new IllegalArgumentException("Missing required property goal in model Objective")); } if (primaryMetric() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property primaryMetric in model Objective")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property primaryMetric in model Objective")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java new file mode 100644 index 0000000000000..9968bef6b3d79 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java @@ -0,0 +1,71 @@ +// Copyright (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.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * OneLake artifact (data source) configuration. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "artifactType", + defaultImpl = OneLakeArtifact.class) +@JsonTypeName("OneLakeArtifact") +@JsonSubTypes({ @JsonSubTypes.Type(name = "LakeHouse", value = LakeHouseArtifact.class) }) +@Fluent +public class OneLakeArtifact { + /* + * [Required] OneLake artifact name + */ + @JsonProperty(value = "artifactName", required = true) + private String artifactName; + + /** + * Creates an instance of OneLakeArtifact class. + */ + public OneLakeArtifact() { + } + + /** + * Get the artifactName property: [Required] OneLake artifact name. + * + * @return the artifactName value. + */ + public String artifactName() { + return this.artifactName; + } + + /** + * Set the artifactName property: [Required] OneLake artifact name. + * + * @param artifactName the artifactName value to set. + * @return the OneLakeArtifact object itself. + */ + public OneLakeArtifact withArtifactName(String artifactName) { + this.artifactName = artifactName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (artifactName() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property artifactName in model OneLakeArtifact")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OneLakeArtifact.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java new file mode 100644 index 0000000000000..bd9f1712bbbb9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.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; + +/** + * Enum to determine OneLake artifact type. + */ +public final class OneLakeArtifactType extends ExpandableStringEnum { + /** + * Static value LakeHouse for OneLakeArtifactType. + */ + public static final OneLakeArtifactType LAKE_HOUSE = fromString("LakeHouse"); + + /** + * Creates a new instance of OneLakeArtifactType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OneLakeArtifactType() { + } + + /** + * Creates or finds a OneLakeArtifactType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OneLakeArtifactType. + */ + @JsonCreator + public static OneLakeArtifactType fromString(String name) { + return fromString(name, OneLakeArtifactType.class); + } + + /** + * Gets known OneLakeArtifactType values. + * + * @return known OneLakeArtifactType values. + */ + public static Collection values() { + return values(OneLakeArtifactType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java new file mode 100644 index 0000000000000..93d8fe397a283 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java @@ -0,0 +1,200 @@ +// Copyright (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.Map; + +/** + * OneLake (Trident) datastore configuration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") +@JsonTypeName("OneLake") +@Fluent +public final class OneLakeDatastore extends DatastoreProperties { + /* + * [Required] OneLake artifact backing the datastore. + */ + @JsonProperty(value = "artifact", required = true) + private OneLakeArtifact artifact; + + /* + * OneLake endpoint to use for the datastore. + */ + @JsonProperty(value = "endpoint") + private String endpoint; + + /* + * [Required] OneLake workspace name. + */ + @JsonProperty(value = "oneLakeWorkspaceName", required = true) + private String oneLakeWorkspaceName; + + /* + * Indicates which identity to use to authenticate service data access to customer's storage. + */ + @JsonProperty(value = "serviceDataAccessAuthIdentity") + private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + + /** + * Creates an instance of OneLakeDatastore class. + */ + public OneLakeDatastore() { + } + + /** + * Get the artifact property: [Required] OneLake artifact backing the datastore. + * + * @return the artifact value. + */ + public OneLakeArtifact artifact() { + return this.artifact; + } + + /** + * Set the artifact property: [Required] OneLake artifact backing the datastore. + * + * @param artifact the artifact value to set. + * @return the OneLakeDatastore object itself. + */ + public OneLakeDatastore withArtifact(OneLakeArtifact artifact) { + this.artifact = artifact; + return this; + } + + /** + * Get the endpoint property: OneLake endpoint to use for the datastore. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: OneLake endpoint to use for the datastore. + * + * @param endpoint the endpoint value to set. + * @return the OneLakeDatastore object itself. + */ + public OneLakeDatastore withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the oneLakeWorkspaceName property: [Required] OneLake workspace name. + * + * @return the oneLakeWorkspaceName value. + */ + public String oneLakeWorkspaceName() { + return this.oneLakeWorkspaceName; + } + + /** + * Set the oneLakeWorkspaceName property: [Required] OneLake workspace name. + * + * @param oneLakeWorkspaceName the oneLakeWorkspaceName value to set. + * @return the OneLakeDatastore object itself. + */ + public OneLakeDatastore withOneLakeWorkspaceName(String oneLakeWorkspaceName) { + this.oneLakeWorkspaceName = oneLakeWorkspaceName; + return this; + } + + /** + * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data + * access to customer's storage. + * + * @return the serviceDataAccessAuthIdentity value. + */ + public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { + return this.serviceDataAccessAuthIdentity; + } + + /** + * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data + * access to customer's storage. + * + * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. + * @return the OneLakeDatastore object itself. + */ + public OneLakeDatastore + withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { + this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OneLakeDatastore withCredentials(DatastoreCredentials credentials) { + super.withCredentials(credentials); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OneLakeDatastore withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OneLakeDatastore withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OneLakeDatastore withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OneLakeDatastore 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 (artifact() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property artifact in model OneLakeDatastore")); + } else { + artifact().validate(); + } + if (oneLakeWorkspaceName() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property oneLakeWorkspaceName in model OneLakeDatastore")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OneLakeDatastore.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..73190f6226a95 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 @@ -11,46 +11,48 @@ import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; import java.util.Map; -/** An immutable client-side representation of OnlineDeployment. */ +/** + * An immutable client-side representation of OnlineDeployment. + */ public interface OnlineDeployment { /** * 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(); @@ -58,78 +60,84 @@ public interface OnlineDeployment { /** * 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 properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ OnlineDeploymentProperties properties(); /** * 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 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.OnlineDeploymentInner object. - * + * * @return the inner object. */ OnlineDeploymentInner innerModel(); - /** The entirety of the OnlineDeployment definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the OnlineDeployment definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The OnlineDeployment definition stages. */ + + /** + * The OnlineDeployment definition stages. + */ interface DefinitionStages { - /** The first stage of the OnlineDeployment definition. */ + /** + * The first stage of the OnlineDeployment definition. + */ interface Blank extends WithLocation { } - /** The stage of the OnlineDeployment definition allowing to specify location. */ + + /** + * The stage of the OnlineDeployment 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. */ @@ -137,160 +145,188 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithParentResource withRegion(String location); } - /** The stage of the OnlineDeployment definition allowing to specify parent resource. */ + + /** + * The stage of the OnlineDeployment definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName, endpointName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. * @return the next definition stage. */ - WithProperties withExistingOnlineEndpoint( - String resourceGroupName, String workspaceName, String endpointName); + WithProperties withExistingOnlineEndpoint(String resourceGroupName, String workspaceName, + String endpointName); } - /** The stage of the OnlineDeployment definition allowing to specify properties. */ + + /** + * The stage of the OnlineDeployment 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(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. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithKind, - DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. - * + * * @return the created resource. */ OnlineDeployment create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ OnlineDeployment create(Context context); } - /** The stage of the OnlineDeployment definition allowing to specify tags. */ + + /** + * The stage of the OnlineDeployment 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 OnlineDeployment definition allowing to specify identity. */ + + /** + * The stage of the OnlineDeployment 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 OnlineDeployment definition allowing to specify kind. */ + + /** + * The stage of the OnlineDeployment 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. + * same type. * @return the next definition stage. */ WithCreate withKind(String kind); } - /** The stage of the OnlineDeployment definition allowing to specify sku. */ + + /** + * The stage of the OnlineDeployment 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); } } + /** * Begins update for the OnlineDeployment resource. - * + * * @return the stage of resource update. */ OnlineDeployment.Update update(); - /** The template for OnlineDeployment update. */ + /** + * The template for OnlineDeployment update. + */ interface Update extends UpdateStages.WithTags, UpdateStages.WithSku { /** * Executes the update request. - * + * * @return the updated resource. */ OnlineDeployment apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ OnlineDeployment apply(Context context); } - /** The OnlineDeployment update stages. */ + + /** + * The OnlineDeployment update stages. + */ interface UpdateStages { - /** The stage of the OnlineDeployment update allowing to specify tags. */ + /** + * The stage of the OnlineDeployment 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 OnlineDeployment update allowing to specify sku. */ + + /** + * The stage of the OnlineDeployment 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. */ OnlineDeployment refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -298,7 +334,7 @@ interface WithSku { /** * Polls an Endpoint operation. - * + * * @param body The request containing parameters for retrieving logs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -310,7 +346,7 @@ interface WithSku { /** * Polls an Endpoint operation. - * + * * @param body The request containing parameters for retrieving logs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java index fff47cc6a83f4..9733139d2e79e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** The OnlineDeploymentProperties model. */ +/** + * The OnlineDeploymentProperties model. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -20,8 +22,7 @@ @JsonTypeName("OnlineDeploymentProperties") @JsonSubTypes({ @JsonSubTypes.Type(name = "Kubernetes", value = KubernetesOnlineDeployment.class), - @JsonSubTypes.Type(name = "Managed", value = ManagedOnlineDeployment.class) -}) + @JsonSubTypes.Type(name = "Managed", value = ManagedOnlineDeployment.class) }) @Fluent public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase { /* @@ -30,6 +31,12 @@ public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase @JsonProperty(value = "appInsightsEnabled") private Boolean appInsightsEnabled; + /* + * The mdc configuration, we disable mdc when it's null. + */ + @JsonProperty(value = "dataCollector") + private DataCollector dataCollector; + /* * If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. */ @@ -88,13 +95,15 @@ public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase @JsonProperty(value = "scaleSettings") private OnlineScaleSettings scaleSettings; - /** Creates an instance of OnlineDeploymentProperties class. */ + /** + * Creates an instance of OnlineDeploymentProperties class. + */ public OnlineDeploymentProperties() { } /** * Get the appInsightsEnabled property: If true, enables Application Insights logging. - * + * * @return the appInsightsEnabled value. */ public Boolean appInsightsEnabled() { @@ -103,7 +112,7 @@ public Boolean appInsightsEnabled() { /** * Set the appInsightsEnabled property: If true, enables Application Insights logging. - * + * * @param appInsightsEnabled the appInsightsEnabled value to set. * @return the OnlineDeploymentProperties object itself. */ @@ -112,10 +121,30 @@ public OnlineDeploymentProperties withAppInsightsEnabled(Boolean appInsightsEnab return this; } + /** + * Get the dataCollector property: The mdc configuration, we disable mdc when it's null. + * + * @return the dataCollector value. + */ + public DataCollector dataCollector() { + return this.dataCollector; + } + + /** + * Set the dataCollector property: The mdc configuration, we disable mdc when it's null. + * + * @param dataCollector the dataCollector value to set. + * @return the OnlineDeploymentProperties object itself. + */ + public OnlineDeploymentProperties withDataCollector(DataCollector dataCollector) { + this.dataCollector = dataCollector; + return this; + } + /** * Get the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this * will create secure egress. Default: Enabled. - * + * * @return the egressPublicNetworkAccess value. */ public EgressPublicNetworkAccessType egressPublicNetworkAccess() { @@ -125,19 +154,19 @@ public EgressPublicNetworkAccessType egressPublicNetworkAccess() { /** * Set the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this * will create secure egress. Default: Enabled. - * + * * @param egressPublicNetworkAccess the egressPublicNetworkAccess value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withEgressPublicNetworkAccess( - EgressPublicNetworkAccessType egressPublicNetworkAccess) { + public OnlineDeploymentProperties + withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { this.egressPublicNetworkAccess = egressPublicNetworkAccess; return this; } /** * Get the instanceType property: Compute instance type. - * + * * @return the instanceType value. */ public String instanceType() { @@ -146,7 +175,7 @@ public String instanceType() { /** * Set the instanceType property: Compute instance type. - * + * * @param instanceType the instanceType value to set. * @return the OnlineDeploymentProperties object itself. */ @@ -157,7 +186,7 @@ public OnlineDeploymentProperties withInstanceType(String instanceType) { /** * Get the livenessProbe property: Liveness probe monitors the health of the container regularly. - * + * * @return the livenessProbe value. */ public ProbeSettings livenessProbe() { @@ -166,7 +195,7 @@ public ProbeSettings livenessProbe() { /** * Set the livenessProbe property: Liveness probe monitors the health of the container regularly. - * + * * @param livenessProbe the livenessProbe value to set. * @return the OnlineDeploymentProperties object itself. */ @@ -177,7 +206,7 @@ public OnlineDeploymentProperties withLivenessProbe(ProbeSettings livenessProbe) /** * Get the model property: The URI path to the model. - * + * * @return the model value. */ public String model() { @@ -186,7 +215,7 @@ public String model() { /** * Set the model property: The URI path to the model. - * + * * @param model the model value to set. * @return the OnlineDeploymentProperties object itself. */ @@ -197,7 +226,7 @@ public OnlineDeploymentProperties withModel(String model) { /** * Get the modelMountPath property: The path to mount the model in custom container. - * + * * @return the modelMountPath value. */ public String modelMountPath() { @@ -206,7 +235,7 @@ public String modelMountPath() { /** * Set the modelMountPath property: The path to mount the model in custom container. - * + * * @param modelMountPath the modelMountPath value to set. * @return the OnlineDeploymentProperties object itself. */ @@ -217,7 +246,7 @@ public OnlineDeploymentProperties withModelMountPath(String modelMountPath) { /** * Get the provisioningState property: Provisioning state for the endpoint deployment. - * + * * @return the provisioningState value. */ public DeploymentProvisioningState provisioningState() { @@ -227,7 +256,7 @@ public DeploymentProvisioningState provisioningState() { /** * Get the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The * properties and defaults are the same as liveness probe. - * + * * @return the readinessProbe value. */ public ProbeSettings readinessProbe() { @@ -237,7 +266,7 @@ public ProbeSettings readinessProbe() { /** * Set the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The * properties and defaults are the same as liveness probe. - * + * * @param readinessProbe the readinessProbe value to set. * @return the OnlineDeploymentProperties object itself. */ @@ -248,7 +277,7 @@ public OnlineDeploymentProperties withReadinessProbe(ProbeSettings readinessProb /** * Get the requestSettings property: Request settings for the deployment. - * + * * @return the requestSettings value. */ public OnlineRequestSettings requestSettings() { @@ -257,7 +286,7 @@ public OnlineRequestSettings requestSettings() { /** * Set the requestSettings property: Request settings for the deployment. - * + * * @param requestSettings the requestSettings value to set. * @return the OnlineDeploymentProperties object itself. */ @@ -267,10 +296,11 @@ public OnlineDeploymentProperties withRequestSettings(OnlineRequestSettings requ } /** - * Get the scaleSettings property: Scale settings for the deployment. If it is null or not provided, it defaults to - * TargetUtilizationScaleSettings for KubernetesOnlineDeployment and to DefaultScaleSettings for - * ManagedOnlineDeployment. - * + * Get the scaleSettings property: Scale settings for the deployment. + * If it is null or not provided, + * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + * and to DefaultScaleSettings for ManagedOnlineDeployment. + * * @return the scaleSettings value. */ public OnlineScaleSettings scaleSettings() { @@ -278,10 +308,11 @@ public OnlineScaleSettings scaleSettings() { } /** - * Set the scaleSettings property: Scale settings for the deployment. If it is null or not provided, it defaults to - * TargetUtilizationScaleSettings for KubernetesOnlineDeployment and to DefaultScaleSettings for - * ManagedOnlineDeployment. - * + * Set the scaleSettings property: Scale settings for the deployment. + * If it is null or not provided, + * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + * and to DefaultScaleSettings for ManagedOnlineDeployment. + * * @param scaleSettings the scaleSettings value to set. * @return the OnlineDeploymentProperties object itself. */ @@ -290,35 +321,45 @@ public OnlineDeploymentProperties withScaleSettings(OnlineScaleSettings scaleSet return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { super.withCodeConfiguration(codeConfiguration); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineDeploymentProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineDeploymentProperties withEnvironmentId(String environmentId) { super.withEnvironmentId(environmentId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineDeploymentProperties withEnvironmentVariables(Map environmentVariables) { super.withEnvironmentVariables(environmentVariables); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineDeploymentProperties withProperties(Map properties) { super.withProperties(properties); @@ -327,12 +368,15 @@ public OnlineDeploymentProperties withProperties(Map properties) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (dataCollector() != null) { + dataCollector().validate(); + } if (livenessProbe() != null) { livenessProbe().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java index b9915874b1ca4..0012e91004ffc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of OnlineDeployment entities. */ +/** + * A paginated list of OnlineDeployment entities. + */ @Fluent public final class OnlineDeploymentTrackedResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class OnlineDeploymentTrackedResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of OnlineDeploymentTrackedResourceArmPaginatedResult class. */ + /** + * Creates an instance of OnlineDeploymentTrackedResourceArmPaginatedResult class. + */ public OnlineDeploymentTrackedResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no * additional pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no * additional pages. - * + * * @param nextLink the nextLink value to set. * @return the OnlineDeploymentTrackedResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public OnlineDeploymentTrackedResourceArmPaginatedResult withNextLink(String nex /** * Get the value property: An array of objects of type OnlineDeployment. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type OnlineDeployment. - * + * * @param value the value value to set. * @return the OnlineDeploymentTrackedResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public OnlineDeploymentTrackedResourceArmPaginatedResult withValue(List list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context); /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -62,7 +58,7 @@ PagedIterable list( /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -72,12 +68,12 @@ PagedIterable list( * @throws com.azure.core.management.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 endpointName, String deploymentName, Context context); + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); /** * Get Inference Deployment Deployment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -88,12 +84,12 @@ void delete( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return inference Deployment Deployment along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** * Get Inference Deployment Deployment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -107,7 +103,7 @@ Response getWithResponse( /** * Polls an Endpoint operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -119,17 +115,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ - Response getLogsWithResponse( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context); + Response getLogsWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, DeploymentLogsRequest body, Context context); /** * Polls an Endpoint operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -140,16 +131,12 @@ Response getLogsWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - DeploymentLogs getLogs( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, + DeploymentLogs getLogs(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, DeploymentLogsRequest body); /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -159,12 +146,12 @@ DeploymentLogs getLogs( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. */ - PagedIterable listSkus( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); /** * List Inference Endpoint Deployment Skus. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Inference endpoint name. @@ -177,18 +164,12 @@ PagedIterable listSkus( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. */ - PagedIterable listSkus( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context); + PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Integer count, String skip, Context context); /** * Get Inference Deployment Deployment. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -199,7 +180,7 @@ PagedIterable listSkus( /** * Get Inference Deployment Deployment. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -211,7 +192,7 @@ PagedIterable listSkus( /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @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. @@ -221,7 +202,7 @@ PagedIterable listSkus( /** * Delete Inference Endpoint Deployment (asynchronous). - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -232,7 +213,7 @@ PagedIterable listSkus( /** * Begins definition for a new OnlineDeployment resource. - * + * * @param name resource name. * @return the first stage of the new OnlineDeployment definition. */ 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..31ab142e3bb89 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 @@ -11,46 +11,48 @@ import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; import java.util.Map; -/** An immutable client-side representation of OnlineEndpoint. */ +/** + * An immutable client-side representation of OnlineEndpoint. + */ public interface OnlineEndpoint { /** * 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(); @@ -58,78 +60,84 @@ public interface OnlineEndpoint { /** * 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 properties property: [Required] Additional attributes of the entity. - * + * * @return the properties value. */ OnlineEndpointProperties properties(); /** * 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 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.OnlineEndpointInner object. - * + * * @return the inner object. */ OnlineEndpointInner innerModel(); - /** The entirety of the OnlineEndpoint definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the OnlineEndpoint definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The OnlineEndpoint definition stages. */ + + /** + * The OnlineEndpoint definition stages. + */ interface DefinitionStages { - /** The first stage of the OnlineEndpoint definition. */ + /** + * The first stage of the OnlineEndpoint definition. + */ interface Blank extends WithLocation { } - /** The stage of the OnlineEndpoint definition allowing to specify location. */ + + /** + * The stage of the OnlineEndpoint 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. */ @@ -137,159 +145,187 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithParentResource withRegion(String location); } - /** The stage of the OnlineEndpoint definition allowing to specify parent resource. */ + + /** + * The stage of the OnlineEndpoint 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 OnlineEndpoint definition allowing to specify properties. */ + + /** + * The stage of the OnlineEndpoint 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(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. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithKind, - DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. - * + * * @return the created resource. */ OnlineEndpoint create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ OnlineEndpoint create(Context context); } - /** The stage of the OnlineEndpoint definition allowing to specify tags. */ + + /** + * The stage of the OnlineEndpoint 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 OnlineEndpoint definition allowing to specify identity. */ + + /** + * The stage of the OnlineEndpoint 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 OnlineEndpoint definition allowing to specify kind. */ + + /** + * The stage of the OnlineEndpoint 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. + * same type. * @return the next definition stage. */ WithCreate withKind(String kind); } - /** The stage of the OnlineEndpoint definition allowing to specify sku. */ + + /** + * The stage of the OnlineEndpoint 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); } } + /** * Begins update for the OnlineEndpoint resource. - * + * * @return the stage of resource update. */ OnlineEndpoint.Update update(); - /** The template for OnlineEndpoint update. */ + /** + * The template for OnlineEndpoint update. + */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { /** * Executes the update request. - * + * * @return the updated resource. */ OnlineEndpoint apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ OnlineEndpoint apply(Context context); } - /** The OnlineEndpoint update stages. */ + + /** + * The OnlineEndpoint update stages. + */ interface UpdateStages { - /** The stage of the OnlineEndpoint update allowing to specify tags. */ + /** + * The stage of the OnlineEndpoint 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 OnlineEndpoint update allowing to specify identity. */ + + /** + * The stage of the OnlineEndpoint 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(PartialManagedServiceIdentity identity); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ OnlineEndpoint refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -297,7 +333,7 @@ interface WithIdentity { /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -308,7 +344,7 @@ interface WithIdentity { /** * List EndpointAuthKeys for an Endpoint using Key-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. * @return keys for endpoint authentication. @@ -317,7 +353,7 @@ interface WithIdentity { /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -327,7 +363,7 @@ interface WithIdentity { /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param body RegenerateKeys request . * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -337,8 +373,8 @@ 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. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -348,8 +384,8 @@ 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. * @return service Token. 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..dd2c69a7093dd 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Online endpoint configuration. */ +/** + * Online endpoint configuration. + */ @Fluent public final class OnlineEndpointProperties extends EndpointPropertiesBaseInner { /* @@ -21,6 +23,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. */ @@ -40,13 +50,16 @@ public final class OnlineEndpointProperties extends EndpointPropertiesBaseInner @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map traffic; - /** Creates an instance of OnlineEndpointProperties class. */ + /** + * Creates an instance of OnlineEndpointProperties class. + */ public OnlineEndpointProperties() { } /** - * Get the compute property: ARM resource ID of the compute if it exists. optional. - * + * Get the compute property: ARM resource ID of the compute if it exists. + * optional. + * * @return the compute value. */ public String compute() { @@ -54,8 +67,9 @@ public String compute() { } /** - * Set the compute property: ARM resource ID of the compute if it exists. optional. - * + * Set the compute property: ARM resource ID of the compute if it exists. + * optional. + * * @param compute the compute value to set. * @return the OnlineEndpointProperties object itself. */ @@ -64,9 +78,31 @@ 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. - * + * * @return the provisioningState value. */ public EndpointProvisioningState provisioningState() { @@ -74,9 +110,9 @@ public EndpointProvisioningState provisioningState() { } /** - * Get the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when Private - * Link is enabled. - * + * Get the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when + * Private Link is enabled. + * * @return the publicNetworkAccess value. */ public PublicNetworkAccessType publicNetworkAccess() { @@ -84,9 +120,9 @@ public PublicNetworkAccessType publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when Private - * Link is enabled. - * + * Set the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when + * Private Link is enabled. + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the OnlineEndpointProperties object itself. */ @@ -98,7 +134,7 @@ public OnlineEndpointProperties withPublicNetworkAccess(PublicNetworkAccessType /** * Get the traffic property: Percentage of traffic from endpoint to divert to each deployment. Traffic values need * to sum to 100. - * + * * @return the traffic value. */ public Map traffic() { @@ -108,7 +144,7 @@ public Map traffic() { /** * Set the traffic property: Percentage of traffic from endpoint to divert to each deployment. Traffic values need * to sum to 100. - * + * * @param traffic the traffic value to set. * @return the OnlineEndpointProperties object itself. */ @@ -117,28 +153,36 @@ public OnlineEndpointProperties withTraffic(Map traffic) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineEndpointProperties withAuthMode(EndpointAuthMode authMode) { super.withAuthMode(authMode); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineEndpointProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineEndpointProperties withKeys(EndpointAuthKeysInner keys) { super.withKeys(keys); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public OnlineEndpointProperties withProperties(Map properties) { super.withProperties(properties); @@ -147,7 +191,7 @@ public OnlineEndpointProperties withProperties(Map properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java index d675ed3a44645..04ebfe311cc7e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of OnlineEndpoint entities. */ +/** + * A paginated list of OnlineEndpoint entities. + */ @Fluent public final class OnlineEndpointTrackedResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class OnlineEndpointTrackedResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of OnlineEndpointTrackedResourceArmPaginatedResult class. */ + /** + * Creates an instance of OnlineEndpointTrackedResourceArmPaginatedResult class. + */ public OnlineEndpointTrackedResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional * pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional * pages. - * + * * @param nextLink the nextLink value to set. * @return the OnlineEndpointTrackedResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public OnlineEndpointTrackedResourceArmPaginatedResult withNextLink(String nextL /** * Get the value property: An array of objects of type OnlineEndpoint. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type OnlineEndpoint. - * + * * @param value the value value to set. * @return the OnlineEndpointTrackedResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public OnlineEndpointTrackedResourceArmPaginatedResult withValue(List list( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, + PagedIterable list(String resourceGroupName, String workspaceName, String name, Integer count, + EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy, Context context); /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -68,7 +62,7 @@ PagedIterable list( /** * Delete Online Endpoint (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -81,7 +75,7 @@ PagedIterable list( /** * Get Online Endpoint. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -91,12 +85,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return online Endpoint along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** * Get Online Endpoint. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -109,7 +103,7 @@ Response getWithResponse( /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -119,12 +113,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return keys for endpoint authentication along with {@link Response}. */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + Response listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -137,7 +131,7 @@ Response listKeysWithResponse( /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -146,12 +140,12 @@ Response listKeysWithResponse( * @throws com.azure.core.management.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 regenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body); + void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateEndpointKeysRequest body); /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -161,16 +155,12 @@ void regenerateKeys( * @throws com.azure.core.management.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 regenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context); + void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + 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 resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param endpointName Online Endpoint name. @@ -180,12 +170,12 @@ void regenerateKeys( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return service Token along with {@link Response}. */ - Response getTokenWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); + 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. * @param endpointName Online Endpoint name. @@ -198,7 +188,7 @@ Response getTokenWithResponse( /** * Get Online Endpoint. - * + * * @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. @@ -209,7 +199,7 @@ Response getTokenWithResponse( /** * Get Online Endpoint. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -221,7 +211,7 @@ Response getTokenWithResponse( /** * Delete Online Endpoint (asynchronous). - * + * * @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. @@ -231,7 +221,7 @@ Response getTokenWithResponse( /** * Delete Online Endpoint (asynchronous). - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -242,7 +232,7 @@ Response getTokenWithResponse( /** * Begins definition for a new OnlineEndpoint resource. - * + * * @param name resource name. * @return the first stage of the new OnlineEndpoint definition. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineInferenceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineInferenceConfiguration.java new file mode 100644 index 0000000000000..2efbe99d39bb9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineInferenceConfiguration.java @@ -0,0 +1,170 @@ +// Copyright (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; + +/** + * Online inference configuration options. + */ +@Fluent +public final class OnlineInferenceConfiguration { + /* + * Additional configurations + */ + @JsonProperty(value = "configurations") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map configurations; + + /* + * Entry script or command to invoke. + */ + @JsonProperty(value = "entryScript") + private String entryScript; + + /* + * The route to check the liveness of the inference server container. + */ + @JsonProperty(value = "livenessRoute") + private Route livenessRoute; + + /* + * The route to check the readiness of the inference server container. + */ + @JsonProperty(value = "readinessRoute") + private Route readinessRoute; + + /* + * The port to send the scoring requests to, within the inference server container. + */ + @JsonProperty(value = "scoringRoute") + private Route scoringRoute; + + /** + * Creates an instance of OnlineInferenceConfiguration class. + */ + public OnlineInferenceConfiguration() { + } + + /** + * Get the configurations property: Additional configurations. + * + * @return the configurations value. + */ + public Map configurations() { + return this.configurations; + } + + /** + * Set the configurations property: Additional configurations. + * + * @param configurations the configurations value to set. + * @return the OnlineInferenceConfiguration object itself. + */ + public OnlineInferenceConfiguration withConfigurations(Map configurations) { + this.configurations = configurations; + return this; + } + + /** + * Get the entryScript property: Entry script or command to invoke. + * + * @return the entryScript value. + */ + public String entryScript() { + return this.entryScript; + } + + /** + * Set the entryScript property: Entry script or command to invoke. + * + * @param entryScript the entryScript value to set. + * @return the OnlineInferenceConfiguration object itself. + */ + public OnlineInferenceConfiguration withEntryScript(String entryScript) { + this.entryScript = entryScript; + return this; + } + + /** + * Get the livenessRoute property: The route to check the liveness of the inference server container. + * + * @return the livenessRoute value. + */ + public Route livenessRoute() { + return this.livenessRoute; + } + + /** + * Set the livenessRoute property: The route to check the liveness of the inference server container. + * + * @param livenessRoute the livenessRoute value to set. + * @return the OnlineInferenceConfiguration object itself. + */ + public OnlineInferenceConfiguration withLivenessRoute(Route livenessRoute) { + this.livenessRoute = livenessRoute; + return this; + } + + /** + * Get the readinessRoute property: The route to check the readiness of the inference server container. + * + * @return the readinessRoute value. + */ + public Route readinessRoute() { + return this.readinessRoute; + } + + /** + * Set the readinessRoute property: The route to check the readiness of the inference server container. + * + * @param readinessRoute the readinessRoute value to set. + * @return the OnlineInferenceConfiguration object itself. + */ + public OnlineInferenceConfiguration withReadinessRoute(Route readinessRoute) { + this.readinessRoute = readinessRoute; + return this; + } + + /** + * Get the scoringRoute property: The port to send the scoring requests to, within the inference server container. + * + * @return the scoringRoute value. + */ + public Route scoringRoute() { + return this.scoringRoute; + } + + /** + * Set the scoringRoute property: The port to send the scoring requests to, within the inference server container. + * + * @param scoringRoute the scoringRoute value to set. + * @return the OnlineInferenceConfiguration object itself. + */ + public OnlineInferenceConfiguration withScoringRoute(Route scoringRoute) { + this.scoringRoute = scoringRoute; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (livenessRoute() != null) { + livenessRoute().validate(); + } + if (readinessRoute() != null) { + readinessRoute().validate(); + } + if (scoringRoute() != null) { + scoringRoute().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java index a6f6c9d9ee8d8..fe2d493e55615 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; -/** Online deployment scoring requests configuration. */ +/** + * Online deployment scoring requests configuration. + */ @Fluent public final class OnlineRequestSettings { /* @@ -31,14 +33,16 @@ public final class OnlineRequestSettings { @JsonProperty(value = "requestTimeout") private Duration requestTimeout; - /** Creates an instance of OnlineRequestSettings class. */ + /** + * Creates an instance of OnlineRequestSettings class. + */ public OnlineRequestSettings() { } /** - * Get the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed per - * deployment. Defaults to 1. - * + * Get the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed + * per deployment. Defaults to 1. + * * @return the maxConcurrentRequestsPerInstance value. */ public Integer maxConcurrentRequestsPerInstance() { @@ -46,9 +50,9 @@ public Integer maxConcurrentRequestsPerInstance() { } /** - * Set the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed per - * deployment. Defaults to 1. - * + * Set the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed + * per deployment. Defaults to 1. + * * @param maxConcurrentRequestsPerInstance the maxConcurrentRequestsPerInstance value to set. * @return the OnlineRequestSettings object itself. */ @@ -60,7 +64,7 @@ public OnlineRequestSettings withMaxConcurrentRequestsPerInstance(Integer maxCon /** * Get the maxQueueWait property: The maximum amount of time a request will stay in the queue in ISO 8601 format. * Defaults to 500ms. - * + * * @return the maxQueueWait value. */ public Duration maxQueueWait() { @@ -70,7 +74,7 @@ public Duration maxQueueWait() { /** * Set the maxQueueWait property: The maximum amount of time a request will stay in the queue in ISO 8601 format. * Defaults to 500ms. - * + * * @param maxQueueWait the maxQueueWait value to set. * @return the OnlineRequestSettings object itself. */ @@ -80,8 +84,9 @@ public OnlineRequestSettings withMaxQueueWait(Duration maxQueueWait) { } /** - * Get the requestTimeout property: The scoring timeout in ISO 8601 format. Defaults to 5000ms. - * + * Get the requestTimeout property: The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + * * @return the requestTimeout value. */ public Duration requestTimeout() { @@ -89,8 +94,9 @@ public Duration requestTimeout() { } /** - * Set the requestTimeout property: The scoring timeout in ISO 8601 format. Defaults to 5000ms. - * + * Set the requestTimeout property: The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + * * @param requestTimeout the requestTimeout value to set. * @return the OnlineRequestSettings object itself. */ @@ -101,7 +107,7 @@ public OnlineRequestSettings withRequestTimeout(Duration requestTimeout) { /** * 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/OnlineScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java index e8acef5593209..0771b4827fc9b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Online deployment scaling configuration. */ +/** + * Online deployment scaling configuration. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,17 +20,18 @@ @JsonTypeName("OnlineScaleSettings") @JsonSubTypes({ @JsonSubTypes.Type(name = "Default", value = DefaultScaleSettings.class), - @JsonSubTypes.Type(name = "TargetUtilization", value = TargetUtilizationScaleSettings.class) -}) + @JsonSubTypes.Type(name = "TargetUtilization", value = TargetUtilizationScaleSettings.class) }) @Immutable public class OnlineScaleSettings { - /** Creates an instance of OnlineScaleSettings class. */ + /** + * Creates an instance of OnlineScaleSettings class. + */ public OnlineScaleSettings() { } /** * 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/OpenAIEndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java new file mode 100644 index 0000000000000..8ce36f420d310 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The OpenAIEndpointDeploymentResourceProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Azure.OpenAI") +@Fluent +public final class OpenAIEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Model used for the endpoint deployment. + */ + @JsonProperty(value = "model", required = true) + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + @JsonProperty(value = "raiPolicyName") + private String raiPolicyName; + + /* + * The sku property. + */ + @JsonProperty(value = "sku") + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + @JsonProperty(value = "versionUpgradeOption") + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of OpenAIEndpointDeploymentResourceProperties class. + */ + public OpenAIEndpointDeploymentResourceProperties() { + } + + /** + * Get the model property: Model used for the endpoint deployment. + * + * @return the model value. + */ + public EndpointDeploymentModel model() { + return this.model; + } + + /** + * Set the model property: Model used for the endpoint deployment. + * + * @param model the model value to set. + * @return the OpenAIEndpointDeploymentResourceProperties object itself. + */ + public OpenAIEndpointDeploymentResourceProperties withModel(EndpointDeploymentModel model) { + this.model = model; + return this; + } + + /** + * Get the raiPolicyName property: The name of RAI policy. + * + * @return the raiPolicyName value. + */ + public String raiPolicyName() { + return this.raiPolicyName; + } + + /** + * Set the raiPolicyName property: The name of RAI policy. + * + * @param raiPolicyName the raiPolicyName value to set. + * @return the OpenAIEndpointDeploymentResourceProperties object itself. + */ + public OpenAIEndpointDeploymentResourceProperties withRaiPolicyName(String raiPolicyName) { + this.raiPolicyName = raiPolicyName; + return this; + } + + /** + * Get the sku property: The sku property. + * + * @return the sku value. + */ + public CognitiveServicesSku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku property. + * + * @param sku the sku value to set. + * @return the OpenAIEndpointDeploymentResourceProperties object itself. + */ + public OpenAIEndpointDeploymentResourceProperties withSku(CognitiveServicesSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the versionUpgradeOption property: Deployment model version upgrade option. + * + * @return the versionUpgradeOption value. + */ + public DeploymentModelVersionUpgradeOption versionUpgradeOption() { + return this.versionUpgradeOption; + } + + /** + * Set the versionUpgradeOption property: Deployment model version upgrade option. + * + * @param versionUpgradeOption the versionUpgradeOption value to set. + * @return the OpenAIEndpointDeploymentResourceProperties object itself. + */ + public OpenAIEndpointDeploymentResourceProperties + withVersionUpgradeOption(DeploymentModelVersionUpgradeOption versionUpgradeOption) { + this.versionUpgradeOption = versionUpgradeOption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointDeploymentResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (model() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property model in model OpenAIEndpointDeploymentResourceProperties")); + } else { + model().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OpenAIEndpointDeploymentResourceProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java new file mode 100644 index 0000000000000..4f629af0e2e76 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java @@ -0,0 +1,69 @@ +// Copyright (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; + +/** + * The OpenAIEndpointResourceProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("Azure.OpenAI") +@Fluent +public final class OpenAIEndpointResourceProperties extends EndpointResourceProperties { + /** + * Creates an instance of OpenAIEndpointResourceProperties class. + */ + public OpenAIEndpointResourceProperties() { + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withName(String name) { + super.withName(name); + 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/OperatingSystemType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java index f976eb401acb4..1bc748f30b1dc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of operating system. */ +/** + * The type of operating system. + */ public final class OperatingSystemType extends ExpandableStringEnum { - /** Static value Linux for OperatingSystemType. */ + /** + * Static value Linux for OperatingSystemType. + */ public static final OperatingSystemType LINUX = fromString("Linux"); - /** Static value Windows for OperatingSystemType. */ + /** + * Static value Windows for OperatingSystemType. + */ public static final OperatingSystemType WINDOWS = fromString("Windows"); /** * Creates a new instance of OperatingSystemType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public OperatingSystemType() { /** * Creates or finds a OperatingSystemType from its string representation. - * + * * @param name a name to look for. * @return the corresponding OperatingSystemType. */ @@ -38,7 +44,7 @@ public static OperatingSystemType fromString(String name) { /** * Gets known OperatingSystemType values. - * + * * @return known OperatingSystemType values. */ public static Collection values() { 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..adf592c09634a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.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.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..7e7ef5ab4b870 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java @@ -0,0 +1,95 @@ +// Copyright (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..a378e3296f348 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java @@ -0,0 +1,64 @@ +// Copyright (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/OperationName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java index 1b428d2aeefde..f543530be8973 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java @@ -8,29 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Name of the last operation. */ +/** + * Name of the last operation. + */ public final class OperationName extends ExpandableStringEnum { - /** Static value Create for OperationName. */ + /** + * Static value Create for OperationName. + */ public static final OperationName CREATE = fromString("Create"); - /** Static value Start for OperationName. */ + /** + * Static value Start for OperationName. + */ public static final OperationName START = fromString("Start"); - /** Static value Stop for OperationName. */ + /** + * Static value Stop for OperationName. + */ public static final OperationName STOP = fromString("Stop"); - /** Static value Restart for OperationName. */ + /** + * Static value Restart for OperationName. + */ public static final OperationName RESTART = fromString("Restart"); - /** Static value Reimage for OperationName. */ + /** + * Static value Resize for OperationName. + */ + public static final OperationName RESIZE = fromString("Resize"); + + /** + * Static value Reimage for OperationName. + */ public static final OperationName REIMAGE = fromString("Reimage"); - /** Static value Delete for OperationName. */ + /** + * Static value Delete for OperationName. + */ public static final OperationName DELETE = fromString("Delete"); /** * Creates a new instance of OperationName value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +58,7 @@ public OperationName() { /** * Creates or finds a OperationName from its string representation. - * + * * @param name a name to look for. * @return the corresponding OperationName. */ @@ -50,7 +69,7 @@ public static OperationName fromString(String name) { /** * Gets known OperationName values. - * + * * @return known OperationName values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java index af28ce807caaf..146fb2321398f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java @@ -8,35 +8,58 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Operation status. */ +/** + * Operation status. + */ public final class OperationStatus extends ExpandableStringEnum { - /** Static value InProgress for OperationStatus. */ + /** + * Static value InProgress for OperationStatus. + */ public static final OperationStatus IN_PROGRESS = fromString("InProgress"); - /** Static value Succeeded for OperationStatus. */ + /** + * Static value Succeeded for OperationStatus. + */ public static final OperationStatus SUCCEEDED = fromString("Succeeded"); - /** Static value CreateFailed for OperationStatus. */ + /** + * Static value CreateFailed for OperationStatus. + */ public static final OperationStatus CREATE_FAILED = fromString("CreateFailed"); - /** Static value StartFailed for OperationStatus. */ + /** + * Static value StartFailed for OperationStatus. + */ public static final OperationStatus START_FAILED = fromString("StartFailed"); - /** Static value StopFailed for OperationStatus. */ + /** + * Static value StopFailed for OperationStatus. + */ public static final OperationStatus STOP_FAILED = fromString("StopFailed"); - /** Static value RestartFailed for OperationStatus. */ + /** + * Static value RestartFailed for OperationStatus. + */ public static final OperationStatus RESTART_FAILED = fromString("RestartFailed"); - /** Static value ReimageFailed for OperationStatus. */ + /** + * Static value ResizeFailed for OperationStatus. + */ + public static final OperationStatus RESIZE_FAILED = fromString("ResizeFailed"); + + /** + * Static value ReimageFailed for OperationStatus. + */ public static final OperationStatus REIMAGE_FAILED = fromString("ReimageFailed"); - /** Static value DeleteFailed for OperationStatus. */ + /** + * Static value DeleteFailed for OperationStatus. + */ public static final OperationStatus DELETE_FAILED = fromString("DeleteFailed"); /** * Creates a new instance of OperationStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +68,7 @@ public OperationStatus() { /** * Creates or finds a OperationStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding OperationStatus. */ @@ -56,7 +79,7 @@ public static OperationStatus fromString(String name) { /** * Gets known OperationStatus values. - * + * * @return known OperationStatus values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java index f4ea809c45426..858695450d79c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Trigger of operation. */ +/** + * Trigger of operation. + */ public final class OperationTrigger extends ExpandableStringEnum { - /** Static value User for OperationTrigger. */ + /** + * Static value User for OperationTrigger. + */ public static final OperationTrigger USER = fromString("User"); - /** Static value Schedule for OperationTrigger. */ + /** + * Static value Schedule for OperationTrigger. + */ public static final OperationTrigger SCHEDULE = fromString("Schedule"); - /** Static value IdleShutdown for OperationTrigger. */ + /** + * Static value IdleShutdown for OperationTrigger. + */ public static final OperationTrigger IDLE_SHUTDOWN = fromString("IdleShutdown"); /** * Creates a new instance of OperationTrigger value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public OperationTrigger() { /** * Creates or finds a OperationTrigger from its string representation. - * + * * @param name a name to look for. * @return the corresponding OperationTrigger. */ @@ -41,7 +49,7 @@ public static OperationTrigger fromString(String name) { /** * Gets known OperationTrigger values. - * + * * @return known OperationTrigger values. */ public static Collection values() { 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..adf5d02799a06 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 @@ -7,27 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Lists all of the available Azure Machine Learning Workspaces REST API 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 - * PagedIterable}. + * @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. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 - * PagedIterable}. + * @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/OrderString.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java index 5bf732b45abf5..99ebfa565f506 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OrderString. */ +/** + * Defines values for OrderString. + */ public final class OrderString extends ExpandableStringEnum { - /** Static value CreatedAtDesc for OrderString. */ + /** + * Static value CreatedAtDesc for OrderString. + */ public static final OrderString CREATED_AT_DESC = fromString("CreatedAtDesc"); - /** Static value CreatedAtAsc for OrderString. */ + /** + * Static value CreatedAtAsc for OrderString. + */ public static final OrderString CREATED_AT_ASC = fromString("CreatedAtAsc"); - /** Static value UpdatedAtDesc for OrderString. */ + /** + * Static value UpdatedAtDesc for OrderString. + */ public static final OrderString UPDATED_AT_DESC = fromString("UpdatedAtDesc"); - /** Static value UpdatedAtAsc for OrderString. */ + /** + * Static value UpdatedAtAsc for OrderString. + */ public static final OrderString UPDATED_AT_ASC = fromString("UpdatedAtAsc"); /** * Creates a new instance of OrderString value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public OrderString() { /** * Creates or finds a OrderString from its string representation. - * + * * @param name a name to look for. * @return the corresponding OrderString. */ @@ -44,7 +54,7 @@ public static OrderString fromString(String name) { /** * Gets known OrderString values. - * + * * @return known OrderString values. */ public static Collection values() { 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..192940ea03802 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.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; + +/** + * 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/OsPatchingStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.java new file mode 100644 index 0000000000000..3fcd0ebb4464f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.java @@ -0,0 +1,134 @@ +// Copyright (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 os patching. + */ +@Fluent +public final class OsPatchingStatus { + /* + * The os patching status. + */ + @JsonProperty(value = "patchStatus") + private PatchStatus patchStatus; + + /* + * Time of the latest os patching. + */ + @JsonProperty(value = "latestPatchTime") + private String latestPatchTime; + + /* + * Specifies whether this compute instance is pending for reboot to finish os patching. + */ + @JsonProperty(value = "rebootPending") + private Boolean rebootPending; + + /* + * Time of scheduled reboot. + */ + @JsonProperty(value = "scheduledRebootTime") + private String scheduledRebootTime; + + /** + * Creates an instance of OsPatchingStatus class. + */ + public OsPatchingStatus() { + } + + /** + * Get the patchStatus property: The os patching status. + * + * @return the patchStatus value. + */ + public PatchStatus patchStatus() { + return this.patchStatus; + } + + /** + * Set the patchStatus property: The os patching status. + * + * @param patchStatus the patchStatus value to set. + * @return the OsPatchingStatus object itself. + */ + public OsPatchingStatus withPatchStatus(PatchStatus patchStatus) { + this.patchStatus = patchStatus; + return this; + } + + /** + * Get the latestPatchTime property: Time of the latest os patching. + * + * @return the latestPatchTime value. + */ + public String latestPatchTime() { + return this.latestPatchTime; + } + + /** + * Set the latestPatchTime property: Time of the latest os patching. + * + * @param latestPatchTime the latestPatchTime value to set. + * @return the OsPatchingStatus object itself. + */ + public OsPatchingStatus withLatestPatchTime(String latestPatchTime) { + this.latestPatchTime = latestPatchTime; + return this; + } + + /** + * Get the rebootPending property: Specifies whether this compute instance is pending for reboot to finish os + * patching. + * + * @return the rebootPending value. + */ + public Boolean rebootPending() { + return this.rebootPending; + } + + /** + * Set the rebootPending property: Specifies whether this compute instance is pending for reboot to finish os + * patching. + * + * @param rebootPending the rebootPending value to set. + * @return the OsPatchingStatus object itself. + */ + public OsPatchingStatus withRebootPending(Boolean rebootPending) { + this.rebootPending = rebootPending; + return this; + } + + /** + * Get the scheduledRebootTime property: Time of scheduled reboot. + * + * @return the scheduledRebootTime value. + */ + public String scheduledRebootTime() { + return this.scheduledRebootTime; + } + + /** + * Set the scheduledRebootTime property: Time of scheduled reboot. + * + * @param scheduledRebootTime the scheduledRebootTime value to set. + * @return the OsPatchingStatus object itself. + */ + public OsPatchingStatus withScheduledRebootTime(String scheduledRebootTime) { + this.scheduledRebootTime = scheduledRebootTime; + 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/OsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java index bbb3fd3a428db..5dc15b7ac1d19 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Compute OS Type. */ +/** + * Compute OS Type. + */ public final class OsType extends ExpandableStringEnum { - /** Static value Linux for OsType. */ + /** + * Static value Linux for OsType. + */ public static final OsType LINUX = fromString("Linux"); - /** Static value Windows for OsType. */ + /** + * Static value Windows for OsType. + */ public static final OsType WINDOWS = fromString("Windows"); /** * Creates a new instance of OsType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public OsType() { /** * Creates or finds a OsType from its string representation. - * + * * @param name a name to look for. * @return the corresponding OsType. */ @@ -38,7 +44,7 @@ public static OsType fromString(String name) { /** * Gets known OsType values. - * + * * @return known OsType values. */ public static Collection values() { diff --git a/sdk/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..af7daa3783b2b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.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.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 = "FQDN", value = FqdnOutboundRule.class), + @JsonSubTypes.Type(name = "PrivateEndpoint", value = PrivateEndpointOutboundRule.class), + @JsonSubTypes.Type(name = "ServiceTag", value = ServiceTagOutboundRule.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..8eabdf17ff3bc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.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.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 Azure Machine Learning Workspace Name. + * @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..fd5db5fd59390 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.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.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/OutputDeliveryMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java index dc75b9e54bee0..fccf22e5f4a64 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java @@ -8,17 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Output data delivery mode enums. */ +/** + * Output data delivery mode enums. + */ public final class OutputDeliveryMode extends ExpandableStringEnum { - /** Static value ReadWriteMount for OutputDeliveryMode. */ + /** + * Static value ReadWriteMount for OutputDeliveryMode. + */ public static final OutputDeliveryMode READ_WRITE_MOUNT = fromString("ReadWriteMount"); - /** Static value Upload for OutputDeliveryMode. */ + /** + * Static value Upload for OutputDeliveryMode. + */ public static final OutputDeliveryMode UPLOAD = fromString("Upload"); + /** + * Static value Direct for OutputDeliveryMode. + */ + public static final OutputDeliveryMode DIRECT = fromString("Direct"); + /** * Creates a new instance of OutputDeliveryMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +38,7 @@ public OutputDeliveryMode() { /** * Creates or finds a OutputDeliveryMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding OutputDeliveryMode. */ @@ -38,7 +49,7 @@ public static OutputDeliveryMode fromString(String name) { /** * Gets known OutputDeliveryMode values. - * + * * @return known OutputDeliveryMode values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java index c265ff06432d5..b000fc827130f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Reference to an asset via its path in a job output. */ +/** + * Reference to an asset via its path in a job output. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") @JsonTypeName("OutputPath") @Fluent @@ -26,13 +28,15 @@ public final class OutputPathAssetReference extends AssetReferenceBase { @JsonProperty(value = "path") private String path; - /** Creates an instance of OutputPathAssetReference class. */ + /** + * Creates an instance of OutputPathAssetReference class. + */ public OutputPathAssetReference() { } /** * Get the jobId property: ARM resource ID of the job. - * + * * @return the jobId value. */ public String jobId() { @@ -41,7 +45,7 @@ public String jobId() { /** * Set the jobId property: ARM resource ID of the job. - * + * * @param jobId the jobId value to set. * @return the OutputPathAssetReference object itself. */ @@ -52,7 +56,7 @@ public OutputPathAssetReference withJobId(String jobId) { /** * Get the path property: The path of the file/directory in the job output. - * + * * @return the path value. */ public String path() { @@ -61,7 +65,7 @@ public String path() { /** * Set the path property: The path of the file/directory in the job output. - * + * * @param path the path value to set. * @return the OutputPathAssetReference object itself. */ @@ -72,7 +76,7 @@ public OutputPathAssetReference withPath(String path) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageBuildState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageBuildState.java new file mode 100644 index 0000000000000..6535105dc2d17 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageBuildState.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Package build state returned in package response. + */ +public final class PackageBuildState extends ExpandableStringEnum { + /** + * Static value NotStarted for PackageBuildState. + */ + public static final PackageBuildState NOT_STARTED = fromString("NotStarted"); + + /** + * Static value Running for PackageBuildState. + */ + public static final PackageBuildState RUNNING = fromString("Running"); + + /** + * Static value Succeeded for PackageBuildState. + */ + public static final PackageBuildState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for PackageBuildState. + */ + public static final PackageBuildState FAILED = fromString("Failed"); + + /** + * Creates a new instance of PackageBuildState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PackageBuildState() { + } + + /** + * Creates or finds a PackageBuildState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PackageBuildState. + */ + @JsonCreator + public static PackageBuildState fromString(String name) { + return fromString(name, PackageBuildState.class); + } + + /** + * Gets known PackageBuildState values. + * + * @return known PackageBuildState values. + */ + public static Collection values() { + return values(PackageBuildState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputDeliveryMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputDeliveryMode.java new file mode 100644 index 0000000000000..ce1464c54dedb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputDeliveryMode.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; + +/** + * Mounting type of the model or the inputs. + */ +public final class PackageInputDeliveryMode extends ExpandableStringEnum { + /** + * Static value Copy for PackageInputDeliveryMode. + */ + public static final PackageInputDeliveryMode COPY = fromString("Copy"); + + /** + * Static value Download for PackageInputDeliveryMode. + */ + public static final PackageInputDeliveryMode DOWNLOAD = fromString("Download"); + + /** + * Creates a new instance of PackageInputDeliveryMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PackageInputDeliveryMode() { + } + + /** + * Creates or finds a PackageInputDeliveryMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding PackageInputDeliveryMode. + */ + @JsonCreator + public static PackageInputDeliveryMode fromString(String name) { + return fromString(name, PackageInputDeliveryMode.class); + } + + /** + * Gets known PackageInputDeliveryMode values. + * + * @return known PackageInputDeliveryMode values. + */ + public static Collection values() { + return values(PackageInputDeliveryMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathBase.java new file mode 100644 index 0000000000000..9b71f04ef4d6b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathBase.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.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 PackageInputPathBase model. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "inputPathType", + defaultImpl = PackageInputPathBase.class) +@JsonTypeName("PackageInputPathBase") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "PathId", value = PackageInputPathId.class), + @JsonSubTypes.Type(name = "Url", value = PackageInputPathUrl.class), + @JsonSubTypes.Type(name = "PathVersion", value = PackageInputPathVersion.class) }) +@Immutable +public class PackageInputPathBase { + /** + * Creates an instance of PackageInputPathBase class. + */ + public PackageInputPathBase() { + } + + /** + * 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/PackageInputPathId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathId.java new file mode 100644 index 0000000000000..4f006be36c46d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathId.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.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Package input path specified with a resource id. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputPathType") +@JsonTypeName("PathId") +@Fluent +public final class PackageInputPathId extends PackageInputPathBase { + /* + * Input resource id. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /** + * Creates an instance of PackageInputPathId class. + */ + public PackageInputPathId() { + } + + /** + * Get the resourceId property: Input resource id. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Input resource id. + * + * @param resourceId the resourceId value to set. + * @return the PackageInputPathId object itself. + */ + public PackageInputPathId withResourceId(String resourceId) { + this.resourceId = resourceId; + 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/PackageInputPathUrl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathUrl.java new file mode 100644 index 0000000000000..28e68474f3283 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathUrl.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.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Package input path specified as an url. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputPathType") +@JsonTypeName("Url") +@Fluent +public final class PackageInputPathUrl extends PackageInputPathBase { + /* + * Input path url. + */ + @JsonProperty(value = "url") + private String url; + + /** + * Creates an instance of PackageInputPathUrl class. + */ + public PackageInputPathUrl() { + } + + /** + * Get the url property: Input path url. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: Input path url. + * + * @param url the url value to set. + * @return the PackageInputPathUrl object itself. + */ + public PackageInputPathUrl withUrl(String url) { + this.url = url; + 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/PackageInputPathVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathVersion.java new file mode 100644 index 0000000000000..c4b505d90650f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputPathVersion.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.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Package input path specified with name and version. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "inputPathType") +@JsonTypeName("PathVersion") +@Fluent +public final class PackageInputPathVersion extends PackageInputPathBase { + /* + * Input resource name. + */ + @JsonProperty(value = "resourceName") + private String resourceName; + + /* + * Input resource version. + */ + @JsonProperty(value = "resourceVersion") + private String resourceVersion; + + /** + * Creates an instance of PackageInputPathVersion class. + */ + public PackageInputPathVersion() { + } + + /** + * Get the resourceName property: Input resource name. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Set the resourceName property: Input resource name. + * + * @param resourceName the resourceName value to set. + * @return the PackageInputPathVersion object itself. + */ + public PackageInputPathVersion withResourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * Get the resourceVersion property: Input resource version. + * + * @return the resourceVersion value. + */ + public String resourceVersion() { + return this.resourceVersion; + } + + /** + * Set the resourceVersion property: Input resource version. + * + * @param resourceVersion the resourceVersion value to set. + * @return the PackageInputPathVersion object itself. + */ + public PackageInputPathVersion withResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + 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/PackageInputType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputType.java new file mode 100644 index 0000000000000..2aae152d16db8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageInputType.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; + +/** + * Type of the inputs. + */ +public final class PackageInputType extends ExpandableStringEnum { + /** + * Static value UriFile for PackageInputType. + */ + public static final PackageInputType URI_FILE = fromString("UriFile"); + + /** + * Static value UriFolder for PackageInputType. + */ + public static final PackageInputType URI_FOLDER = fromString("UriFolder"); + + /** + * Creates a new instance of PackageInputType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PackageInputType() { + } + + /** + * Creates or finds a PackageInputType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PackageInputType. + */ + @JsonCreator + public static PackageInputType fromString(String name) { + return fromString(name, PackageInputType.class); + } + + /** + * Gets known PackageInputType values. + * + * @return known PackageInputType values. + */ + public static Collection values() { + return values(PackageInputType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageRequest.java new file mode 100644 index 0000000000000..eeffc95efdd7a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageRequest.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.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.List; +import java.util.Map; + +/** + * Model package operation request properties. + */ +@Fluent +public final class PackageRequest { + /* + * Base environment to start with. + */ + @JsonProperty(value = "baseEnvironmentSource") + private BaseEnvironmentSource baseEnvironmentSource; + + /* + * Collection of environment variables. + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * [Required] Inferencing server configurations. + */ + @JsonProperty(value = "inferencingServer", required = true) + private InferencingServer inferencingServer; + + /* + * Collection of inputs. + */ + @JsonProperty(value = "inputs") + private List inputs; + + /* + * Model configuration including the mount mode. + */ + @JsonProperty(value = "modelConfiguration") + private ModelConfiguration modelConfiguration; + + /* + * Property dictionary. Properties can be added, removed, and updated. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /* + * Tag dictionary. Tags can be added, removed, and updated. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * [Required] Arm ID of the target environment to be created by package operation. + */ + @JsonProperty(value = "targetEnvironmentId", required = true) + private String targetEnvironmentId; + + /** + * Creates an instance of PackageRequest class. + */ + public PackageRequest() { + } + + /** + * Get the baseEnvironmentSource property: Base environment to start with. + * + * @return the baseEnvironmentSource value. + */ + public BaseEnvironmentSource baseEnvironmentSource() { + return this.baseEnvironmentSource; + } + + /** + * Set the baseEnvironmentSource property: Base environment to start with. + * + * @param baseEnvironmentSource the baseEnvironmentSource value to set. + * @return the PackageRequest object itself. + */ + public PackageRequest withBaseEnvironmentSource(BaseEnvironmentSource baseEnvironmentSource) { + this.baseEnvironmentSource = baseEnvironmentSource; + return this; + } + + /** + * Get the environmentVariables property: Collection of environment variables. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Collection of environment variables. + * + * @param environmentVariables the environmentVariables value to set. + * @return the PackageRequest object itself. + */ + public PackageRequest withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the inferencingServer property: [Required] Inferencing server configurations. + * + * @return the inferencingServer value. + */ + public InferencingServer inferencingServer() { + return this.inferencingServer; + } + + /** + * Set the inferencingServer property: [Required] Inferencing server configurations. + * + * @param inferencingServer the inferencingServer value to set. + * @return the PackageRequest object itself. + */ + public PackageRequest withInferencingServer(InferencingServer inferencingServer) { + this.inferencingServer = inferencingServer; + return this; + } + + /** + * Get the inputs property: Collection of inputs. + * + * @return the inputs value. + */ + public List inputs() { + return this.inputs; + } + + /** + * Set the inputs property: Collection of inputs. + * + * @param inputs the inputs value to set. + * @return the PackageRequest object itself. + */ + public PackageRequest withInputs(List inputs) { + this.inputs = inputs; + return this; + } + + /** + * Get the modelConfiguration property: Model configuration including the mount mode. + * + * @return the modelConfiguration value. + */ + public ModelConfiguration modelConfiguration() { + return this.modelConfiguration; + } + + /** + * Set the modelConfiguration property: Model configuration including the mount mode. + * + * @param modelConfiguration the modelConfiguration value to set. + * @return the PackageRequest object itself. + */ + public PackageRequest withModelConfiguration(ModelConfiguration modelConfiguration) { + this.modelConfiguration = modelConfiguration; + return this; + } + + /** + * Get the properties property: Property dictionary. Properties can be added, removed, and updated. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: Property dictionary. Properties can be added, removed, and updated. + * + * @param properties the properties value to set. + * @return the PackageRequest object itself. + */ + public PackageRequest withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the tags property: Tag dictionary. Tags can be added, removed, and updated. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Tag dictionary. Tags can be added, removed, and updated. + * + * @param tags the tags value to set. + * @return the PackageRequest object itself. + */ + public PackageRequest withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the targetEnvironmentId property: [Required] Arm ID of the target environment to be created by package + * operation. + * + * @return the targetEnvironmentId value. + */ + public String targetEnvironmentId() { + return this.targetEnvironmentId; + } + + /** + * Set the targetEnvironmentId property: [Required] Arm ID of the target environment to be created by package + * operation. + * + * @param targetEnvironmentId the targetEnvironmentId value to set. + * @return the PackageRequest object itself. + */ + public PackageRequest withTargetEnvironmentId(String targetEnvironmentId) { + this.targetEnvironmentId = targetEnvironmentId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (baseEnvironmentSource() != null) { + baseEnvironmentSource().validate(); + } + if (inferencingServer() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property inferencingServer in model PackageRequest")); + } else { + inferencingServer().validate(); + } + if (inputs() != null) { + inputs().forEach(e -> e.validate()); + } + if (modelConfiguration() != null) { + modelConfiguration().validate(); + } + if (targetEnvironmentId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property targetEnvironmentId in model PackageRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PackageRequest.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageResponse.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageResponse.java new file mode 100644 index 0000000000000..e4e112a457a38 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageResponse.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.PackageResponseInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of PackageResponse. + */ +public interface PackageResponse { + /** + * Gets the baseEnvironmentSource property: Base environment to start with. + * + * @return the baseEnvironmentSource value. + */ + BaseEnvironmentSource baseEnvironmentSource(); + + /** + * Gets the buildId property: Build id of the image build operation. + * + * @return the buildId value. + */ + String buildId(); + + /** + * Gets the buildState property: Build state of the image build operation. + * + * @return the buildState value. + */ + PackageBuildState buildState(); + + /** + * Gets the environmentVariables property: Collection of environment variables. + * + * @return the environmentVariables value. + */ + Map environmentVariables(); + + /** + * Gets the inferencingServer property: Inferencing server configurations. + * + * @return the inferencingServer value. + */ + InferencingServer inferencingServer(); + + /** + * Gets the inputs property: Collection of inputs. + * + * @return the inputs value. + */ + List inputs(); + + /** + * Gets the logUrl property: Log url of the image build operation. + * + * @return the logUrl value. + */ + String logUrl(); + + /** + * Gets the modelConfiguration property: Model configuration including the mount mode. + * + * @return the modelConfiguration value. + */ + ModelConfiguration modelConfiguration(); + + /** + * Gets the properties property: Property dictionary. Tags can be added, removed, and updated. + * + * @return the properties value. + */ + Map properties(); + + /** + * Gets the tags property: Tag dictionary. Tags can be added, removed, and updated. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the targetEnvironmentId property: Asset ID of the target environment created by package operation. + * + * @return the targetEnvironmentId value. + */ + String targetEnvironmentId(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PackageResponseInner object. + * + * @return the inner object. + */ + PackageResponseInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java index 00d74767a9e8f..0ee41dd3ab620 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. */ +/** + * Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. + */ @Fluent public final class PaginatedComputeResourcesList { /* @@ -24,13 +26,15 @@ public final class PaginatedComputeResourcesList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of PaginatedComputeResourcesList class. */ + /** + * Creates an instance of PaginatedComputeResourcesList class. + */ public PaginatedComputeResourcesList() { } /** * Get the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * + * * @param value the value value to set. * @return the PaginatedComputeResourcesList object itself. */ @@ -50,7 +54,7 @@ public PaginatedComputeResourcesList withValue(List value) /** * Get the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Set the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * + * * @param nextLink the nextLink value to set. * @return the PaginatedComputeResourcesList object itself. */ @@ -70,7 +74,7 @@ public PaginatedComputeResourcesList withNextLink(String nextLink) { /** * 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/PartialBatchDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java index 0be11f6793e1f..30df2e03c2c03 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Mutable batch inference settings per deployment. */ +/** + * Mutable batch inference settings per deployment. + */ @Fluent public final class PartialBatchDeployment { /* @@ -16,13 +18,15 @@ public final class PartialBatchDeployment { @JsonProperty(value = "description") private String description; - /** Creates an instance of PartialBatchDeployment class. */ + /** + * Creates an instance of PartialBatchDeployment class. + */ public PartialBatchDeployment() { } /** * Get the description property: Description of the endpoint deployment. - * + * * @return the description value. */ public String description() { @@ -31,7 +35,7 @@ public String description() { /** * Set the description property: Description of the endpoint deployment. - * + * * @param description the description value to set. * @return the PartialBatchDeployment object itself. */ @@ -42,7 +46,7 @@ public PartialBatchDeployment withDescription(String 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/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java index aaef569773303..a696d525e0413 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Strictly used in update requests. */ +/** + * Strictly used in update requests. + */ @Fluent public final class PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { /* @@ -25,13 +27,15 @@ public final class PartialBatchDeploymentPartialMinimalTrackedResourceWithProper @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties class. */ + /** + * Creates an instance of PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties class. + */ public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties() { } /** * Get the properties property: Additional attributes of the entity. - * + * * @return the properties value. */ public PartialBatchDeployment properties() { @@ -40,19 +44,19 @@ public PartialBatchDeployment properties() { /** * Set the properties property: Additional attributes of the entity. - * + * * @param properties the properties value to set. * @return the PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties object itself. */ - public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties withProperties( - PartialBatchDeployment properties) { + public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties + withProperties(PartialBatchDeployment properties) { this.properties = properties; return this; } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -61,7 +65,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties object itself. */ @@ -72,7 +76,7 @@ public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties withTag /** * 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/PartialJobBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialJobBase.java new file mode 100644 index 0000000000000..60660a8e17678 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialJobBase.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Mutable base definition for a job. + */ +@Fluent +public final class PartialJobBase { + /* + * Mutable notification setting for the job + */ + @JsonProperty(value = "notificationSetting") + private PartialNotificationSetting notificationSetting; + + /** + * Creates an instance of PartialJobBase class. + */ + public PartialJobBase() { + } + + /** + * Get the notificationSetting property: Mutable notification setting for the job. + * + * @return the notificationSetting value. + */ + public PartialNotificationSetting notificationSetting() { + return this.notificationSetting; + } + + /** + * Set the notificationSetting property: Mutable notification setting for the job. + * + * @param notificationSetting the notificationSetting value to set. + * @return the PartialJobBase object itself. + */ + public PartialJobBase withNotificationSetting(PartialNotificationSetting notificationSetting) { + this.notificationSetting = notificationSetting; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (notificationSetting() != null) { + notificationSetting().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialJobBasePartialResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialJobBasePartialResource.java new file mode 100644 index 0000000000000..25f5b5501abae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialJobBasePartialResource.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Azure Resource Manager resource envelope strictly used in update requests. + */ +@Fluent +public final class PartialJobBasePartialResource { + /* + * Additional attributes of the entity. + */ + @JsonProperty(value = "properties") + private PartialJobBase properties; + + /** + * Creates an instance of PartialJobBasePartialResource class. + */ + public PartialJobBasePartialResource() { + } + + /** + * Get the properties property: Additional attributes of the entity. + * + * @return the properties value. + */ + public PartialJobBase properties() { + return this.properties; + } + + /** + * Set the properties property: Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the PartialJobBasePartialResource object itself. + */ + public PartialJobBasePartialResource withProperties(PartialJobBase properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} 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..8c276a90f3dac 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 @@ -9,9 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Managed service identity (system assigned and/or user assigned identities). */ +/** + * 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) */ @@ -21,20 +23,23 @@ public class PartialManagedServiceIdentity { /* * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; - /** Creates an instance of PartialManagedServiceIdentity class. */ + /** + * Creates an instance of PartialManagedServiceIdentity class. + */ public PartialManagedServiceIdentity() { } /** * Get the type property: Managed service identity (system assigned and/or user assigned identities). - * + * * @return the type value. */ public ManagedServiceIdentityType type() { @@ -43,7 +48,7 @@ public ManagedServiceIdentityType type() { /** * Set the type property: Managed service identity (system assigned and/or user assigned identities). - * + * * @param type the type value to set. * @return the PartialManagedServiceIdentity object itself. */ @@ -57,7 +62,7 @@ public PartialManagedServiceIdentity withType(ManagedServiceIdentityType type) { * userAssignedIdentities dictionary keys will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -69,7 +74,7 @@ public Map userAssignedIdentities() { * userAssignedIdentities dictionary keys will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the PartialManagedServiceIdentity object itself. */ @@ -80,7 +85,7 @@ public PartialManagedServiceIdentity withUserAssignedIdentities(Map tags; - /** Creates an instance of PartialMinimalTrackedResource class. */ + /** + * Creates an instance of PartialMinimalTrackedResource class. + */ public PartialMinimalTrackedResource() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the PartialMinimalTrackedResource object itself. */ @@ -45,7 +49,7 @@ public PartialMinimalTrackedResource withTags(Map tags) { /** * 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/PartialMinimalTrackedResourceWithIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java index 7187063fa6cc7..ca8250ddcf4e2 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 @@ -8,22 +8,26 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Strictly used in update requests. */ +/** + * 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) */ @JsonProperty(value = "identity") private PartialManagedServiceIdentity identity; - /** Creates an instance of PartialMinimalTrackedResourceWithIdentity class. */ + /** + * Creates an instance of PartialMinimalTrackedResourceWithIdentity class. + */ public PartialMinimalTrackedResourceWithIdentity() { } /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @return the identity value. */ public PartialManagedServiceIdentity identity() { @@ -32,7 +36,7 @@ public PartialManagedServiceIdentity identity() { /** * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * + * * @param identity the identity value to set. * @return the PartialMinimalTrackedResourceWithIdentity object itself. */ @@ -41,7 +45,9 @@ public PartialMinimalTrackedResourceWithIdentity withIdentity(PartialManagedServ return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PartialMinimalTrackedResourceWithIdentity withTags(Map tags) { super.withTags(tags); @@ -50,7 +56,7 @@ public PartialMinimalTrackedResourceWithIdentity withTags(Map ta /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java index fd014366f4110..8227d3a59411a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Strictly used in update requests. */ +/** + * Strictly used in update requests. + */ @Fluent public final class PartialMinimalTrackedResourceWithSku extends PartialMinimalTrackedResource { /* @@ -17,13 +19,15 @@ public final class PartialMinimalTrackedResourceWithSku extends PartialMinimalTr @JsonProperty(value = "sku") private PartialSku sku; - /** Creates an instance of PartialMinimalTrackedResourceWithSku class. */ + /** + * Creates an instance of PartialMinimalTrackedResourceWithSku class. + */ public PartialMinimalTrackedResourceWithSku() { } /** * Get the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @return the sku value. */ public PartialSku sku() { @@ -32,7 +36,7 @@ public PartialSku sku() { /** * Set the sku property: Sku details required for ARM contract for Autoscaling. - * + * * @param sku the sku value to set. * @return the PartialMinimalTrackedResourceWithSku object itself. */ @@ -41,7 +45,9 @@ public PartialMinimalTrackedResourceWithSku withSku(PartialSku sku) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PartialMinimalTrackedResourceWithSku withTags(Map tags) { super.withTags(tags); @@ -50,7 +56,7 @@ public PartialMinimalTrackedResourceWithSku withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java new file mode 100644 index 0000000000000..83c16510dc833 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Strictly used in update requests. + */ +@Fluent +public final class PartialMinimalTrackedResourceWithSkuAndIdentity extends PartialMinimalTrackedResource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + @JsonProperty(value = "identity") + private PartialManagedServiceIdentity identity; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + @JsonProperty(value = "sku") + private PartialSku sku; + + /** + * Creates an instance of PartialMinimalTrackedResourceWithSkuAndIdentity class. + */ + public PartialMinimalTrackedResourceWithSkuAndIdentity() { + } + + /** + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + public PartialManagedServiceIdentity 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 PartialMinimalTrackedResourceWithSkuAndIdentity object itself. + */ + public PartialMinimalTrackedResourceWithSkuAndIdentity withIdentity(PartialManagedServiceIdentity 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 PartialMinimalTrackedResourceWithSkuAndIdentity object itself. + */ + public PartialMinimalTrackedResourceWithSkuAndIdentity withSku(PartialSku sku) { + this.sku = sku; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PartialMinimalTrackedResourceWithSkuAndIdentity 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 (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/PartialNotificationSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialNotificationSetting.java new file mode 100644 index 0000000000000..a5745dcf3a651 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialNotificationSetting.java @@ -0,0 +1,64 @@ +// Copyright (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; + +/** + * Mutable configuration for notification. + */ +@Fluent +public final class PartialNotificationSetting { + /* + * 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 PartialNotificationSetting class. + */ + public PartialNotificationSetting() { + } + + /** + * 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 PartialNotificationSetting object itself. + */ + public PartialNotificationSetting 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/PartialRegistryPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java new file mode 100644 index 0000000000000..816e2febef39f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java @@ -0,0 +1,115 @@ +// Copyright (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/PartialSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java index a5220a7d82079..2278aa73f0016 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Common SKU definition. */ +/** + * Common SKU definition. + */ @Fluent public final class PartialSku { /* @@ -43,14 +45,16 @@ public final class PartialSku { @JsonProperty(value = "tier") private SkuTier tier; - /** Creates an instance of PartialSku class. */ + /** + * Creates an instance of PartialSku class. + */ public PartialSku() { } /** * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If * scale out/in is not possible for the resource this may be omitted. - * + * * @return the capacity value. */ public Integer capacity() { @@ -60,7 +64,7 @@ public Integer capacity() { /** * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If * scale out/in is not possible for the resource this may be omitted. - * + * * @param capacity the capacity value to set. * @return the PartialSku object itself. */ @@ -70,9 +74,9 @@ public PartialSku withCapacity(Integer capacity) { } /** - * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * + * Get the family property: If the service has different generations of hardware, for the same SKU, then that can + * be captured here. + * * @return the family value. */ public String family() { @@ -80,9 +84,9 @@ public String family() { } /** - * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * + * Set the family property: If the service has different generations of hardware, for the same SKU, then that can + * be captured here. + * * @param family the family value to set. * @return the PartialSku object itself. */ @@ -93,7 +97,7 @@ public PartialSku withFamily(String family) { /** * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * + * * @return the name value. */ public String name() { @@ -102,7 +106,7 @@ public String name() { /** * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * + * * @param name the name value to set. * @return the PartialSku object itself. */ @@ -114,7 +118,7 @@ public PartialSku withName(String name) { /** * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this * would be the standalone code. - * + * * @return the size value. */ public String size() { @@ -124,7 +128,7 @@ public String size() { /** * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this * would be the standalone code. - * + * * @param size the size value to set. * @return the PartialSku object itself. */ @@ -136,7 +140,7 @@ public PartialSku withSize(String size) { /** * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more * than one tier, but is not required on a PUT. - * + * * @return the tier value. */ public SkuTier tier() { @@ -146,7 +150,7 @@ public SkuTier tier() { /** * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more * than one tier, but is not required on a PUT. - * + * * @param tier the tier value to set. * @return the PartialSku object itself. */ @@ -157,7 +161,7 @@ public PartialSku withTier(SkuTier tier) { /** * 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/Password.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java index 2b2e387338f8b..b31ec94a413b3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Password model. */ +/** + * The Password model. + */ @Immutable public final class Password { /* @@ -22,13 +24,15 @@ public final class Password { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private String value; - /** Creates an instance of Password class. */ + /** + * Creates an instance of Password class. + */ public Password() { } /** * Get the name property: The name property. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Get the value property: The value property. - * + * * @return the value value. */ public String value() { @@ -46,7 +50,7 @@ public String 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/PatAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java index 068f4b6b123a3..0ddd7d9176d12 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java @@ -8,8 +8,12 @@ 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.List; -/** The PatAuthTypeWorkspaceConnectionProperties model. */ +/** + * The PatAuthTypeWorkspaceConnectionProperties model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("PAT") @Fluent @@ -20,13 +24,15 @@ public final class PatAuthTypeWorkspaceConnectionProperties extends WorkspaceCon @JsonProperty(value = "credentials") private WorkspaceConnectionPersonalAccessToken credentials; - /** Creates an instance of PatAuthTypeWorkspaceConnectionProperties class. */ + /** + * Creates an instance of PatAuthTypeWorkspaceConnectionProperties class. + */ public PatAuthTypeWorkspaceConnectionProperties() { } /** * Get the credentials property: The credentials property. - * + * * @return the credentials value. */ public WorkspaceConnectionPersonalAccessToken credentials() { @@ -35,47 +41,73 @@ public WorkspaceConnectionPersonalAccessToken credentials() { /** * Set the credentials property: The credentials property. - * + * * @param credentials the credentials value to set. * @return the PatAuthTypeWorkspaceConnectionProperties object itself. */ - public PatAuthTypeWorkspaceConnectionProperties withCredentials( - WorkspaceConnectionPersonalAccessToken credentials) { + public PatAuthTypeWorkspaceConnectionProperties + withCredentials(WorkspaceConnectionPersonalAccessToken credentials) { this.credentials = credentials; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PatAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { super.withCategory(category); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public PatAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PatAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public PatAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public PatAuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public PatAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public PatAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.java new file mode 100644 index 0000000000000..480698c8737ba --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The os patching status. + */ +public final class PatchStatus extends ExpandableStringEnum { + /** + * Static value CompletedWithWarnings for PatchStatus. + */ + public static final PatchStatus COMPLETED_WITH_WARNINGS = fromString("CompletedWithWarnings"); + + /** + * Static value Failed for PatchStatus. + */ + public static final PatchStatus FAILED = fromString("Failed"); + + /** + * Static value InProgress for PatchStatus. + */ + public static final PatchStatus IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Succeeded for PatchStatus. + */ + public static final PatchStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Unknown for PatchStatus. + */ + public static final PatchStatus UNKNOWN = fromString("Unknown"); + + /** + * Creates a new instance of PatchStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchStatus() { + } + + /** + * Creates or finds a PatchStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchStatus. + */ + @JsonCreator + public static PatchStatus fromString(String name) { + return fromString(name, PatchStatus.class); + } + + /** + * Gets known PatchStatus values. + * + * @return known PatchStatus values. + */ + public static Collection values() { + return values(PatchStatus.class); + } +} 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..ef56a412a2a1b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.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 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..dafe50e33d5a8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.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; + +/** + * 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..ae2c240e15b21 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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..83a3ed2894908 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.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.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..73eab2822fe15 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.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; + +/** + * 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/PersonalComputeInstanceSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java index acf0346afd9dd..f6b55810887c5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Settings for a personal compute instance. */ +/** + * Settings for a personal compute instance. + */ @Fluent public final class PersonalComputeInstanceSettings { /* @@ -16,13 +18,15 @@ public final class PersonalComputeInstanceSettings { @JsonProperty(value = "assignedUser") private AssignedUser assignedUser; - /** Creates an instance of PersonalComputeInstanceSettings class. */ + /** + * Creates an instance of PersonalComputeInstanceSettings class. + */ public PersonalComputeInstanceSettings() { } /** * Get the assignedUser property: A user explicitly assigned to a personal compute instance. - * + * * @return the assignedUser value. */ public AssignedUser assignedUser() { @@ -31,7 +35,7 @@ public AssignedUser assignedUser() { /** * Set the assignedUser property: A user explicitly assigned to a personal compute instance. - * + * * @param assignedUser the assignedUser value to set. * @return the PersonalComputeInstanceSettings object itself. */ @@ -42,7 +46,7 @@ public PersonalComputeInstanceSettings withAssignedUser(AssignedUser assignedUse /** * 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/PipelineJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java index 38dd2499a528a..cfda1c4d6290f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Pipeline Job definition: defines generic to MFE attributes. */ +/** + * Pipeline Job definition: defines generic to MFE attributes. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") @JsonTypeName("Pipeline") @Fluent @@ -49,13 +51,15 @@ public final class PipelineJob extends JobBaseProperties { @JsonProperty(value = "sourceJobId") private String sourceJobId; - /** Creates an instance of PipelineJob class. */ + /** + * Creates an instance of PipelineJob class. + */ public PipelineJob() { } /** * Get the inputs property: Inputs for the pipeline job. - * + * * @return the inputs value. */ public Map inputs() { @@ -64,7 +68,7 @@ public Map inputs() { /** * Set the inputs property: Inputs for the pipeline job. - * + * * @param inputs the inputs value to set. * @return the PipelineJob object itself. */ @@ -75,7 +79,7 @@ public PipelineJob withInputs(Map inputs) { /** * Get the jobs property: Jobs construct the Pipeline Job. - * + * * @return the jobs value. */ public Map jobs() { @@ -84,7 +88,7 @@ public Map jobs() { /** * Set the jobs property: Jobs construct the Pipeline Job. - * + * * @param jobs the jobs value to set. * @return the PipelineJob object itself. */ @@ -95,7 +99,7 @@ public PipelineJob withJobs(Map jobs) { /** * Get the outputs property: Outputs for the pipeline job. - * + * * @return the outputs value. */ public Map outputs() { @@ -104,7 +108,7 @@ public Map outputs() { /** * Set the outputs property: Outputs for the pipeline job. - * + * * @param outputs the outputs value to set. * @return the PipelineJob object itself. */ @@ -115,7 +119,7 @@ public PipelineJob withOutputs(Map outputs) { /** * Get the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. - * + * * @return the settings value. */ public Object settings() { @@ -124,7 +128,7 @@ public Object settings() { /** * Set the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. - * + * * @param settings the settings value to set. * @return the PipelineJob object itself. */ @@ -135,7 +139,7 @@ public PipelineJob withSettings(Object settings) { /** * Get the sourceJobId property: ARM resource ID of source job. - * + * * @return the sourceJobId value. */ public String sourceJobId() { @@ -144,7 +148,7 @@ public String sourceJobId() { /** * Set the sourceJobId property: ARM resource ID of source job. - * + * * @param sourceJobId the sourceJobId value to set. * @return the PipelineJob object itself. */ @@ -153,70 +157,108 @@ public PipelineJob withSourceJobId(String sourceJobId) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PipelineJob withComponentId(String componentId) { super.withComponentId(componentId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PipelineJob withComputeId(String computeId) { super.withComputeId(computeId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PipelineJob withDisplayName(String displayName) { super.withDisplayName(displayName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PipelineJob withExperimentName(String experimentName) { super.withExperimentName(experimentName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PipelineJob withIdentity(IdentityConfiguration identity) { super.withIdentity(identity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PipelineJob withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public PipelineJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PipelineJob withSecretsConfiguration(Map secretsConfiguration) { + super.withSecretsConfiguration(secretsConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ @Override public PipelineJob withServices(Map services) { super.withServices(services); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PipelineJob withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PipelineJob withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PipelineJob withTags(Map tags) { super.withTags(tags); @@ -225,31 +267,25 @@ public PipelineJob withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (inputs() != null) { - inputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + inputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } if (outputs() != null) { - outputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + outputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolEnvironmentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolEnvironmentConfiguration.java new file mode 100644 index 0000000000000..2f04fc89de965 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolEnvironmentConfiguration.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Environment configuration options. + */ +@Fluent +public final class PoolEnvironmentConfiguration { + /* + * ARM resource ID of the environment specification for the inference pool. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * Environment variables configuration for the inference pool. + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * Liveness probe monitors the health of the container regularly. + */ + @JsonProperty(value = "livenessProbe") + private ProbeSettings livenessProbe; + + /* + * Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same + * as liveness probe. + */ + @JsonProperty(value = "readinessProbe") + private ProbeSettings readinessProbe; + + /* + * This verifies whether the application within a container is started. Startup probes run before any other probe, + * and, unless it finishes successfully, disables other probes. + */ + @JsonProperty(value = "startupProbe") + private ProbeSettings startupProbe; + + /** + * Creates an instance of PoolEnvironmentConfiguration class. + */ + public PoolEnvironmentConfiguration() { + } + + /** + * Get the environmentId property: ARM resource ID of the environment specification for the inference pool. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: ARM resource ID of the environment specification for the inference pool. + * + * @param environmentId the environmentId value to set. + * @return the PoolEnvironmentConfiguration object itself. + */ + public PoolEnvironmentConfiguration withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the environmentVariables property: Environment variables configuration for the inference pool. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment variables configuration for the inference pool. + * + * @param environmentVariables the environmentVariables value to set. + * @return the PoolEnvironmentConfiguration object itself. + */ + public PoolEnvironmentConfiguration withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the livenessProbe property: Liveness probe monitors the health of the container regularly. + * + * @return the livenessProbe value. + */ + public ProbeSettings livenessProbe() { + return this.livenessProbe; + } + + /** + * Set the livenessProbe property: Liveness probe monitors the health of the container regularly. + * + * @param livenessProbe the livenessProbe value to set. + * @return the PoolEnvironmentConfiguration object itself. + */ + public PoolEnvironmentConfiguration withLivenessProbe(ProbeSettings livenessProbe) { + this.livenessProbe = livenessProbe; + return this; + } + + /** + * Get the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The + * properties and defaults are the same as liveness probe. + * + * @return the readinessProbe value. + */ + public ProbeSettings readinessProbe() { + return this.readinessProbe; + } + + /** + * Set the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The + * properties and defaults are the same as liveness probe. + * + * @param readinessProbe the readinessProbe value to set. + * @return the PoolEnvironmentConfiguration object itself. + */ + public PoolEnvironmentConfiguration withReadinessProbe(ProbeSettings readinessProbe) { + this.readinessProbe = readinessProbe; + return this; + } + + /** + * Get the startupProbe property: This verifies whether the application within a container is started. Startup + * probes run before any other probe, and, unless it finishes successfully, disables other probes. + * + * @return the startupProbe value. + */ + public ProbeSettings startupProbe() { + return this.startupProbe; + } + + /** + * Set the startupProbe property: This verifies whether the application within a container is started. Startup + * probes run before any other probe, and, unless it finishes successfully, disables other probes. + * + * @param startupProbe the startupProbe value to set. + * @return the PoolEnvironmentConfiguration object itself. + */ + public PoolEnvironmentConfiguration withStartupProbe(ProbeSettings startupProbe) { + this.startupProbe = startupProbe; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (livenessProbe() != null) { + livenessProbe().validate(); + } + if (readinessProbe() != null) { + readinessProbe().validate(); + } + if (startupProbe() != null) { + startupProbe().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolModelConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolModelConfiguration.java new file mode 100644 index 0000000000000..52b9c00348c58 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolModelConfiguration.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; + +/** + * Model configuration options. + */ +@Fluent +public final class PoolModelConfiguration { + /* + * The URI path to the model. + */ + @JsonProperty(value = "modelId") + private String modelId; + + /** + * Creates an instance of PoolModelConfiguration class. + */ + public PoolModelConfiguration() { + } + + /** + * Get the modelId property: The URI path to the model. + * + * @return the modelId value. + */ + public String modelId() { + return this.modelId; + } + + /** + * Set the modelId property: The URI path to the model. + * + * @param modelId the modelId value to set. + * @return the PoolModelConfiguration object itself. + */ + public PoolModelConfiguration withModelId(String modelId) { + this.modelId = modelId; + 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/PoolProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java new file mode 100644 index 0000000000000..6d8286d2a5296 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java @@ -0,0 +1,73 @@ +// Copyright (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; + +/** + * State of pool related resources provisioning. + */ +public final class PoolProvisioningState extends ExpandableStringEnum { + /** + * Static value Creating for PoolProvisioningState. + */ + public static final PoolProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Deleting for PoolProvisioningState. + */ + public static final PoolProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Succeeded for PoolProvisioningState. + */ + public static final PoolProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for PoolProvisioningState. + */ + public static final PoolProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Updating for PoolProvisioningState. + */ + public static final PoolProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Canceled for PoolProvisioningState. + */ + public static final PoolProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of PoolProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PoolProvisioningState() { + } + + /** + * Creates or finds a PoolProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PoolProvisioningState. + */ + @JsonCreator + public static PoolProvisioningState fromString(String name) { + return fromString(name, PoolProvisioningState.class); + } + + /** + * Gets known PoolProvisioningState values. + * + * @return known PoolProvisioningState values. + */ + public static Collection values() { + return values(PoolProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolStatus.java new file mode 100644 index 0000000000000..f8edd00073cc4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolStatus.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.resourcemanager.machinelearning.fluent.models.PoolStatusInner; + +/** + * An immutable client-side representation of PoolStatus. + */ +public interface PoolStatus { + /** + * Gets the actualCapacity property: Gets or sets the actual number of instances in the pool. + * + * @return the actualCapacity value. + */ + Integer actualCapacity(); + + /** + * Gets the groupCount property: Gets or sets the actual number of groups in the pool. + * + * @return the groupCount value. + */ + Integer groupCount(); + + /** + * Gets the requestedCapacity property: Gets or sets the requested number of instances for the pool. + * + * @return the requestedCapacity value. + */ + Integer requestedCapacity(); + + /** + * Gets the reservedCapacity property: Gets or sets the number of instances in the pool reserved by the system. + * + * @return the reservedCapacity value. + */ + Integer reservedCapacity(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PoolStatusInner object. + * + * @return the inner object. + */ + PoolStatusInner innerModel(); +} 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..9dda482e15314 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java @@ -0,0 +1,71 @@ +// Copyright (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..0449373de9596 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.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.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..8844be4a3008d 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 @@ -7,46 +7,35 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Private Endpoint resource. */ +/** + * 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 + /** + * Creates an instance of PrivateEndpoint class. */ - @JsonProperty(value = "subnetArmId", access = JsonProperty.Access.WRITE_ONLY) - private String subnetArmId; - - /** Creates an instance of PrivateEndpoint class. */ public PrivateEndpoint() { } /** * Get the id property: The ARM identifier for Private Endpoint. - * + * * @return the id value. */ 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. - * + * * @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/PrivateEndpointConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java index 18d85548f8cb2..748e4e428e24e 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 @@ -10,329 +10,400 @@ import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; import java.util.Map; -/** An immutable client-side representation of PrivateEndpointConnection. */ +/** + * An immutable client-side representation of PrivateEndpointConnection. + */ public interface PrivateEndpointConnection { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the identity property: The identity of the resource. - * + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * * @return the identity value. */ ManagedServiceIdentity identity(); /** - * Gets the location property: Specifies the location of the resource. - * + * Gets the location property: Same as workspace location. + * * @return the location value. */ String location(); /** - * Gets the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. + * Gets the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * + * @return the sku value. */ - Map tags(); + Sku sku(); /** - * Gets the sku property: The sku of the workspace. - * - * @return the sku value. + * Gets the tags property: Dictionary of <string>. + * + * @return the tags value. */ - Sku sku(); + Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** - * Gets the privateEndpoint property: The resource of private end point. - * + * Gets the privateEndpoint property: The Private Endpoint resource. + * * @return the privateEndpoint value. */ - PrivateEndpoint privateEndpoint(); + WorkspacePrivateEndpointResource privateEndpoint(); /** - * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the - * connection between service consumer and provider. - * + * Gets the privateLinkServiceConnectionState property: The connection state. + * * @return the privateLinkServiceConnectionState value. */ PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); /** - * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. - * + * Gets the provisioningState property: The current provisioning state. + * * @return the provisioningState value. */ PrivateEndpointConnectionProvisioningState provisioningState(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner object. - * + * * @return the inner object. */ PrivateEndpointConnectionInner innerModel(); - /** The entirety of the PrivateEndpointConnection definition. */ + /** + * The entirety of the PrivateEndpointConnection definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The PrivateEndpointConnection definition stages. */ + + /** + * The PrivateEndpointConnection definition stages. + */ interface DefinitionStages { - /** The first stage of the PrivateEndpointConnection definition. */ + /** + * The first stage of the PrivateEndpointConnection definition. + */ interface Blank extends WithParentResource { } - /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */ + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, workspaceName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ 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. */ - interface WithCreate - extends DefinitionStages.WithLocation, - DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithSku, - DefinitionStages.WithPrivateEndpoint, - DefinitionStages.WithPrivateLinkServiceConnectionState { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithIdentity, DefinitionStages.WithSku, DefinitionStages.WithPrivateEndpoint, + DefinitionStages.WithPrivateLinkServiceConnectionState, DefinitionStages.WithProvisioningState { /** * Executes the create request. - * + * * @return the created resource. */ PrivateEndpointConnection create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ PrivateEndpointConnection create(Context context); } - /** The stage of the PrivateEndpointConnection definition allowing to specify location. */ + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. + * + * @param location Same as workspace location. * @return the next definition stage. */ WithCreate withRegion(Region location); /** * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. + * + * @param location Same as workspace location. * @return the next definition stage. */ WithCreate withRegion(String location); } - /** The stage of the PrivateEndpointConnection definition allowing to specify tags. */ + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify tags. + */ interface WithTags { /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. - * - * @param tags Contains resource tags defined as key/value pairs. + * Specifies the tags property: Dictionary of <string>. + * + * @param tags Dictionary of <string>. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the PrivateEndpointConnection definition allowing to specify identity. */ + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify identity. + */ interface WithIdentity { /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. + * 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 PrivateEndpointConnection definition allowing to specify sku. */ + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify sku. + */ interface WithSku { /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. + * Specifies the sku property: Optional. This field is required to be implemented by the RP because AML is + * supporting more than one tier. + * + * @param sku Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * @return the next definition stage. */ WithCreate withSku(Sku sku); } - /** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */ + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. + */ interface WithPrivateEndpoint { /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. + * Specifies the privateEndpoint property: The Private Endpoint resource.. + * + * @param privateEndpoint The Private Endpoint resource. * @return the next definition stage. */ - WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + WithCreate withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint); } + /** * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. */ interface WithPrivateLinkServiceConnectionState { /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. + * Specifies the privateLinkServiceConnectionState property: The connection state.. + * + * @param privateLinkServiceConnectionState The connection state. * @return the next definition stage. */ WithCreate withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState); } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify provisioningState. + */ + interface WithProvisioningState { + /** + * Specifies the provisioningState property: The current provisioning state.. + * + * @param provisioningState The current provisioning state. + * @return the next definition stage. + */ + WithCreate withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState); + } } + /** * Begins update for the PrivateEndpointConnection resource. - * + * * @return the stage of resource update. */ PrivateEndpointConnection.Update update(); - /** The template for PrivateEndpointConnection update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithSku, - UpdateStages.WithPrivateEndpoint, - UpdateStages.WithPrivateLinkServiceConnectionState { + /** + * The template for PrivateEndpointConnection update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, + UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState, + UpdateStages.WithProvisioningState { /** * Executes the update request. - * + * * @return the updated resource. */ PrivateEndpointConnection apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ PrivateEndpointConnection apply(Context context); } - /** The PrivateEndpointConnection update stages. */ + + /** + * The PrivateEndpointConnection update stages. + */ interface UpdateStages { - /** The stage of the PrivateEndpointConnection update allowing to specify tags. */ + /** + * The stage of the PrivateEndpointConnection update allowing to specify tags. + */ interface WithTags { /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. - * - * @param tags Contains resource tags defined as key/value pairs. + * Specifies the tags property: Dictionary of <string>. + * + * @param tags Dictionary of <string>. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the PrivateEndpointConnection update allowing to specify identity. */ + + /** + * The stage of the PrivateEndpointConnection update allowing to specify identity. + */ interface WithIdentity { /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. + * 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(ManagedServiceIdentity identity); } - /** The stage of the PrivateEndpointConnection update allowing to specify sku. */ + + /** + * The stage of the PrivateEndpointConnection update allowing to specify sku. + */ interface WithSku { /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. + * Specifies the sku property: Optional. This field is required to be implemented by the RP because AML is + * supporting more than one tier. + * + * @param sku Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * @return the next definition stage. */ Update withSku(Sku sku); } - /** The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. */ + + /** + * The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. + */ interface WithPrivateEndpoint { /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. + * Specifies the privateEndpoint property: The Private Endpoint resource.. + * + * @param privateEndpoint The Private Endpoint resource. * @return the next definition stage. */ - Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + Update withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint); } - /** The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. */ + + /** + * The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. + */ interface WithPrivateLinkServiceConnectionState { /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. + * Specifies the privateLinkServiceConnectionState property: The connection state.. + * + * @param privateLinkServiceConnectionState The connection state. * @return the next definition stage. */ Update withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState); } + + /** + * The stage of the PrivateEndpointConnection update allowing to specify provisioningState. + */ + interface WithProvisioningState { + /** + * Specifies the provisioningState property: The current provisioning state.. + * + * @param provisioningState The current provisioning state. + * @return the next definition stage. + */ + Update withProvisioningState(PrivateEndpointConnectionProvisioningState provisioningState); + } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ PrivateEndpointConnection refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java index b6f3c0c8b9b1d..a3bc9a97d87bc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of private endpoint connection associated with the specified workspace. */ +/** + * List of private endpoint connection associated with the specified workspace. + */ @Fluent public final class PrivateEndpointConnectionListResult { /* @@ -18,13 +20,15 @@ public final class PrivateEndpointConnectionListResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of PrivateEndpointConnectionListResult class. */ + /** + * Creates an instance of PrivateEndpointConnectionListResult class. + */ public PrivateEndpointConnectionListResult() { } /** * Get the value property: Array of private endpoint connections. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: Array of private endpoint connections. - * + * * @param value the value value to set. * @return the PrivateEndpointConnectionListResult object itself. */ @@ -44,7 +48,7 @@ public PrivateEndpointConnectionListResult withValue(List { - /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Succeeded for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Creating for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); - /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Deleting for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Failed for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); /** * Creates a new instance of PrivateEndpointConnectionProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public PrivateEndpointConnectionProvisioningState() { /** * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateEndpointConnectionProvisioningState. */ @@ -45,7 +55,7 @@ public static PrivateEndpointConnectionProvisioningState fromString(String name) /** * Gets known PrivateEndpointConnectionProvisioningState values. - * + * * @return known PrivateEndpointConnectionProvisioningState values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java index c660b6ad5ca1b..a269d808931e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java @@ -8,116 +8,118 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PrivateEndpointConnections. */ +/** + * Resource collection API of PrivateEndpointConnections. + */ public interface PrivateEndpointConnections { /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); /** - * List all the private endpoint connections associated with the workspace. - * + * Called by end-users to get all PE connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, Context context); /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 specified private endpoint connection associated with the workspace. */ - PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 Response}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 Private Endpoint Connection resource. */ - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ PrivateEndpointConnection getById(String id); /** - * Gets the specified private endpoint connection associated with the workspace. - * + * Called by end-users to get a PE connection. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -126,8 +128,8 @@ Response deleteWithResponse( void deleteById(String id); /** - * Deletes the specified private endpoint connection associated with the workspace. - * + * Called by end-users to delete a PE connection. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -139,7 +141,7 @@ Response deleteWithResponse( /** * Begins definition for a new PrivateEndpointConnection resource. - * + * * @param name resource name. * @return the first stage of the new PrivateEndpointConnection definition. */ 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..ee882f423a13d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.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; + +/** + * 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..3faac82dca20b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.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.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..fbaafa31618c8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.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; + +/** + * 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/PrivateEndpointServiceConnectionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java deleted file mode 100644 index 0173735ec3571..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The private endpoint connection status. */ -public final class PrivateEndpointServiceConnectionStatus - extends ExpandableStringEnum { - /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** Static value Disconnected for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** Static value Timeout for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus TIMEOUT = fromString("Timeout"); - - /** - * Creates a new instance of PrivateEndpointServiceConnectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateEndpointServiceConnectionStatus() { - } - - /** - * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointServiceConnectionStatus. - */ - @JsonCreator - public static PrivateEndpointServiceConnectionStatus fromString(String name) { - return fromString(name, PrivateEndpointServiceConnectionStatus.class); - } - - /** - * Gets known PrivateEndpointServiceConnectionStatus values. - * - * @return known PrivateEndpointServiceConnectionStatus values. - */ - public static Collection values() { - return values(PrivateEndpointServiceConnectionStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java index a98acd180051b..b31cb4c482d1d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java @@ -4,212 +4,97 @@ package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; import java.util.List; import java.util.Map; -/** A private link resource. */ -@Fluent -public final class PrivateLinkResource extends ProxyResource { - /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private PrivateLinkResourceProperties innerProperties; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * The sku of the workspace. - */ - @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 PrivateLinkResource class. */ - public PrivateLinkResource() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateLinkResourceProperties innerProperties() { - return this.innerProperties; - } - +/** + * An immutable client-side representation of PrivateLinkResource. + */ +public interface PrivateLinkResource { /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. */ - public ManagedServiceIdentity identity() { - return this.identity; - } + String id(); /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the location property: Specifies the location of the resource. - * - * @return the location value. + * Gets the name property: The name of the resource. + * + * @return the name value. */ - public String location() { - return this.location; - } + String name(); /** - * Set the location property: Specifies the location of the resource. - * - * @param location the location value to set. - * @return the PrivateLinkResource object itself. + * Gets the type property: The type of the resource. + * + * @return the type value. */ - public PrivateLinkResource withLocation(String location) { - this.location = location; - return this; - } + String type(); /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. */ - public Map tags() { - return this.tags; - } + ManagedServiceIdentity identity(); /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. - * @return the PrivateLinkResource object itself. + * Gets the location property: Same as workspace location. + * + * @return the location value. */ - public PrivateLinkResource withTags(Map tags) { - this.tags = tags; - return this; - } + String location(); /** - * Get the sku property: The sku of the workspace. - * + * Gets the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * * @return the sku value. */ - public Sku sku() { - return this.sku; - } + Sku sku(); /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the PrivateLinkResource object itself. + * Gets the tags property: Dictionary of <string>. + * + * @return the tags value. */ - public PrivateLinkResource withSku(Sku sku) { - this.sku = sku; - return this; - } + Map tags(); /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ - public SystemData systemData() { - return this.systemData; - } + SystemData systemData(); /** - * Get the groupId property: The private link resource group id. - * + * Gets the groupId property: The private link resource group id. + * * @return the groupId value. */ - public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); - } + String groupId(); /** - * Get the requiredMembers property: The private link resource required member names. - * + * Gets the requiredMembers property: The private link resource required member names. + * * @return the requiredMembers value. */ - public List requiredMembers() { - return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); - } + List requiredMembers(); /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * + * Gets the requiredZoneNames property: The private link resource Private link DNS zone name. + * * @return the requiredZoneNames value. */ - public List requiredZoneNames() { - return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); - } - - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withRequiredZoneNames(List requiredZoneNames) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkResourceProperties(); - } - this.innerProperties().withRequiredZoneNames(requiredZoneNames); - return this; - } + List requiredZoneNames(); /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner object. + * + * @return the inner object. */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } + PrivateLinkResourceInner innerModel(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.java index a2e329b0c1adf..7072e06d9c248 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.java @@ -4,22 +4,56 @@ package com.azure.resourcemanager.machinelearning.models; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** An immutable client-side representation of PrivateLinkResourceListResult. */ -public interface PrivateLinkResourceListResult { +/** + * A list of private link resources. + */ +@Fluent +public final class PrivateLinkResourceListResult { + /* + * The value property. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of PrivateLinkResourceListResult class. + */ + public PrivateLinkResourceListResult() { + } + /** - * Gets the value property: Array of private link resources. - * + * Get the value property: The value property. + * * @return the value value. */ - List value(); + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the PrivateLinkResourceListResult object itself. + */ + public PrivateLinkResourceListResult withValue(List value) { + this.value = value; + return this; + } /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner object. - * - * @return the inner object. + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. */ - PrivateLinkResourceListResultInner innerModel(); + 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/PrivateLinkResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java index 76dbb0e8e76eb..611915cd0e892 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java @@ -4,34 +4,43 @@ package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of PrivateLinkResources. */ +/** + * Resource collection API of PrivateLinkResources. + */ public interface PrivateLinkResources { /** - * Gets the private link resources that need to be created for a workspace. - * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace along with {@link Response}. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets the private link resources that need to be created for a workspace. - * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java index bd4774e9026c0..0ed4e2e653abf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java @@ -7,56 +7,58 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** A collection of information about the state of the connection between service consumer and provider. */ +/** + * A collection of information about the state of the connection between service consumer and provider. + */ @Fluent public final class PrivateLinkServiceConnectionState { /* - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + * Some RP chose "None". Other RPs use this for region expansion. */ - @JsonProperty(value = "status") - private PrivateEndpointServiceConnectionStatus status; + @JsonProperty(value = "actionsRequired") + private String actionsRequired; /* - * The reason for approval/rejection of the connection. + * User-defined message that, per NRP doc, may be used for approval-related message. */ @JsonProperty(value = "description") private String description; /* - * A message indicating if changes on the service provider require any updates on the consumer. + * Connection status of the service consumer with the service provider */ - @JsonProperty(value = "actionsRequired") - private String actionsRequired; + @JsonProperty(value = "status") + private EndpointServiceConnectionStatus status; - /** Creates an instance of PrivateLinkServiceConnectionState class. */ + /** + * Creates an instance of PrivateLinkServiceConnectionState class. + */ public PrivateLinkServiceConnectionState() { } /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. + * Get the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. + * + * @return the actionsRequired value. */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; + public String actionsRequired() { + return this.actionsRequired; } /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. + * Set the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. + * + * @param actionsRequired the actionsRequired value to set. * @return the PrivateLinkServiceConnectionState object itself. */ - public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; return this; } /** - * Get the description property: The reason for approval/rejection of the connection. - * + * 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() { @@ -64,8 +66,8 @@ public String description() { } /** - * Set the description property: The reason for approval/rejection of the connection. - * + * 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 PrivateLinkServiceConnectionState object itself. */ @@ -75,30 +77,28 @@ public PrivateLinkServiceConnectionState withDescription(String description) { } /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @return the actionsRequired value. + * Get the status property: Connection status of the service consumer with the service provider. + * + * @return the status value. */ - public String actionsRequired() { - return this.actionsRequired; + public EndpointServiceConnectionStatus status() { + return this.status; } /** - * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @param actionsRequired the actionsRequired value to set. + * Set the status property: Connection status of the service consumer with the service provider. + * + * @param status the status value to set. * @return the PrivateLinkServiceConnectionState object itself. */ - public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { - this.actionsRequired = actionsRequired; + public PrivateLinkServiceConnectionState 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/ProbeSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java index 3827d5bdb2061..a3991a3f2161f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; -/** Deployment container liveness/readiness probe configuration. */ +/** + * Deployment container liveness/readiness probe configuration. + */ @Fluent public final class ProbeSettings { /* @@ -41,13 +43,15 @@ public final class ProbeSettings { @JsonProperty(value = "timeout") private Duration timeout; - /** Creates an instance of ProbeSettings class. */ + /** + * Creates an instance of ProbeSettings class. + */ public ProbeSettings() { } /** * Get the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * + * * @return the failureThreshold value. */ public Integer failureThreshold() { @@ -56,7 +60,7 @@ public Integer failureThreshold() { /** * Set the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * + * * @param failureThreshold the failureThreshold value to set. * @return the ProbeSettings object itself. */ @@ -67,7 +71,7 @@ public ProbeSettings withFailureThreshold(Integer failureThreshold) { /** * Get the initialDelay property: The delay before the first probe in ISO 8601 format. - * + * * @return the initialDelay value. */ public Duration initialDelay() { @@ -76,7 +80,7 @@ public Duration initialDelay() { /** * Set the initialDelay property: The delay before the first probe in ISO 8601 format. - * + * * @param initialDelay the initialDelay value to set. * @return the ProbeSettings object itself. */ @@ -87,7 +91,7 @@ public ProbeSettings withInitialDelay(Duration initialDelay) { /** * Get the period property: The length of time between probes in ISO 8601 format. - * + * * @return the period value. */ public Duration period() { @@ -96,7 +100,7 @@ public Duration period() { /** * Set the period property: The length of time between probes in ISO 8601 format. - * + * * @param period the period value to set. * @return the ProbeSettings object itself. */ @@ -107,7 +111,7 @@ public ProbeSettings withPeriod(Duration period) { /** * Get the successThreshold property: The number of successful probes before returning a healthy status. - * + * * @return the successThreshold value. */ public Integer successThreshold() { @@ -116,7 +120,7 @@ public Integer successThreshold() { /** * Set the successThreshold property: The number of successful probes before returning a healthy status. - * + * * @param successThreshold the successThreshold value to set. * @return the ProbeSettings object itself. */ @@ -127,7 +131,7 @@ public ProbeSettings withSuccessThreshold(Integer successThreshold) { /** * Get the timeout property: The probe timeout in ISO 8601 format. - * + * * @return the timeout value. */ public Duration timeout() { @@ -136,7 +140,7 @@ public Duration timeout() { /** * Set the timeout property: The probe timeout in ISO 8601 format. - * + * * @param timeout the timeout value to set. * @return the ProbeSettings object itself. */ @@ -147,7 +151,7 @@ public ProbeSettings withTimeout(Duration timeout) { /** * 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/ProgressMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProgressMetrics.java new file mode 100644 index 0000000000000..8f5a5edeb96fb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProgressMetrics.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.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Progress metrics definition. + */ +@Immutable +public final class ProgressMetrics { + /* + * The completed datapoint count. + */ + @JsonProperty(value = "completedDatapointCount", access = JsonProperty.Access.WRITE_ONLY) + private Long completedDatapointCount; + + /* + * The time of last successful incremental data refresh in UTC. + */ + @JsonProperty(value = "incrementalDataLastRefreshDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime incrementalDataLastRefreshDateTime; + + /* + * The skipped datapoint count. + */ + @JsonProperty(value = "skippedDatapointCount", access = JsonProperty.Access.WRITE_ONLY) + private Long skippedDatapointCount; + + /* + * The total datapoint count. + */ + @JsonProperty(value = "totalDatapointCount", access = JsonProperty.Access.WRITE_ONLY) + private Long totalDatapointCount; + + /** + * Creates an instance of ProgressMetrics class. + */ + public ProgressMetrics() { + } + + /** + * Get the completedDatapointCount property: The completed datapoint count. + * + * @return the completedDatapointCount value. + */ + public Long completedDatapointCount() { + return this.completedDatapointCount; + } + + /** + * Get the incrementalDataLastRefreshDateTime property: The time of last successful incremental data refresh in + * UTC. + * + * @return the incrementalDataLastRefreshDateTime value. + */ + public OffsetDateTime incrementalDataLastRefreshDateTime() { + return this.incrementalDataLastRefreshDateTime; + } + + /** + * Get the skippedDatapointCount property: The skipped datapoint count. + * + * @return the skippedDatapointCount value. + */ + public Long skippedDatapointCount() { + return this.skippedDatapointCount; + } + + /** + * Get the totalDatapointCount property: The total datapoint count. + * + * @return the totalDatapointCount value. + */ + public Long totalDatapointCount() { + return this.totalDatapointCount; + } + + /** + * 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/PropertiesBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java new file mode 100644 index 0000000000000..d2e6888071bdc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Base definition for pool resources. + */ +@Fluent +public class PropertiesBase { + /* + * Description of the resource. + */ + @JsonProperty(value = "description") + private String description; + + /* + * 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 PropertiesBase class. + */ + public PropertiesBase() { + } + + /** + * Get the description property: Description of the resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the resource. + * + * @param description the description value to set. + * @return the PropertiesBase object itself. + */ + public PropertiesBase withDescription(String description) { + this.description = description; + 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 PropertiesBase object itself. + */ + public PropertiesBase 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/ProtectionLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProtectionLevel.java new file mode 100644 index 0000000000000..68670fa83c940 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProtectionLevel.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; + +/** + * Protection level associated with the Intellectual Property. + */ +public final class ProtectionLevel extends ExpandableStringEnum { + /** + * Static value All for ProtectionLevel. + */ + public static final ProtectionLevel ALL = fromString("All"); + + /** + * Static value None for ProtectionLevel. + */ + public static final ProtectionLevel NONE = fromString("None"); + + /** + * Creates a new instance of ProtectionLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProtectionLevel() { + } + + /** + * Creates or finds a ProtectionLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProtectionLevel. + */ + @JsonCreator + public static ProtectionLevel fromString(String name) { + return fromString(name, ProtectionLevel.class); + } + + /** + * Gets known ProtectionLevel values. + * + * @return known ProtectionLevel values. + */ + public static Collection values() { + return values(ProtectionLevel.class); + } +} 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..9cc407ce4f8d7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.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.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/ProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java index 0c3c664d77498..ef71feed5ed52 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java @@ -9,34 +9,47 @@ import java.util.Collection; /** - * The current deployment state of workspace resource. The provisioningState is to indicate states for resource - * provisioning. + * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Unknown for ProvisioningState. */ + /** + * Static value Unknown for ProvisioningState. + */ public static final ProvisioningState UNKNOWN = fromString("Unknown"); - /** Static value Updating for ProvisioningState. */ + /** + * Static value Updating for ProvisioningState. + */ public static final ProvisioningState UPDATING = fromString("Updating"); - /** Static value Creating for ProvisioningState. */ + /** + * Static value Creating for ProvisioningState. + */ public static final ProvisioningState CREATING = fromString("Creating"); - /** Static value Deleting for ProvisioningState. */ + /** + * Static value Deleting for ProvisioningState. + */ public static final ProvisioningState DELETING = fromString("Deleting"); - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); /** * Creates a new instance of ProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +58,7 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -56,7 +69,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java index 55ec63e378b1c..1a55db48de043 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The current deployment state of schedule. */ +/** + * The current deployment state of schedule. + */ public final class ProvisioningStatus extends ExpandableStringEnum { - /** Static value Completed for ProvisioningStatus. */ + /** + * Static value Completed for ProvisioningStatus. + */ public static final ProvisioningStatus COMPLETED = fromString("Completed"); - /** Static value Provisioning for ProvisioningStatus. */ + /** + * Static value Provisioning for ProvisioningStatus. + */ public static final ProvisioningStatus PROVISIONING = fromString("Provisioning"); - /** Static value Failed for ProvisioningStatus. */ + /** + * Static value Failed for ProvisioningStatus. + */ public static final ProvisioningStatus FAILED = fromString("Failed"); /** * Creates a new instance of ProvisioningStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ProvisioningStatus() { /** * Creates or finds a ProvisioningStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningStatus. */ @@ -41,7 +49,7 @@ public static ProvisioningStatus fromString(String name) { /** * Gets known ProvisioningStatus values. - * + * * @return known ProvisioningStatus values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java deleted file mode 100644 index c18df6cfe6886..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Whether requests from Public Network are allowed. */ -public final class PublicNetworkAccess extends ExpandableStringEnum { - /** Static value Enabled for PublicNetworkAccess. */ - public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - - /** Static value Disabled for PublicNetworkAccess. */ - public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccess() { - } - - /** - * Creates or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - @JsonCreator - public static PublicNetworkAccess fromString(String name) { - return fromString(name, PublicNetworkAccess.class); - } - - /** - * Gets known PublicNetworkAccess values. - * - * @return known PublicNetworkAccess values. - */ - public static Collection values() { - return values(PublicNetworkAccess.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java index 93629faaf07d5..08084befe4976 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine whether PublicNetworkAccess is Enabled or Disabled. */ +/** + * Enum to determine whether PublicNetworkAccess is Enabled or Disabled. + */ public final class PublicNetworkAccessType extends ExpandableStringEnum { - /** Static value Enabled for PublicNetworkAccessType. */ + /** + * Static value Enabled for PublicNetworkAccessType. + */ public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); - /** Static value Disabled for PublicNetworkAccessType. */ + /** + * Static value Disabled for PublicNetworkAccessType. + */ public static final PublicNetworkAccessType DISABLED = fromString("Disabled"); /** * Creates a new instance of PublicNetworkAccessType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PublicNetworkAccessType() { /** * Creates or finds a PublicNetworkAccessType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PublicNetworkAccessType. */ @@ -38,7 +44,7 @@ public static PublicNetworkAccessType fromString(String name) { /** * Gets known PublicNetworkAccessType values. - * + * * @return known PublicNetworkAccessType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java index c172265d0b929..57e05207eb882 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** PyTorch distribution configuration. */ +/** + * PyTorch distribution configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") @JsonTypeName("PyTorch") @Fluent @@ -20,13 +22,15 @@ public final class PyTorch extends DistributionConfiguration { @JsonProperty(value = "processCountPerInstance") private Integer processCountPerInstance; - /** Creates an instance of PyTorch class. */ + /** + * Creates an instance of PyTorch class. + */ public PyTorch() { } /** * Get the processCountPerInstance property: Number of processes per node. - * + * * @return the processCountPerInstance value. */ public Integer processCountPerInstance() { @@ -35,7 +39,7 @@ public Integer processCountPerInstance() { /** * Set the processCountPerInstance property: Number of processes per node. - * + * * @param processCountPerInstance the processCountPerInstance value to set. * @return the PyTorch object itself. */ @@ -46,7 +50,7 @@ public PyTorch withProcessCountPerInstance(Integer processCountPerInstance) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..8fc328c5bba2c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + + /* + * Controls the priority of the job on a compute. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /** + * 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; + } + + /** + * Get the priority property: Controls the priority of the job on a compute. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority property: Controls the priority of the job on a compute. + * + * @param priority the priority value to set. + * @return the QueueSettings object itself. + */ + public QueueSettings withPriority(Integer priority) { + this.priority = priority; + 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/QuotaBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java index 3a3c3836c0680..b611b8e388e7e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties for Quota update or retrieval. */ +/** + * The properties for Quota update or retrieval. + */ @Fluent public final class QuotaBaseProperties { /* @@ -24,7 +26,7 @@ public final class QuotaBaseProperties { /* * Limit. - * + * * The maximum permitted quota of the resource. */ @JsonProperty(value = "limit") @@ -36,13 +38,15 @@ public final class QuotaBaseProperties { @JsonProperty(value = "unit") private QuotaUnit unit; - /** Creates an instance of QuotaBaseProperties class. */ + /** + * Creates an instance of QuotaBaseProperties class. + */ public QuotaBaseProperties() { } /** * Get the id property: Specifies the resource ID. - * + * * @return the id value. */ public String id() { @@ -51,7 +55,7 @@ public String id() { /** * Set the id property: Specifies the resource ID. - * + * * @param id the id value to set. * @return the QuotaBaseProperties object itself. */ @@ -62,7 +66,7 @@ public QuotaBaseProperties withId(String id) { /** * Get the type property: Specifies the resource type. - * + * * @return the type value. */ public String type() { @@ -71,7 +75,7 @@ public String type() { /** * Set the type property: Specifies the resource type. - * + * * @param type the type value to set. * @return the QuotaBaseProperties object itself. */ @@ -82,9 +86,9 @@ public QuotaBaseProperties withType(String type) { /** * Get the limit property: Limit. - * - *

The maximum permitted quota of the resource. - * + * + * The maximum permitted quota of the resource. + * * @return the limit value. */ public Long limit() { @@ -93,9 +97,9 @@ public Long limit() { /** * Set the limit property: Limit. - * - *

The maximum permitted quota of the resource. - * + * + * The maximum permitted quota of the resource. + * * @param limit the limit value to set. * @return the QuotaBaseProperties object itself. */ @@ -106,7 +110,7 @@ public QuotaBaseProperties withLimit(Long limit) { /** * Get the unit property: An enum describing the unit of quota measurement. - * + * * @return the unit value. */ public QuotaUnit unit() { @@ -115,7 +119,7 @@ public QuotaUnit unit() { /** * Set the unit property: An enum describing the unit of quota measurement. - * + * * @param unit the unit value to set. * @return the QuotaBaseProperties object itself. */ @@ -126,7 +130,7 @@ public QuotaBaseProperties withUnit(QuotaUnit unit) { /** * 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/QuotaUnit.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java index af950e89ade05..b0ff8478e214d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** An enum describing the unit of quota measurement. */ +/** + * An enum describing the unit of quota measurement. + */ public final class QuotaUnit extends ExpandableStringEnum { - /** Static value Count for QuotaUnit. */ + /** + * Static value Count for QuotaUnit. + */ public static final QuotaUnit COUNT = fromString("Count"); /** * Creates a new instance of QuotaUnit value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public QuotaUnit() { /** * Creates or finds a QuotaUnit from its string representation. - * + * * @param name a name to look for. * @return the corresponding QuotaUnit. */ @@ -35,7 +39,7 @@ public static QuotaUnit fromString(String name) { /** * Gets known QuotaUnit values. - * + * * @return known QuotaUnit values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java index 38d413ef636e6..aeefb9781bbf1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Quota update parameters. */ +/** + * Quota update parameters. + */ @Fluent public final class QuotaUpdateParameters { /* @@ -23,13 +25,15 @@ public final class QuotaUpdateParameters { @JsonProperty(value = "location") private String location; - /** Creates an instance of QuotaUpdateParameters class. */ + /** + * Creates an instance of QuotaUpdateParameters class. + */ public QuotaUpdateParameters() { } /** * Get the value property: The list for update quota. - * + * * @return the value value. */ public List value() { @@ -38,7 +42,7 @@ public List value() { /** * Set the value property: The list for update quota. - * + * * @param value the value value to set. * @return the QuotaUpdateParameters object itself. */ @@ -49,7 +53,7 @@ public QuotaUpdateParameters withValue(List value) { /** * Get the location property: Region of workspace quota to be updated. - * + * * @return the location value. */ public String location() { @@ -58,7 +62,7 @@ public String location() { /** * Set the location property: Region of workspace quota to be updated. - * + * * @param location the location value to set. * @return the QuotaUpdateParameters object itself. */ @@ -69,7 +73,7 @@ public QuotaUpdateParameters withLocation(String location) { /** * 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/Quotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java index aa2c3e0fc4116..e8d4b6a08c8ce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Quotas. */ +/** + * Resource collection API of Quotas. + */ public interface Quotas { /** * Update quota for each VM family in workspace. - * + * * @param location The location for update quota is queried. * @param parameters Quota update parameters. * @param context The context to associate with this operation. @@ -21,12 +23,12 @@ public interface Quotas { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result of update workspace quota along with {@link Response}. */ - Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context); + Response updateWithResponse(String location, QuotaUpdateParameters parameters, + Context context); /** * Update quota for each VM family in workspace. - * + * * @param location The location for update quota is queried. * @param parameters Quota update parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,26 +40,26 @@ Response updateWithResponse( /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. + * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String location); /** * Gets the currently assigned Workspace Quotas based on VMFamily. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. + * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String location, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java index cdb0b372a2445..7b98f844a7f82 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java @@ -9,11 +9,19 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Defines a Sampling Algorithm that generates values randomly. */ +/** + * Defines a Sampling Algorithm that generates values randomly. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "samplingAlgorithmType") @JsonTypeName("Random") @Fluent public final class RandomSamplingAlgorithm extends SamplingAlgorithm { + /* + * An optional positive number or e in string format to be used as base for log based random sampling + */ + @JsonProperty(value = "logbase") + private String logbase; + /* * The specific type of random algorithm */ @@ -26,13 +34,37 @@ public final class RandomSamplingAlgorithm extends SamplingAlgorithm { @JsonProperty(value = "seed") private Integer seed; - /** Creates an instance of RandomSamplingAlgorithm class. */ + /** + * Creates an instance of RandomSamplingAlgorithm class. + */ public RandomSamplingAlgorithm() { } + /** + * Get the logbase property: An optional positive number or e in string format to be used as base for log based + * random sampling. + * + * @return the logbase value. + */ + public String logbase() { + return this.logbase; + } + + /** + * Set the logbase property: An optional positive number or e in string format to be used as base for log based + * random sampling. + * + * @param logbase the logbase value to set. + * @return the RandomSamplingAlgorithm object itself. + */ + public RandomSamplingAlgorithm withLogbase(String logbase) { + this.logbase = logbase; + return this; + } + /** * Get the rule property: The specific type of random algorithm. - * + * * @return the rule value. */ public RandomSamplingAlgorithmRule rule() { @@ -41,7 +73,7 @@ public RandomSamplingAlgorithmRule rule() { /** * Set the rule property: The specific type of random algorithm. - * + * * @param rule the rule value to set. * @return the RandomSamplingAlgorithm object itself. */ @@ -52,7 +84,7 @@ public RandomSamplingAlgorithm withRule(RandomSamplingAlgorithmRule rule) { /** * Get the seed property: An optional integer to use as the seed for random number generation. - * + * * @return the seed value. */ public Integer seed() { @@ -61,7 +93,7 @@ public Integer seed() { /** * Set the seed property: An optional integer to use as the seed for random number generation. - * + * * @param seed the seed value to set. * @return the RandomSamplingAlgorithm object itself. */ @@ -72,7 +104,7 @@ public RandomSamplingAlgorithm withSeed(Integer seed) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java index c545105fa8ffa..9d75047f55846 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The specific type of random algorithm. */ +/** + * The specific type of random algorithm. + */ public final class RandomSamplingAlgorithmRule extends ExpandableStringEnum { - /** Static value Random for RandomSamplingAlgorithmRule. */ + /** + * Static value Random for RandomSamplingAlgorithmRule. + */ public static final RandomSamplingAlgorithmRule RANDOM = fromString("Random"); - /** Static value Sobol for RandomSamplingAlgorithmRule. */ + /** + * Static value Sobol for RandomSamplingAlgorithmRule. + */ public static final RandomSamplingAlgorithmRule SOBOL = fromString("Sobol"); /** * Creates a new instance of RandomSamplingAlgorithmRule value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public RandomSamplingAlgorithmRule() { /** * Creates or finds a RandomSamplingAlgorithmRule from its string representation. - * + * * @param name a name to look for. * @return the corresponding RandomSamplingAlgorithmRule. */ @@ -38,7 +44,7 @@ public static RandomSamplingAlgorithmRule fromString(String name) { /** * Gets known RandomSamplingAlgorithmRule values. - * + * * @return known RandomSamplingAlgorithmRule values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.java new file mode 100644 index 0000000000000..1c034349e8340 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.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.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; + +/** + * Ray distribution configuration. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") +@JsonTypeName("Ray") +@Fluent +public final class Ray extends DistributionConfiguration { + /* + * The address of Ray head node. + */ + @JsonProperty(value = "address") + private String address; + + /* + * The port to bind the dashboard server to. + */ + @JsonProperty(value = "dashboardPort") + private Integer dashboardPort; + + /* + * Additional arguments passed to ray start in head node. + */ + @JsonProperty(value = "headNodeAdditionalArgs") + private String headNodeAdditionalArgs; + + /* + * Provide this argument to start the Ray dashboard GUI. + */ + @JsonProperty(value = "includeDashboard") + private Boolean includeDashboard; + + /* + * The port of the head ray process. + */ + @JsonProperty(value = "port") + private Integer port; + + /* + * Additional arguments passed to ray start in worker node. + */ + @JsonProperty(value = "workerNodeAdditionalArgs") + private String workerNodeAdditionalArgs; + + /** + * Creates an instance of Ray class. + */ + public Ray() { + } + + /** + * Get the address property: The address of Ray head node. + * + * @return the address value. + */ + public String address() { + return this.address; + } + + /** + * Set the address property: The address of Ray head node. + * + * @param address the address value to set. + * @return the Ray object itself. + */ + public Ray withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the dashboardPort property: The port to bind the dashboard server to. + * + * @return the dashboardPort value. + */ + public Integer dashboardPort() { + return this.dashboardPort; + } + + /** + * Set the dashboardPort property: The port to bind the dashboard server to. + * + * @param dashboardPort the dashboardPort value to set. + * @return the Ray object itself. + */ + public Ray withDashboardPort(Integer dashboardPort) { + this.dashboardPort = dashboardPort; + return this; + } + + /** + * Get the headNodeAdditionalArgs property: Additional arguments passed to ray start in head node. + * + * @return the headNodeAdditionalArgs value. + */ + public String headNodeAdditionalArgs() { + return this.headNodeAdditionalArgs; + } + + /** + * Set the headNodeAdditionalArgs property: Additional arguments passed to ray start in head node. + * + * @param headNodeAdditionalArgs the headNodeAdditionalArgs value to set. + * @return the Ray object itself. + */ + public Ray withHeadNodeAdditionalArgs(String headNodeAdditionalArgs) { + this.headNodeAdditionalArgs = headNodeAdditionalArgs; + return this; + } + + /** + * Get the includeDashboard property: Provide this argument to start the Ray dashboard GUI. + * + * @return the includeDashboard value. + */ + public Boolean includeDashboard() { + return this.includeDashboard; + } + + /** + * Set the includeDashboard property: Provide this argument to start the Ray dashboard GUI. + * + * @param includeDashboard the includeDashboard value to set. + * @return the Ray object itself. + */ + public Ray withIncludeDashboard(Boolean includeDashboard) { + this.includeDashboard = includeDashboard; + return this; + } + + /** + * Get the port property: The port of the head ray process. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Set the port property: The port of the head ray process. + * + * @param port the port value to set. + * @return the Ray object itself. + */ + public Ray withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the workerNodeAdditionalArgs property: Additional arguments passed to ray start in worker node. + * + * @return the workerNodeAdditionalArgs value. + */ + public String workerNodeAdditionalArgs() { + return this.workerNodeAdditionalArgs; + } + + /** + * Set the workerNodeAdditionalArgs property: Additional arguments passed to ray start in worker node. + * + * @param workerNodeAdditionalArgs the workerNodeAdditionalArgs value to set. + * @return the Ray object itself. + */ + public Ray withWorkerNodeAdditionalArgs(String workerNodeAdditionalArgs) { + this.workerNodeAdditionalArgs = workerNodeAdditionalArgs; + 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/Recurrence.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java new file mode 100644 index 0000000000000..41c874f24acd9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.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 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/RecurrenceFrequency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java index e1fa4dc2dfb9d..3b0dda10f56cc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to describe the frequency of a recurrence schedule. */ +/** + * Enum to describe the frequency of a recurrence schedule. + */ public final class RecurrenceFrequency extends ExpandableStringEnum { - /** Static value Minute for RecurrenceFrequency. */ + /** + * Static value Minute for RecurrenceFrequency. + */ public static final RecurrenceFrequency MINUTE = fromString("Minute"); - /** Static value Hour for RecurrenceFrequency. */ + /** + * Static value Hour for RecurrenceFrequency. + */ public static final RecurrenceFrequency HOUR = fromString("Hour"); - /** Static value Day for RecurrenceFrequency. */ + /** + * Static value Day for RecurrenceFrequency. + */ public static final RecurrenceFrequency DAY = fromString("Day"); - /** Static value Week for RecurrenceFrequency. */ + /** + * Static value Week for RecurrenceFrequency. + */ public static final RecurrenceFrequency WEEK = fromString("Week"); - /** Static value Month for RecurrenceFrequency. */ + /** + * Static value Month for RecurrenceFrequency. + */ public static final RecurrenceFrequency MONTH = fromString("Month"); /** * Creates a new instance of RecurrenceFrequency value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public RecurrenceFrequency() { /** * Creates or finds a RecurrenceFrequency from its string representation. - * + * * @param name a name to look for. * @return the corresponding RecurrenceFrequency. */ @@ -47,7 +59,7 @@ public static RecurrenceFrequency fromString(String name) { /** * Gets known RecurrenceFrequency values. - * + * * @return known RecurrenceFrequency values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java index 519561c59993a..c5491b2535d5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The RecurrenceSchedule model. */ +/** + * The RecurrenceSchedule model. + */ @Fluent public final class RecurrenceSchedule { /* @@ -36,13 +38,15 @@ public final class RecurrenceSchedule { @JsonProperty(value = "weekDays") private List weekDays; - /** Creates an instance of RecurrenceSchedule class. */ + /** + * Creates an instance of RecurrenceSchedule class. + */ public RecurrenceSchedule() { } /** * Get the hours property: [Required] List of hours for the schedule. - * + * * @return the hours value. */ public List hours() { @@ -51,7 +55,7 @@ public List hours() { /** * Set the hours property: [Required] List of hours for the schedule. - * + * * @param hours the hours value to set. * @return the RecurrenceSchedule object itself. */ @@ -62,7 +66,7 @@ public RecurrenceSchedule withHours(List hours) { /** * Get the minutes property: [Required] List of minutes for the schedule. - * + * * @return the minutes value. */ public List minutes() { @@ -71,7 +75,7 @@ public List minutes() { /** * Set the minutes property: [Required] List of minutes for the schedule. - * + * * @param minutes the minutes value to set. * @return the RecurrenceSchedule object itself. */ @@ -82,7 +86,7 @@ public RecurrenceSchedule withMinutes(List minutes) { /** * Get the monthDays property: List of month days for the schedule. - * + * * @return the monthDays value. */ public List monthDays() { @@ -91,7 +95,7 @@ public List monthDays() { /** * Set the monthDays property: List of month days for the schedule. - * + * * @param monthDays the monthDays value to set. * @return the RecurrenceSchedule object itself. */ @@ -102,7 +106,7 @@ public RecurrenceSchedule withMonthDays(List monthDays) { /** * Get the weekDays property: List of days for the schedule. - * + * * @return the weekDays value. */ public List weekDays() { @@ -111,7 +115,7 @@ public List weekDays() { /** * Set the weekDays property: List of days for the schedule. - * + * * @param weekDays the weekDays value to set. * @return the RecurrenceSchedule object itself. */ @@ -122,19 +126,17 @@ public RecurrenceSchedule withWeekDays(List weekDays) { /** * 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 RecurrenceSchedule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property hours in model RecurrenceSchedule")); } if (minutes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property minutes in model RecurrenceSchedule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property minutes in model RecurrenceSchedule")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java index 8937548c5ba46..af00ff38ca5ae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The RecurrenceTrigger model. */ +/** + * The RecurrenceTrigger model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType") @JsonTypeName("Recurrence") @Fluent @@ -33,13 +35,15 @@ public final class RecurrenceTrigger extends TriggerBase { @JsonProperty(value = "schedule") private RecurrenceSchedule schedule; - /** Creates an instance of RecurrenceTrigger class. */ + /** + * Creates an instance of RecurrenceTrigger class. + */ public RecurrenceTrigger() { } /** * Get the frequency property: [Required] The frequency to trigger schedule. - * + * * @return the frequency value. */ public RecurrenceFrequency frequency() { @@ -48,7 +52,7 @@ public RecurrenceFrequency frequency() { /** * Set the frequency property: [Required] The frequency to trigger schedule. - * + * * @param frequency the frequency value to set. * @return the RecurrenceTrigger object itself. */ @@ -59,7 +63,7 @@ public RecurrenceTrigger withFrequency(RecurrenceFrequency frequency) { /** * Get the interval property: [Required] Specifies schedule interval in conjunction with frequency. - * + * * @return the interval value. */ public int interval() { @@ -68,7 +72,7 @@ public int interval() { /** * Set the interval property: [Required] Specifies schedule interval in conjunction with frequency. - * + * * @param interval the interval value to set. * @return the RecurrenceTrigger object itself. */ @@ -79,7 +83,7 @@ public RecurrenceTrigger withInterval(int interval) { /** * Get the schedule property: The recurrence schedule. - * + * * @return the schedule value. */ public RecurrenceSchedule schedule() { @@ -88,7 +92,7 @@ public RecurrenceSchedule schedule() { /** * Set the schedule property: The recurrence schedule. - * + * * @param schedule the schedule value to set. * @return the RecurrenceTrigger object itself. */ @@ -97,21 +101,27 @@ public RecurrenceTrigger withSchedule(RecurrenceSchedule schedule) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RecurrenceTrigger withEndTime(String endTime) { super.withEndTime(endTime); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RecurrenceTrigger withStartTime(String startTime) { super.withStartTime(startTime); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public RecurrenceTrigger withTimeZone(String timeZone) { super.withTimeZone(timeZone); @@ -120,16 +130,15 @@ public RecurrenceTrigger withTimeZone(String timeZone) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (frequency() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property frequency in model RecurrenceTrigger")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property frequency in model RecurrenceTrigger")); } if (schedule() != null) { schedule().validate(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java index 128be86bca31d..40fbab116e0d8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine which reference method to use for an asset. */ +/** + * Enum to determine which reference method to use for an asset. + */ public final class ReferenceType extends ExpandableStringEnum { - /** Static value Id for ReferenceType. */ + /** + * Static value Id for ReferenceType. + */ public static final ReferenceType ID = fromString("Id"); - /** Static value DataPath for ReferenceType. */ + /** + * Static value DataPath for ReferenceType. + */ public static final ReferenceType DATA_PATH = fromString("DataPath"); - /** Static value OutputPath for ReferenceType. */ + /** + * Static value OutputPath for ReferenceType. + */ public static final ReferenceType OUTPUT_PATH = fromString("OutputPath"); /** * Creates a new instance of ReferenceType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ReferenceType() { /** * Creates or finds a ReferenceType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ReferenceType. */ @@ -41,7 +49,7 @@ public static ReferenceType fromString(String name) { /** * Gets known ReferenceType values. - * + * * @return known ReferenceType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java index 637b34d4e5acf..f76a38b7d620c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The RegenerateEndpointKeysRequest model. */ +/** + * The RegenerateEndpointKeysRequest model. + */ @Fluent public final class RegenerateEndpointKeysRequest { /* @@ -23,13 +25,15 @@ public final class RegenerateEndpointKeysRequest { @JsonProperty(value = "keyValue") private String keyValue; - /** Creates an instance of RegenerateEndpointKeysRequest class. */ + /** + * Creates an instance of RegenerateEndpointKeysRequest class. + */ public RegenerateEndpointKeysRequest() { } /** * Get the keyType property: [Required] Specification for which type of key to generate. Primary or Secondary. - * + * * @return the keyType value. */ public KeyType keyType() { @@ -38,7 +42,7 @@ public KeyType keyType() { /** * Set the keyType property: [Required] Specification for which type of key to generate. Primary or Secondary. - * + * * @param keyType the keyType value to set. * @return the RegenerateEndpointKeysRequest object itself. */ @@ -49,7 +53,7 @@ public RegenerateEndpointKeysRequest withKeyType(KeyType keyType) { /** * Get the keyValue property: The value the key is set to. - * + * * @return the keyValue value. */ public String keyValue() { @@ -58,7 +62,7 @@ public String keyValue() { /** * Set the keyValue property: The value the key is set to. - * + * * @param keyValue the keyValue value to set. * @return the RegenerateEndpointKeysRequest object itself. */ @@ -69,15 +73,13 @@ public RegenerateEndpointKeysRequest withKeyValue(String keyValue) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (keyType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyType in model RegenerateEndpointKeysRequest")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property keyType in model RegenerateEndpointKeysRequest")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.java new file mode 100644 index 0000000000000..6287ec06f86fa --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.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 RegenerateServiceAccountKeyContent model. + */ +@Fluent +public final class RegenerateServiceAccountKeyContent { + /* + * The keyName property. + */ + @JsonProperty(value = "keyName") + private ServiceAccountKeyName keyName; + + /** + * Creates an instance of RegenerateServiceAccountKeyContent class. + */ + public RegenerateServiceAccountKeyContent() { + } + + /** + * Get the keyName property: The keyName property. + * + * @return the keyName value. + */ + public ServiceAccountKeyName keyName() { + return this.keyName; + } + + /** + * Set the keyName property: The keyName property. + * + * @param keyName the keyName value to set. + * @return the RegenerateServiceAccountKeyContent object itself. + */ + public RegenerateServiceAccountKeyContent withKeyName(ServiceAccountKeyName keyName) { + this.keyName = keyName; + 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/Registries.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java new file mode 100644 index 0000000000000..df1cd3c0bcf4a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java @@ -0,0 +1,185 @@ +// Copyright (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..33026841035df --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java @@ -0,0 +1,521 @@ +// Copyright (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 managedResourceGroupSettings property: Managed resource group specific settings. + * + * @return the managedResourceGroupSettings value. + */ + ManagedResourceGroupSettings managedResourceGroupSettings(); + + /** + * 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.WithManagedResourceGroupSettings, 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 managedResourceGroupSettings. + */ + interface WithManagedResourceGroupSettings { + /** + * Specifies the managedResourceGroupSettings property: Managed resource group specific settings. + * + * @param managedResourceGroupSettings Managed resource group specific settings. + * @return the next definition stage. + */ + WithCreate withManagedResourceGroupSettings(ManagedResourceGroupSettings managedResourceGroupSettings); + } + + /** + * 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..5a28f1a6c9789 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.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 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..c1765818c47f4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.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.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..8456be09d7af8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.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 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..9cad30fa5561f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java @@ -0,0 +1,155 @@ +// Copyright (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 stage Component 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 ComponentVersion entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String registryName, String componentName, + String orderBy, Integer top, String skip, String stage, 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..4fc0a12bc99cc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java @@ -0,0 +1,147 @@ +// Copyright (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..7da13539e6bbe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.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.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of RegistryDataReferences. + */ +public interface RegistryDataReferences { + /** + * Get blob reference SAS Uri value. + * + * @param resourceGroupName 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 value along with {@link Response}. + */ + Response getBlobReferenceSasWithResponse(String resourceGroupName, + String registryName, String name, String version, GetBlobReferenceSasRequestDto body, Context context); + + /** + * Get blob reference SAS Uri value. + * + * @param resourceGroupName 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 value. + */ + 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..3ecc415d17048 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.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.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..d359edab1e091 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java @@ -0,0 +1,147 @@ +// Copyright (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..51b59e2fda17d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java @@ -0,0 +1,156 @@ +// Copyright (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 stage Stage for including/excluding (for example) archived entities. Takes priority over listViewType. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, String stage, 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/RegistryListCredentialsResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java index ada32c54e2e15..89e9618265391 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java @@ -8,52 +8,47 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The RegistryListCredentialsResult model. */ +/** + * The RegistryListCredentialsResult model. + */ @Fluent public final class RegistryListCredentialsResult { /* - * The location property. + * The location of the workspace ACR */ @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; - /* - * The username property. - */ - @JsonProperty(value = "username", access = JsonProperty.Access.WRITE_ONLY) - private String username; - /* * The passwords property. */ @JsonProperty(value = "passwords") private List passwords; - /** Creates an instance of RegistryListCredentialsResult class. */ + /* + * The username of the workspace ACR + */ + @JsonProperty(value = "username", access = JsonProperty.Access.WRITE_ONLY) + private String username; + + /** + * Creates an instance of RegistryListCredentialsResult class. + */ public RegistryListCredentialsResult() { } /** - * Get the location property: The location property. - * + * Get the location property: The location of the workspace ACR. + * * @return the location value. */ public String location() { return this.location; } - /** - * Get the username property: The username property. - * - * @return the username value. - */ - public String username() { - return this.username; - } - /** * Get the passwords property: The passwords property. - * + * * @return the passwords value. */ public List passwords() { @@ -62,7 +57,7 @@ public List passwords() { /** * Set the passwords property: The passwords property. - * + * * @param passwords the passwords value to set. * @return the RegistryListCredentialsResult object itself. */ @@ -71,9 +66,18 @@ public RegistryListCredentialsResult withPasswords(List passwords) { return this; } + /** + * Get the username property: The username of the workspace ACR. + * + * @return the username value. + */ + public String username() { + return this.username; + } + /** * 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/RegistryModelContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java new file mode 100644 index 0000000000000..fde6d2b6bf31f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java @@ -0,0 +1,147 @@ +// Copyright (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..65249da8fe394 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.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.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); + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + PackageResponse packageMethod(String resourceGroupName, String registryName, String modelName, String version, + PackageRequest body); + + /** + * Model Version Package operation. + * + * @param resourceGroupName 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 body Package operation request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return package response returned after async package operation completes successfully. + */ + PackageResponse packageMethod(String resourceGroupName, String registryName, String modelName, String version, + PackageRequest 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}. + */ + 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..fe8bd0f05bf6f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.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.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..0190f96968a97 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java @@ -0,0 +1,203 @@ +// Copyright (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..c14a70fae553c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.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; + +/** + * 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..64313e5413a9c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.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.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..f0f1b3c05f3e8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/Regression.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java index 40ed6fd905bf6..e3050da690b2e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; -/** Regression task in AutoML Table vertical. */ +/** + * Regression task in AutoML Table vertical. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("Regression") @Fluent @@ -39,6 +41,12 @@ public final class Regression extends AutoMLVertical { @JsonProperty(value = "featurizationSettings") private TableVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private TableFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @@ -52,6 +60,18 @@ public final class Regression extends AutoMLVertical { @JsonProperty(value = "nCrossValidations") private NCrossValidations nCrossValidations; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private TableSweepSettings sweepSettings; + /* * Test data input. */ @@ -87,13 +107,15 @@ public final class Regression extends AutoMLVertical { @JsonProperty(value = "weightColumnName") private String weightColumnName; - /** Creates an instance of Regression class. */ + /** + * Creates an instance of Regression class. + */ public Regression() { } /** * Get the primaryMetric property: Primary metric for regression task. - * + * * @return the primaryMetric value. */ public RegressionPrimaryMetrics primaryMetric() { @@ -102,7 +124,7 @@ public RegressionPrimaryMetrics primaryMetric() { /** * Set the primaryMetric property: Primary metric for regression task. - * + * * @param primaryMetric the primaryMetric value to set. * @return the Regression object itself. */ @@ -113,7 +135,7 @@ public Regression withPrimaryMetric(RegressionPrimaryMetrics primaryMetric) { /** * Get the trainingSettings property: Inputs for training phase for an AutoML Job. - * + * * @return the trainingSettings value. */ public RegressionTrainingSettings trainingSettings() { @@ -122,7 +144,7 @@ public RegressionTrainingSettings trainingSettings() { /** * Set the trainingSettings property: Inputs for training phase for an AutoML Job. - * + * * @param trainingSettings the trainingSettings value to set. * @return the Regression object itself. */ @@ -133,7 +155,7 @@ public Regression withTrainingSettings(RegressionTrainingSettings trainingSettin /** * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * + * * @return the cvSplitColumnNames value. */ public List cvSplitColumnNames() { @@ -142,7 +164,7 @@ public List cvSplitColumnNames() { /** * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * + * * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the Regression object itself. */ @@ -153,7 +175,7 @@ public Regression withCvSplitColumnNames(List cvSplitColumnNames) { /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @return the featurizationSettings value. */ public TableVerticalFeaturizationSettings featurizationSettings() { @@ -162,7 +184,7 @@ public TableVerticalFeaturizationSettings featurizationSettings() { /** * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @param featurizationSettings the featurizationSettings value to set. * @return the Regression object itself. */ @@ -171,9 +193,29 @@ public Regression withFeaturizationSettings(TableVerticalFeaturizationSettings f return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public TableFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the Regression object itself. + */ + public Regression withFixedParameters(TableFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. - * + * * @return the limitSettings value. */ public TableVerticalLimitSettings limitSettings() { @@ -182,7 +224,7 @@ public TableVerticalLimitSettings limitSettings() { /** * Set the limitSettings property: Execution constraints for AutoMLJob. - * + * * @param limitSettings the limitSettings value to set. * @return the Regression object itself. */ @@ -192,9 +234,9 @@ public Regression withLimitSettings(TableVerticalLimitSettings limitSettings) { } /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * + * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. + * * @return the nCrossValidations value. */ public NCrossValidations nCrossValidations() { @@ -202,9 +244,9 @@ public NCrossValidations nCrossValidations() { } /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * + * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. + * * @param nCrossValidations the nCrossValidations value to set. * @return the Regression object itself. */ @@ -213,9 +255,51 @@ public Regression withNCrossValidations(NCrossValidations nCrossValidations) { return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the Regression object itself. + */ + public Regression withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public TableSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the Regression object itself. + */ + public Regression withSweepSettings(TableSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + /** * Get the testData property: Test data input. - * + * * @return the testData value. */ public MLTableJobInput testData() { @@ -224,7 +308,7 @@ public MLTableJobInput testData() { /** * Set the testData property: Test data input. - * + * * @param testData the testData value to set. * @return the Regression object itself. */ @@ -235,8 +319,9 @@ public Regression withTestData(MLTableJobInput testData) { /** * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the testDataSize value. */ public Double testDataSize() { @@ -245,8 +330,9 @@ public Double testDataSize() { /** * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param testDataSize the testDataSize value to set. * @return the Regression object itself. */ @@ -257,7 +343,7 @@ public Regression withTestDataSize(Double testDataSize) { /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -266,7 +352,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the Regression object itself. */ @@ -277,8 +363,10 @@ public Regression withValidationData(MLTableJobInput validationData) { /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the validationDataSize value. */ public Double validationDataSize() { @@ -287,8 +375,10 @@ public Double validationDataSize() { /** * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param validationDataSize the validationDataSize value to set. * @return the Regression object itself. */ @@ -300,7 +390,7 @@ public Regression withValidationDataSize(Double validationDataSize) { /** * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column * as an input, causing rows in the data to be weighted up or down. - * + * * @return the weightColumnName value. */ public String weightColumnName() { @@ -310,7 +400,7 @@ public String weightColumnName() { /** * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column * as an input, causing rows in the data to be weighted up or down. - * + * * @param weightColumnName the weightColumnName value to set. * @return the Regression object itself. */ @@ -319,21 +409,27 @@ public Regression withWeightColumnName(String weightColumnName) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Regression withLogVerbosity(LogVerbosity logVerbosity) { super.withLogVerbosity(logVerbosity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Regression withTargetColumnName(String targetColumnName) { super.withTargetColumnName(targetColumnName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Regression withTrainingData(MLTableJobInput trainingData) { super.withTrainingData(trainingData); @@ -342,7 +438,7 @@ public Regression withTrainingData(MLTableJobInput trainingData) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -354,12 +450,21 @@ public void validate() { if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } if (nCrossValidations() != null) { nCrossValidations().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } if (testData() != null) { testData().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModelPerformanceMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModelPerformanceMetric.java new file mode 100644 index 0000000000000..18c6c265537c8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModelPerformanceMetric.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for RegressionModelPerformanceMetric. + */ +public final class RegressionModelPerformanceMetric extends ExpandableStringEnum { + /** + * Static value MeanAbsoluteError for RegressionModelPerformanceMetric. + */ + public static final RegressionModelPerformanceMetric MEAN_ABSOLUTE_ERROR = fromString("MeanAbsoluteError"); + + /** + * Static value RootMeanSquaredError for RegressionModelPerformanceMetric. + */ + public static final RegressionModelPerformanceMetric ROOT_MEAN_SQUARED_ERROR = fromString("RootMeanSquaredError"); + + /** + * Static value MeanSquaredError for RegressionModelPerformanceMetric. + */ + public static final RegressionModelPerformanceMetric MEAN_SQUARED_ERROR = fromString("MeanSquaredError"); + + /** + * Creates a new instance of RegressionModelPerformanceMetric value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RegressionModelPerformanceMetric() { + } + + /** + * Creates or finds a RegressionModelPerformanceMetric from its string representation. + * + * @param name a name to look for. + * @return the corresponding RegressionModelPerformanceMetric. + */ + @JsonCreator + public static RegressionModelPerformanceMetric fromString(String name) { + return fromString(name, RegressionModelPerformanceMetric.class); + } + + /** + * Gets known RegressionModelPerformanceMetric values. + * + * @return known RegressionModelPerformanceMetric values. + */ + public static Collection values() { + return values(RegressionModelPerformanceMetric.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModelPerformanceMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModelPerformanceMetricThreshold.java new file mode 100644 index 0000000000000..df3c5c7fe9bd8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModelPerformanceMetricThreshold.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The RegressionModelPerformanceMetricThreshold model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "modelType") +@JsonTypeName("Regression") +@Fluent +public final class RegressionModelPerformanceMetricThreshold extends ModelPerformanceMetricThresholdBase { + /* + * [Required] The regression model performance metric to calculate. + */ + @JsonProperty(value = "metric", required = true) + private RegressionModelPerformanceMetric metric; + + /** + * Creates an instance of RegressionModelPerformanceMetricThreshold class. + */ + public RegressionModelPerformanceMetricThreshold() { + } + + /** + * Get the metric property: [Required] The regression model performance metric to calculate. + * + * @return the metric value. + */ + public RegressionModelPerformanceMetric metric() { + return this.metric; + } + + /** + * Set the metric property: [Required] The regression model performance metric to calculate. + * + * @param metric the metric value to set. + * @return the RegressionModelPerformanceMetricThreshold object itself. + */ + public RegressionModelPerformanceMetricThreshold withMetric(RegressionModelPerformanceMetric metric) { + this.metric = metric; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public RegressionModelPerformanceMetricThreshold 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 RegressionModelPerformanceMetricThreshold")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RegressionModelPerformanceMetricThreshold.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java index 2325aadc2dd9a..909240953b733 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java @@ -8,41 +8,63 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum for all Regression models supported by AutoML. */ +/** + * Enum for all Regression models supported by AutoML. + */ public final class RegressionModels extends ExpandableStringEnum { - /** Static value ElasticNet for RegressionModels. */ + /** + * Static value ElasticNet for RegressionModels. + */ public static final RegressionModels ELASTIC_NET = fromString("ElasticNet"); - /** Static value GradientBoosting for RegressionModels. */ + /** + * Static value GradientBoosting for RegressionModels. + */ public static final RegressionModels GRADIENT_BOOSTING = fromString("GradientBoosting"); - /** Static value DecisionTree for RegressionModels. */ + /** + * Static value DecisionTree for RegressionModels. + */ public static final RegressionModels DECISION_TREE = fromString("DecisionTree"); - /** Static value KNN for RegressionModels. */ + /** + * Static value KNN for RegressionModels. + */ public static final RegressionModels KNN = fromString("KNN"); - /** Static value LassoLars for RegressionModels. */ + /** + * Static value LassoLars for RegressionModels. + */ public static final RegressionModels LASSO_LARS = fromString("LassoLars"); - /** Static value SGD for RegressionModels. */ + /** + * Static value SGD for RegressionModels. + */ public static final RegressionModels SGD = fromString("SGD"); - /** Static value RandomForest for RegressionModels. */ + /** + * Static value RandomForest for RegressionModels. + */ public static final RegressionModels RANDOM_FOREST = fromString("RandomForest"); - /** Static value ExtremeRandomTrees for RegressionModels. */ + /** + * Static value ExtremeRandomTrees for RegressionModels. + */ public static final RegressionModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); - /** Static value LightGBM for RegressionModels. */ + /** + * Static value LightGBM for RegressionModels. + */ public static final RegressionModels LIGHT_GBM = fromString("LightGBM"); - /** Static value XGBoostRegressor for RegressionModels. */ + /** + * Static value XGBoostRegressor for RegressionModels. + */ public static final RegressionModels XGBOOST_REGRESSOR = fromString("XGBoostRegressor"); /** * Creates a new instance of RegressionModels value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -51,7 +73,7 @@ public RegressionModels() { /** * Creates or finds a RegressionModels from its string representation. - * + * * @param name a name to look for. * @return the corresponding RegressionModels. */ @@ -62,7 +84,7 @@ public static RegressionModels fromString(String name) { /** * Gets known RegressionModels values. - * + * * @return known RegressionModels values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java index 36dd7417b9d5f..31448d5a15e9f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java @@ -8,25 +8,35 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Primary metrics for Regression task. */ +/** + * Primary metrics for Regression task. + */ public final class RegressionPrimaryMetrics extends ExpandableStringEnum { - /** Static value SpearmanCorrelation for RegressionPrimaryMetrics. */ + /** + * Static value SpearmanCorrelation for RegressionPrimaryMetrics. + */ public static final RegressionPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); - /** Static value NormalizedRootMeanSquaredError for RegressionPrimaryMetrics. */ - public static final RegressionPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR = - fromString("NormalizedRootMeanSquaredError"); + /** + * Static value NormalizedRootMeanSquaredError for RegressionPrimaryMetrics. + */ + public static final RegressionPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR + = fromString("NormalizedRootMeanSquaredError"); - /** Static value R2Score for RegressionPrimaryMetrics. */ + /** + * Static value R2Score for RegressionPrimaryMetrics. + */ public static final RegressionPrimaryMetrics R2SCORE = fromString("R2Score"); - /** Static value NormalizedMeanAbsoluteError for RegressionPrimaryMetrics. */ - public static final RegressionPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR = - fromString("NormalizedMeanAbsoluteError"); + /** + * Static value NormalizedMeanAbsoluteError for RegressionPrimaryMetrics. + */ + public static final RegressionPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR + = fromString("NormalizedMeanAbsoluteError"); /** * Creates a new instance of RegressionPrimaryMetrics value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -35,7 +45,7 @@ public RegressionPrimaryMetrics() { /** * Creates or finds a RegressionPrimaryMetrics from its string representation. - * + * * @param name a name to look for. * @return the corresponding RegressionPrimaryMetrics. */ @@ -46,7 +56,7 @@ public static RegressionPrimaryMetrics fromString(String name) { /** * Gets known RegressionPrimaryMetrics values. - * + * * @return known RegressionPrimaryMetrics values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java index 289a03ff56409..5c3578024acff 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java @@ -9,7 +9,9 @@ import java.time.Duration; import java.util.List; -/** Regression Training related configuration. */ +/** + * Regression Training related configuration. + */ @Fluent public final class RegressionTrainingSettings extends TrainingSettings { /* @@ -24,13 +26,15 @@ public final class RegressionTrainingSettings extends TrainingSettings { @JsonProperty(value = "blockedTrainingAlgorithms") private List blockedTrainingAlgorithms; - /** Creates an instance of RegressionTrainingSettings class. */ + /** + * Creates an instance of RegressionTrainingSettings class. + */ public RegressionTrainingSettings() { } /** * Get the allowedTrainingAlgorithms property: Allowed models for regression task. - * + * * @return the allowedTrainingAlgorithms value. */ public List allowedTrainingAlgorithms() { @@ -39,7 +43,7 @@ public List allowedTrainingAlgorithms() { /** * Set the allowedTrainingAlgorithms property: Allowed models for regression task. - * + * * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. * @return the RegressionTrainingSettings object itself. */ @@ -50,7 +54,7 @@ public RegressionTrainingSettings withAllowedTrainingAlgorithms(List blockedTrainingAlgorithms() { @@ -59,7 +63,7 @@ public List blockedTrainingAlgorithms() { /** * Set the blockedTrainingAlgorithms property: Blocked models for regression task. - * + * * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. * @return the RegressionTrainingSettings object itself. */ @@ -68,58 +72,81 @@ public RegressionTrainingSettings withBlockedTrainingAlgorithms(ListState of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all + * + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all * nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified * - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all * public nodes. It can be default only during cluster creation time, after creation it will be either enabled or * disabled. */ public final class RemoteLoginPortPublicAccess extends ExpandableStringEnum { - /** Static value Enabled for RemoteLoginPortPublicAccess. */ + /** + * Static value Enabled for RemoteLoginPortPublicAccess. + */ public static final RemoteLoginPortPublicAccess ENABLED = fromString("Enabled"); - /** Static value Disabled for RemoteLoginPortPublicAccess. */ + /** + * Static value Disabled for RemoteLoginPortPublicAccess. + */ public static final RemoteLoginPortPublicAccess DISABLED = fromString("Disabled"); - /** Static value NotSpecified for RemoteLoginPortPublicAccess. */ + /** + * Static value NotSpecified for RemoteLoginPortPublicAccess. + */ public static final RemoteLoginPortPublicAccess NOT_SPECIFIED = fromString("NotSpecified"); /** * Creates a new instance of RemoteLoginPortPublicAccess value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -38,7 +44,7 @@ public RemoteLoginPortPublicAccess() { /** * Creates or finds a RemoteLoginPortPublicAccess from its string representation. - * + * * @param name a name to look for. * @return the corresponding RemoteLoginPortPublicAccess. */ @@ -49,7 +55,7 @@ public static RemoteLoginPortPublicAccess fromString(String name) { /** * Gets known RemoteLoginPortPublicAccess values. - * + * * @return known RemoteLoginPortPublicAccess values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java new file mode 100644 index 0000000000000..d166396bf41e1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.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.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; + +/** + * Scoring requests configuration. + */ +@Fluent +public final class RequestConfiguration { + /* + * The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + */ + @JsonProperty(value = "maxConcurrentRequestsPerInstance") + private Integer maxConcurrentRequestsPerInstance; + + /* + * The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + */ + @JsonProperty(value = "requestTimeout") + private Duration requestTimeout; + + /** + * Creates an instance of RequestConfiguration class. + */ + public RequestConfiguration() { + } + + /** + * Get the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed + * per deployment. Defaults to 1. + * + * @return the maxConcurrentRequestsPerInstance value. + */ + public Integer maxConcurrentRequestsPerInstance() { + return this.maxConcurrentRequestsPerInstance; + } + + /** + * Set the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed + * per deployment. Defaults to 1. + * + * @param maxConcurrentRequestsPerInstance the maxConcurrentRequestsPerInstance value to set. + * @return the RequestConfiguration object itself. + */ + public RequestConfiguration withMaxConcurrentRequestsPerInstance(Integer maxConcurrentRequestsPerInstance) { + this.maxConcurrentRequestsPerInstance = maxConcurrentRequestsPerInstance; + return this; + } + + /** + * Get the requestTimeout property: The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + * + * @return the requestTimeout value. + */ + public Duration requestTimeout() { + return this.requestTimeout; + } + + /** + * Set the requestTimeout property: The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + * + * @param requestTimeout the requestTimeout value to set. + * @return the RequestConfiguration object itself. + */ + public RequestConfiguration withRequestTimeout(Duration requestTimeout) { + this.requestTimeout = requestTimeout; + 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/RequestLogging.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java new file mode 100644 index 0000000000000..6977d1c4cc97f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.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 java.util.List; + +/** + * The RequestLogging model. + */ +@Fluent +public final class RequestLogging { + /* + * For payload logging, we only collect payload by default. If customers also want to collect the specified + * headers, they can set them in captureHeaders so that backend will collect those headers along with payload. + */ + @JsonProperty(value = "captureHeaders") + private List captureHeaders; + + /** + * Creates an instance of RequestLogging class. + */ + public RequestLogging() { + } + + /** + * Get the captureHeaders property: For payload logging, we only collect payload by default. If customers also want + * to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers + * along with payload. + * + * @return the captureHeaders value. + */ + public List captureHeaders() { + return this.captureHeaders; + } + + /** + * Set the captureHeaders property: For payload logging, we only collect payload by default. If customers also want + * to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers + * along with payload. + * + * @param captureHeaders the captureHeaders value to set. + * @return the RequestLogging object itself. + */ + public RequestLogging withCaptureHeaders(List captureHeaders) { + this.captureHeaders = captureHeaders; + 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/RequestMatchPattern.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestMatchPattern.java new file mode 100644 index 0000000000000..9359decde6e84 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestMatchPattern.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The RequestMatchPattern model. + */ +@Fluent +public final class RequestMatchPattern { + /* + * The path property. + */ + @JsonProperty(value = "path") + private String path; + + /* + * The method property. + */ + @JsonProperty(value = "method") + private String method; + + /** + * Creates an instance of RequestMatchPattern class. + */ + public RequestMatchPattern() { + } + + /** + * Get the path property: The path property. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The path property. + * + * @param path the path value to set. + * @return the RequestMatchPattern object itself. + */ + public RequestMatchPattern withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the method property: The method property. + * + * @return the method value. + */ + public String method() { + return this.method; + } + + /** + * Set the method property: The method property. + * + * @param method the method value to set. + * @return the RequestMatchPattern object itself. + */ + public RequestMatchPattern withMethod(String method) { + this.method = method; + 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/ResizeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.java new file mode 100644 index 0000000000000..b8a15a73eae7e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.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; + +/** + * Schema for Compute Instance resize. + */ +@Fluent +public final class ResizeSchema { + /* + * The name of the virtual machine size. + */ + @JsonProperty(value = "targetVMSize") + private String targetVMSize; + + /** + * Creates an instance of ResizeSchema class. + */ + public ResizeSchema() { + } + + /** + * Get the targetVMSize property: The name of the virtual machine size. + * + * @return the targetVMSize value. + */ + public String targetVMSize() { + return this.targetVMSize; + } + + /** + * Set the targetVMSize property: The name of the virtual machine size. + * + * @param targetVMSize the targetVMSize value to set. + * @return the ResizeSchema object itself. + */ + public ResizeSchema withTargetVMSize(String targetVMSize) { + this.targetVMSize = targetVMSize; + 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/ResourceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java index 4d9b1502f311a..9b07962ee7413 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The ResourceBase model. */ +/** + * The ResourceBase model. + */ @Fluent public class ResourceBase { /* @@ -32,13 +34,15 @@ public class ResourceBase { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of ResourceBase class. */ + /** + * Creates an instance of ResourceBase class. + */ public ResourceBase() { } /** * Get the description property: The asset description text. - * + * * @return the description value. */ public String description() { @@ -47,7 +51,7 @@ public String description() { /** * Set the description property: The asset description text. - * + * * @param description the description value to set. * @return the ResourceBase object itself. */ @@ -58,7 +62,7 @@ public ResourceBase withDescription(String description) { /** * Get the properties property: The asset property dictionary. - * + * * @return the properties value. */ public Map properties() { @@ -67,7 +71,7 @@ public Map properties() { /** * Set the properties property: The asset property dictionary. - * + * * @param properties the properties value to set. * @return the ResourceBase object itself. */ @@ -78,7 +82,7 @@ public ResourceBase withProperties(Map properties) { /** * Get the tags property: Tag dictionary. Tags can be added, removed, and updated. - * + * * @return the tags value. */ public Map tags() { @@ -87,7 +91,7 @@ public Map tags() { /** * Set the tags property: Tag dictionary. Tags can be added, removed, and updated. - * + * * @param tags the tags value to set. * @return the ResourceBase object itself. */ @@ -98,7 +102,7 @@ public ResourceBase withTags(Map tags) { /** * 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/ResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java index 01067c5f7380f..ca002103fa035 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java @@ -7,9 +7,12 @@ 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; -/** The ResourceConfiguration model. */ +/** + * The ResourceConfiguration model. + */ @Fluent public class ResourceConfiguration { /* @@ -24,6 +27,19 @@ public class ResourceConfiguration { @JsonProperty(value = "instanceType") private String instanceType; + /* + * Locations where the job can run. + */ + @JsonProperty(value = "locations") + private List locations; + + /* + * Optional max allowed number of instances or nodes to be used by the compute target. + * For use with elastic training, currently supported by PyTorch distribution type only. + */ + @JsonProperty(value = "maxInstanceCount") + private Integer maxInstanceCount; + /* * Additional properties bag. */ @@ -31,13 +47,15 @@ public class ResourceConfiguration { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map properties; - /** Creates an instance of ResourceConfiguration class. */ + /** + * Creates an instance of ResourceConfiguration class. + */ public ResourceConfiguration() { } /** * Get the instanceCount property: Optional number of instances or nodes used by the compute target. - * + * * @return the instanceCount value. */ public Integer instanceCount() { @@ -46,7 +64,7 @@ public Integer instanceCount() { /** * Set the instanceCount property: Optional number of instances or nodes used by the compute target. - * + * * @param instanceCount the instanceCount value to set. * @return the ResourceConfiguration object itself. */ @@ -57,7 +75,7 @@ public ResourceConfiguration withInstanceCount(Integer instanceCount) { /** * Get the instanceType property: Optional type of VM used as supported by the compute target. - * + * * @return the instanceType value. */ public String instanceType() { @@ -66,7 +84,7 @@ public String instanceType() { /** * Set the instanceType property: Optional type of VM used as supported by the compute target. - * + * * @param instanceType the instanceType value to set. * @return the ResourceConfiguration object itself. */ @@ -75,9 +93,53 @@ public ResourceConfiguration withInstanceType(String instanceType) { return this; } + /** + * Get the locations property: Locations where the job can run. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations property: Locations where the job can run. + * + * @param locations the locations value to set. + * @return the ResourceConfiguration object itself. + */ + public ResourceConfiguration withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the maxInstanceCount property: Optional max allowed number of instances or nodes to be used by the compute + * target. + * For use with elastic training, currently supported by PyTorch distribution type only. + * + * @return the maxInstanceCount value. + */ + public Integer maxInstanceCount() { + return this.maxInstanceCount; + } + + /** + * Set the maxInstanceCount property: Optional max allowed number of instances or nodes to be used by the compute + * target. + * For use with elastic training, currently supported by PyTorch distribution type only. + * + * @param maxInstanceCount the maxInstanceCount value to set. + * @return the ResourceConfiguration object itself. + */ + public ResourceConfiguration withMaxInstanceCount(Integer maxInstanceCount) { + this.maxInstanceCount = maxInstanceCount; + return this; + } + /** * Get the properties property: Additional properties bag. - * + * * @return the properties value. */ public Map properties() { @@ -86,7 +148,7 @@ public Map properties() { /** * Set the properties property: Additional properties bag. - * + * * @param properties the properties value to set. * @return the ResourceConfiguration object itself. */ @@ -97,7 +159,7 @@ public ResourceConfiguration withProperties(Map properties) { /** * 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/ResourceId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java index a5cc276054e2c..a18f49b40d3f7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. */ +/** + * Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. + */ @Fluent public final class ResourceId { /* @@ -17,13 +19,15 @@ public final class ResourceId { @JsonProperty(value = "id", required = true) private String id; - /** Creates an instance of ResourceId class. */ + /** + * Creates an instance of ResourceId class. + */ public ResourceId() { } /** * Get the id property: The ID of the resource. - * + * * @return the id value. */ public String id() { @@ -32,7 +36,7 @@ public String id() { /** * Set the id property: The ID of the resource. - * + * * @param id the id value to set. * @return the ResourceId object itself. */ @@ -43,7 +47,7 @@ public ResourceId withId(String id) { /** * 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/ResourceName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java index 9824d46b66786..6ab7b8f7c8877 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Resource Name. */ +/** + * The Resource Name. + */ @Immutable public final class ResourceName { /* @@ -22,13 +24,15 @@ public final class ResourceName { @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) private String localizedValue; - /** Creates an instance of ResourceName class. */ + /** + * Creates an instance of ResourceName class. + */ public ResourceName() { } /** * Get the value property: The name of the resource. - * + * * @return the value value. */ public String value() { @@ -37,7 +41,7 @@ public String value() { /** * Get the localizedValue property: The localized name of the resource. - * + * * @return the localizedValue value. */ public String localizedValue() { @@ -46,7 +50,7 @@ public String localizedValue() { /** * 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/ResourceQuota.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java index 107b099bcf5a6..d1d6ade69b6fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java @@ -6,55 +6,57 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; -/** An immutable client-side representation of ResourceQuota. */ +/** + * An immutable client-side representation of ResourceQuota. + */ public interface ResourceQuota { /** * Gets the id property: Specifies the resource ID. - * + * * @return the id value. */ String id(); /** * Gets the amlWorkspaceLocation property: Region of the AML workspace in the id. - * + * * @return the amlWorkspaceLocation value. */ String amlWorkspaceLocation(); /** * Gets the type property: Specifies the resource type. - * + * * @return the type value. */ String type(); /** * Gets the name property: Name of the resource. - * + * * @return the name value. */ ResourceName name(); /** * Gets the limit property: Limit. - * - *

The maximum permitted quota of the resource. - * + * + * The maximum permitted quota of the resource. + * * @return the limit value. */ Long limit(); /** * Gets the unit property: An enum describing the unit of quota measurement. - * + * * @return the unit value. */ QuotaUnit unit(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner object. - * + * * @return the inner object. */ ResourceQuotaInner innerModel(); 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..7897f65b84a41 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java @@ -0,0 +1,165 @@ +// Copyright (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 { + /* + * The ARM resource ID of the component resource 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 trailing data window. + */ + @JsonProperty(value = "windowSize", required = true) + private Duration windowSize; + + /** + * Creates an instance of RollingInputData class. + */ + public RollingInputData() { + } + + /** + * Get the preprocessingComponentId property: The ARM resource ID of the component resource used to preprocess the + * data. + * + * @return the preprocessingComponentId value. + */ + public String preprocessingComponentId() { + return this.preprocessingComponentId; + } + + /** + * Set the preprocessingComponentId property: The ARM resource ID of the component resource 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 trailing data window. + * + * @return the windowSize value. + */ + public Duration windowSize() { + return this.windowSize; + } + + /** + * Set the windowSize property: [Required] The size of the trailing 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/RollingRateType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java new file mode 100644 index 0000000000000..1969de273507e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for RollingRateType. + */ +public final class RollingRateType extends ExpandableStringEnum { + /** + * Static value Year for RollingRateType. + */ + public static final RollingRateType YEAR = fromString("Year"); + + /** + * Static value Month for RollingRateType. + */ + public static final RollingRateType MONTH = fromString("Month"); + + /** + * Static value Day for RollingRateType. + */ + public static final RollingRateType DAY = fromString("Day"); + + /** + * Static value Hour for RollingRateType. + */ + public static final RollingRateType HOUR = fromString("Hour"); + + /** + * Static value Minute for RollingRateType. + */ + public static final RollingRateType MINUTE = fromString("Minute"); + + /** + * Creates a new instance of RollingRateType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RollingRateType() { + } + + /** + * Creates or finds a RollingRateType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RollingRateType. + */ + @JsonCreator + public static RollingRateType fromString(String name) { + return fromString(name, RollingRateType.class); + } + + /** + * Gets known RollingRateType values. + * + * @return known RollingRateType values. + */ + public static Collection values() { + return values(RollingRateType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java index ce8860e8900b2..2f9b442f2e3dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Route model. */ +/** + * The Route model. + */ @Fluent public final class Route { /* @@ -23,13 +25,15 @@ public final class Route { @JsonProperty(value = "port", required = true) private int port; - /** Creates an instance of Route class. */ + /** + * Creates an instance of Route class. + */ public Route() { } /** * Get the path property: [Required] The path for the route. - * + * * @return the path value. */ public String path() { @@ -38,7 +42,7 @@ public String path() { /** * Set the path property: [Required] The path for the route. - * + * * @param path the path value to set. * @return the Route object itself. */ @@ -49,7 +53,7 @@ public Route withPath(String path) { /** * Get the port property: [Required] The port for the route. - * + * * @return the port value. */ public int port() { @@ -58,7 +62,7 @@ public int port() { /** * Set the port property: [Required] The port for the route. - * + * * @param port the port value to set. * @return the Route object itself. */ @@ -69,7 +73,7 @@ public Route withPort(int port) { /** * 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/RuleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java new file mode 100644 index 0000000000000..b33893f89d8c2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.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 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..2d7f298046291 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.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.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..e4b2f74e2c996 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.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; + +/** + * 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..561908d10844f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.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.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/SamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java index 1a96ee37626e1..bcefbbba6c186 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java @@ -9,7 +9,10 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The Sampling Algorithm used to generate hyperparameter values, along with properties to configure the algorithm. */ +/** + * The Sampling Algorithm used to generate hyperparameter values, along with properties to + * configure the algorithm. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,17 +22,18 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "Bayesian", value = BayesianSamplingAlgorithm.class), @JsonSubTypes.Type(name = "Grid", value = GridSamplingAlgorithm.class), - @JsonSubTypes.Type(name = "Random", value = RandomSamplingAlgorithm.class) -}) + @JsonSubTypes.Type(name = "Random", value = RandomSamplingAlgorithm.class) }) @Immutable public class SamplingAlgorithm { - /** Creates an instance of SamplingAlgorithm class. */ + /** + * Creates an instance of SamplingAlgorithm class. + */ public SamplingAlgorithm() { } /** * 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/SamplingAlgorithmType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java index 60cde05582b6f..1af3bfb5ddc08 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SamplingAlgorithmType. */ +/** + * Defines values for SamplingAlgorithmType. + */ public final class SamplingAlgorithmType extends ExpandableStringEnum { - /** Static value Grid for SamplingAlgorithmType. */ + /** + * Static value Grid for SamplingAlgorithmType. + */ public static final SamplingAlgorithmType GRID = fromString("Grid"); - /** Static value Random for SamplingAlgorithmType. */ + /** + * Static value Random for SamplingAlgorithmType. + */ public static final SamplingAlgorithmType RANDOM = fromString("Random"); - /** Static value Bayesian for SamplingAlgorithmType. */ + /** + * Static value Bayesian for SamplingAlgorithmType. + */ public static final SamplingAlgorithmType BAYESIAN = fromString("Bayesian"); /** * Creates a new instance of SamplingAlgorithmType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public SamplingAlgorithmType() { /** * Creates or finds a SamplingAlgorithmType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SamplingAlgorithmType. */ @@ -41,7 +49,7 @@ public static SamplingAlgorithmType fromString(String name) { /** * Gets known SamplingAlgorithmType values. - * + * * @return known SamplingAlgorithmType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java index 1065fa7947c69..eeaba42eb029a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java @@ -8,8 +8,12 @@ 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.List; -/** The SasAuthTypeWorkspaceConnectionProperties model. */ +/** + * The SasAuthTypeWorkspaceConnectionProperties model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("SAS") @Fluent @@ -20,13 +24,15 @@ public final class SasAuthTypeWorkspaceConnectionProperties extends WorkspaceCon @JsonProperty(value = "credentials") private WorkspaceConnectionSharedAccessSignature credentials; - /** Creates an instance of SasAuthTypeWorkspaceConnectionProperties class. */ + /** + * Creates an instance of SasAuthTypeWorkspaceConnectionProperties class. + */ public SasAuthTypeWorkspaceConnectionProperties() { } /** * Get the credentials property: The credentials property. - * + * * @return the credentials value. */ public WorkspaceConnectionSharedAccessSignature credentials() { @@ -35,47 +41,73 @@ public WorkspaceConnectionSharedAccessSignature credentials() { /** * Set the credentials property: The credentials property. - * + * * @param credentials the credentials value to set. * @return the SasAuthTypeWorkspaceConnectionProperties object itself. */ - public SasAuthTypeWorkspaceConnectionProperties withCredentials( - WorkspaceConnectionSharedAccessSignature credentials) { + public SasAuthTypeWorkspaceConnectionProperties + withCredentials(WorkspaceConnectionSharedAccessSignature credentials) { this.credentials = credentials; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SasAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { super.withCategory(category); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public SasAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SasAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public SasAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public SasAuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public SasAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public SasAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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..e7ceff27c968b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.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.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..f47b43ca182f6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.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.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..1c46329a9c012 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** SAS datastore credentials configuration. */ +/** + * SAS datastore credentials configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") @JsonTypeName("Sas") @Fluent @@ -18,16 +20,18 @@ 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. */ + /** + * Creates an instance of SasDatastoreCredentials class. + */ public SasDatastoreCredentials() { } /** * Get the secrets property: [Required] Storage container secrets. - * + * * @return the secrets value. */ public SasDatastoreSecrets secrets() { @@ -36,7 +40,7 @@ public SasDatastoreSecrets secrets() { /** * Set the secrets property: [Required] Storage container secrets. - * + * * @param secrets the secrets value to set. * @return the SasDatastoreCredentials object itself. */ @@ -47,16 +51,15 @@ public SasDatastoreCredentials withSecrets(SasDatastoreSecrets secrets) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (secrets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property secrets in model SasDatastoreCredentials")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property secrets in model SasDatastoreCredentials")); } else { secrets().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java index dbeda80d6e303..cb6fef978033b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Datastore SAS secrets. */ +/** + * Datastore SAS secrets. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") @JsonTypeName("Sas") @Fluent @@ -21,13 +23,15 @@ public final class SasDatastoreSecrets extends DatastoreSecretsInner { @JsonProperty(value = "sasToken") private String sasToken; - /** Creates an instance of SasDatastoreSecrets class. */ + /** + * Creates an instance of SasDatastoreSecrets class. + */ public SasDatastoreSecrets() { } /** * Get the sasToken property: Storage container SAS token. - * + * * @return the sasToken value. */ public String sasToken() { @@ -36,7 +40,7 @@ public String sasToken() { /** * Set the sasToken property: Storage container SAS token. - * + * * @param sasToken the sasToken value to set. * @return the SasDatastoreSecrets object itself. */ @@ -47,7 +51,7 @@ public SasDatastoreSecrets withSasToken(String sasToken) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java index efd70e8605e1d..04659863b4743 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; -/** scale settings for AML Compute. */ +/** + * scale settings for AML Compute. + */ @Fluent public final class ScaleSettings { /* @@ -29,13 +31,15 @@ public final class ScaleSettings { @JsonProperty(value = "nodeIdleTimeBeforeScaleDown") private Duration nodeIdleTimeBeforeScaleDown; - /** Creates an instance of ScaleSettings class. */ + /** + * Creates an instance of ScaleSettings class. + */ public ScaleSettings() { } /** * Get the maxNodeCount property: Max number of nodes to use. - * + * * @return the maxNodeCount value. */ public int maxNodeCount() { @@ -44,7 +48,7 @@ public int maxNodeCount() { /** * Set the maxNodeCount property: Max number of nodes to use. - * + * * @param maxNodeCount the maxNodeCount value to set. * @return the ScaleSettings object itself. */ @@ -55,7 +59,7 @@ public ScaleSettings withMaxNodeCount(int maxNodeCount) { /** * Get the minNodeCount property: Min number of nodes to use. - * + * * @return the minNodeCount value. */ public Integer minNodeCount() { @@ -64,7 +68,7 @@ public Integer minNodeCount() { /** * Set the minNodeCount property: Min number of nodes to use. - * + * * @param minNodeCount the minNodeCount value to set. * @return the ScaleSettings object itself. */ @@ -74,9 +78,9 @@ public ScaleSettings withMinNodeCount(Integer minNodeCount) { } /** - * Get the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs to - * be in the RFC Format. - * + * Get the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs + * to be in the RFC Format. + * * @return the nodeIdleTimeBeforeScaleDown value. */ public Duration nodeIdleTimeBeforeScaleDown() { @@ -84,9 +88,9 @@ public Duration nodeIdleTimeBeforeScaleDown() { } /** - * Set the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs to - * be in the RFC Format. - * + * Set the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs + * to be in the RFC Format. + * * @param nodeIdleTimeBeforeScaleDown the nodeIdleTimeBeforeScaleDown value to set. * @return the ScaleSettings object itself. */ @@ -97,7 +101,7 @@ public ScaleSettings withNodeIdleTimeBeforeScaleDown(Duration nodeIdleTimeBefore /** * 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/ScaleSettingsInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java index f5282e103e15b..3e56a7ca65a8f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Desired scale settings for the amlCompute. */ +/** + * Desired scale settings for the amlCompute. + */ @Fluent public final class ScaleSettingsInformation { /* @@ -16,13 +18,15 @@ public final class ScaleSettingsInformation { @JsonProperty(value = "scaleSettings") private ScaleSettings scaleSettings; - /** Creates an instance of ScaleSettingsInformation class. */ + /** + * Creates an instance of ScaleSettingsInformation class. + */ public ScaleSettingsInformation() { } /** * Get the scaleSettings property: scale settings for AML Compute. - * + * * @return the scaleSettings value. */ public ScaleSettings scaleSettings() { @@ -31,7 +35,7 @@ public ScaleSettings scaleSettings() { /** * Set the scaleSettings property: scale settings for AML Compute. - * + * * @param scaleSettings the scaleSettings value to set. * @return the ScaleSettingsInformation object itself. */ @@ -42,7 +46,7 @@ public ScaleSettingsInformation withScaleSettings(ScaleSettings scaleSettings) { /** * 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/ScaleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java index 418165898f397..f1b3f939e8f35 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScaleType. */ +/** + * Defines values for ScaleType. + */ public final class ScaleType extends ExpandableStringEnum { - /** Static value Default for ScaleType. */ + /** + * Static value Default for ScaleType. + */ public static final ScaleType DEFAULT = fromString("Default"); - /** Static value TargetUtilization for ScaleType. */ + /** + * Static value TargetUtilization for ScaleType. + */ public static final ScaleType TARGET_UTILIZATION = fromString("TargetUtilization"); /** * Creates a new instance of ScaleType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ScaleType() { /** * Creates or finds a ScaleType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScaleType. */ @@ -38,7 +44,7 @@ public static ScaleType fromString(String name) { /** * Gets known ScaleType values. - * + * * @return known ScaleType values. */ public static Collection values() { 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..564a0fcd9e027 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 @@ -4,94 +4,108 @@ 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.ScheduleInner; -/** An immutable client-side representation of Schedule. */ +/** + * An immutable client-side representation of Schedule. + */ public interface Schedule { /** * 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. */ ScheduleProperties 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.ScheduleInner object. - * + * * @return the inner object. */ ScheduleInner innerModel(); - /** The entirety of the Schedule definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the Schedule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The Schedule definition stages. */ + + /** + * The Schedule definition stages. + */ interface DefinitionStages { - /** The first stage of the Schedule definition. */ + /** + * The first stage of the Schedule definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Schedule definition allowing to specify parent resource. */ + + /** + * The stage of the Schedule 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 Schedule definition allowing to specify properties. */ + + /** + * The stage of the Schedule 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(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. @@ -99,69 +113,101 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ Schedule create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Schedule create(Context context); } } + /** * Begins update for the Schedule resource. - * + * * @return the stage of resource update. */ Schedule.Update update(); - /** The template for Schedule update. */ + /** + * The template for Schedule update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ Schedule apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Schedule apply(Context context); } - /** The Schedule update stages. */ + + /** + * The Schedule update stages. + */ interface UpdateStages { - /** The stage of the Schedule update allowing to specify properties. */ + /** + * The stage of the Schedule 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(ScheduleProperties properties); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Schedule refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ Schedule refresh(Context context); + + /** + * Trigger run. + * + * @param body Request body for trigger once. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 triggerWithResponse(TriggerOnceRequest body, Context context); + + /** + * Trigger run. + * + * @param body Request body for trigger once. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + TriggerRunSubmissionDto trigger(TriggerOnceRequest body); } 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..e87611024e835 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The ScheduleActionBase model. */ +/** + * The ScheduleActionBase model. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -17,18 +19,21 @@ 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) -}) + @JsonSubTypes.Type(name = "ImportData", value = ImportDataAction.class), + @JsonSubTypes.Type(name = "CreateJob", value = JobScheduleAction.class) }) @Immutable public class ScheduleActionBase { - /** Creates an instance of ScheduleActionBase class. */ + /** + * Creates an instance of ScheduleActionBase class. + */ public ScheduleActionBase() { } /** * 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/ScheduleActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java index 24fe002c87045..390f0e5f1dd1e 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 @@ -8,17 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScheduleActionType. */ +/** + * Defines values for ScheduleActionType. + */ public final class ScheduleActionType extends ExpandableStringEnum { - /** Static value CreateJob for ScheduleActionType. */ + /** + * Static value CreateJob for ScheduleActionType. + */ public static final ScheduleActionType CREATE_JOB = fromString("CreateJob"); - /** Static value InvokeBatchEndpoint for ScheduleActionType. */ + /** + * Static value InvokeBatchEndpoint for ScheduleActionType. + */ public static final ScheduleActionType INVOKE_BATCH_ENDPOINT = fromString("InvokeBatchEndpoint"); + /** + * Static value ImportData for ScheduleActionType. + */ + public static final ScheduleActionType IMPORT_DATA = fromString("ImportData"); + + /** + * Static value CreateMonitor for ScheduleActionType. + */ + public static final ScheduleActionType CREATE_MONITOR = fromString("CreateMonitor"); + /** * Creates a new instance of ScheduleActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +43,7 @@ public ScheduleActionType() { /** * Creates or finds a ScheduleActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScheduleActionType. */ @@ -38,7 +54,7 @@ public static ScheduleActionType fromString(String name) { /** * Gets known ScheduleActionType values. - * + * * @return known ScheduleActionType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java index dfff857537661..44720c0a53464 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ScheduleBase model. */ +/** + * The ScheduleBase model. + */ @Fluent public final class ScheduleBase { /* @@ -28,13 +30,15 @@ public final class ScheduleBase { @JsonProperty(value = "status") private ScheduleStatus status; - /** Creates an instance of ScheduleBase class. */ + /** + * Creates an instance of ScheduleBase class. + */ public ScheduleBase() { } /** * Get the id property: A system assigned id for the schedule. - * + * * @return the id value. */ public String id() { @@ -43,7 +47,7 @@ public String id() { /** * Set the id property: A system assigned id for the schedule. - * + * * @param id the id value to set. * @return the ScheduleBase object itself. */ @@ -54,7 +58,7 @@ public ScheduleBase withId(String id) { /** * Get the provisioningStatus property: The current deployment state of schedule. - * + * * @return the provisioningStatus value. */ public ScheduleProvisioningState provisioningStatus() { @@ -63,7 +67,7 @@ public ScheduleProvisioningState provisioningStatus() { /** * Set the provisioningStatus property: The current deployment state of schedule. - * + * * @param provisioningStatus the provisioningStatus value to set. * @return the ScheduleBase object itself. */ @@ -74,7 +78,7 @@ public ScheduleBase withProvisioningStatus(ScheduleProvisioningState provisionin /** * Get the status property: Is the schedule enabled or disabled?. - * + * * @return the status value. */ public ScheduleStatus status() { @@ -83,7 +87,7 @@ public ScheduleStatus status() { /** * Set the status property: Is the schedule enabled or disabled?. - * + * * @param status the status value to set. * @return the ScheduleBase object itself. */ @@ -94,7 +98,7 @@ public ScheduleBase withStatus(ScheduleStatus status) { /** * 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/ScheduleListViewType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java index a10f3e1b36533..e211c5f85f983 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScheduleListViewType. */ +/** + * Defines values for ScheduleListViewType. + */ public final class ScheduleListViewType extends ExpandableStringEnum { - /** Static value EnabledOnly for ScheduleListViewType. */ + /** + * Static value EnabledOnly for ScheduleListViewType. + */ public static final ScheduleListViewType ENABLED_ONLY = fromString("EnabledOnly"); - /** Static value DisabledOnly for ScheduleListViewType. */ + /** + * Static value DisabledOnly for ScheduleListViewType. + */ public static final ScheduleListViewType DISABLED_ONLY = fromString("DisabledOnly"); - /** Static value All for ScheduleListViewType. */ + /** + * Static value All for ScheduleListViewType. + */ public static final ScheduleListViewType ALL = fromString("All"); /** * Creates a new instance of ScheduleListViewType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ScheduleListViewType() { /** * Creates or finds a ScheduleListViewType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScheduleListViewType. */ @@ -41,7 +49,7 @@ public static ScheduleListViewType fromString(String name) { /** * Gets known ScheduleListViewType values. - * + * * @return known ScheduleListViewType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java index 2e486abeab37b..5d088b3768291 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Base definition of a schedule. */ +/** + * Base definition of a schedule. + */ @Fluent public final class ScheduleProperties extends ResourceBase { /* @@ -42,13 +44,15 @@ public final class ScheduleProperties extends ResourceBase { @JsonProperty(value = "trigger", required = true) private TriggerBase trigger; - /** Creates an instance of ScheduleProperties class. */ + /** + * Creates an instance of ScheduleProperties class. + */ public ScheduleProperties() { } /** * Get the action property: [Required] Specifies the action of the schedule. - * + * * @return the action value. */ public ScheduleActionBase action() { @@ -57,7 +61,7 @@ public ScheduleActionBase action() { /** * Set the action property: [Required] Specifies the action of the schedule. - * + * * @param action the action value to set. * @return the ScheduleProperties object itself. */ @@ -68,7 +72,7 @@ public ScheduleProperties withAction(ScheduleActionBase action) { /** * Get the displayName property: Display name of schedule. - * + * * @return the displayName value. */ public String displayName() { @@ -77,7 +81,7 @@ public String displayName() { /** * Set the displayName property: Display name of schedule. - * + * * @param displayName the displayName value to set. * @return the ScheduleProperties object itself. */ @@ -88,7 +92,7 @@ public ScheduleProperties withDisplayName(String displayName) { /** * Get the isEnabled property: Is the schedule enabled?. - * + * * @return the isEnabled value. */ public Boolean isEnabled() { @@ -97,7 +101,7 @@ public Boolean isEnabled() { /** * Set the isEnabled property: Is the schedule enabled?. - * + * * @param isEnabled the isEnabled value to set. * @return the ScheduleProperties object itself. */ @@ -108,7 +112,7 @@ public ScheduleProperties withIsEnabled(Boolean isEnabled) { /** * Get the provisioningState property: Provisioning state for the schedule. - * + * * @return the provisioningState value. */ public ScheduleProvisioningStatus provisioningState() { @@ -117,7 +121,7 @@ public ScheduleProvisioningStatus provisioningState() { /** * Get the trigger property: [Required] Specifies the trigger details. - * + * * @return the trigger value. */ public TriggerBase trigger() { @@ -126,7 +130,7 @@ public TriggerBase trigger() { /** * Set the trigger property: [Required] Specifies the trigger details. - * + * * @param trigger the trigger value to set. * @return the ScheduleProperties object itself. */ @@ -135,21 +139,27 @@ public ScheduleProperties withTrigger(TriggerBase trigger) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScheduleProperties withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScheduleProperties withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScheduleProperties withTags(Map tags) { super.withTags(tags); @@ -158,23 +168,21 @@ public ScheduleProperties withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (action() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property action in model ScheduleProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property action in model ScheduleProperties")); } else { action().validate(); } if (trigger() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property trigger in model ScheduleProperties")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property trigger in model ScheduleProperties")); } else { trigger().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java index ad887ff8aa516..927241bed16ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The current deployment state of schedule. */ +/** + * The current deployment state of schedule. + */ public final class ScheduleProvisioningState extends ExpandableStringEnum { - /** Static value Completed for ScheduleProvisioningState. */ + /** + * Static value Completed for ScheduleProvisioningState. + */ public static final ScheduleProvisioningState COMPLETED = fromString("Completed"); - /** Static value Provisioning for ScheduleProvisioningState. */ + /** + * Static value Provisioning for ScheduleProvisioningState. + */ public static final ScheduleProvisioningState PROVISIONING = fromString("Provisioning"); - /** Static value Failed for ScheduleProvisioningState. */ + /** + * Static value Failed for ScheduleProvisioningState. + */ public static final ScheduleProvisioningState FAILED = fromString("Failed"); /** * Creates a new instance of ScheduleProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ScheduleProvisioningState() { /** * Creates or finds a ScheduleProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScheduleProvisioningState. */ @@ -41,7 +49,7 @@ public static ScheduleProvisioningState fromString(String name) { /** * Gets known ScheduleProvisioningState values. - * + * * @return known ScheduleProvisioningState values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java index 5f007b3ec15cc..10e65d07a82e6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScheduleProvisioningStatus. */ +/** + * Defines values for ScheduleProvisioningStatus. + */ public final class ScheduleProvisioningStatus extends ExpandableStringEnum { - /** Static value Creating for ScheduleProvisioningStatus. */ + /** + * Static value Creating for ScheduleProvisioningStatus. + */ public static final ScheduleProvisioningStatus CREATING = fromString("Creating"); - /** Static value Updating for ScheduleProvisioningStatus. */ + /** + * Static value Updating for ScheduleProvisioningStatus. + */ public static final ScheduleProvisioningStatus UPDATING = fromString("Updating"); - /** Static value Deleting for ScheduleProvisioningStatus. */ + /** + * Static value Deleting for ScheduleProvisioningStatus. + */ public static final ScheduleProvisioningStatus DELETING = fromString("Deleting"); - /** Static value Succeeded for ScheduleProvisioningStatus. */ + /** + * Static value Succeeded for ScheduleProvisioningStatus. + */ public static final ScheduleProvisioningStatus SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ScheduleProvisioningStatus. */ + /** + * Static value Failed for ScheduleProvisioningStatus. + */ public static final ScheduleProvisioningStatus FAILED = fromString("Failed"); - /** Static value Canceled for ScheduleProvisioningStatus. */ + /** + * Static value Canceled for ScheduleProvisioningStatus. + */ public static final ScheduleProvisioningStatus CANCELED = fromString("Canceled"); /** * Creates a new instance of ScheduleProvisioningStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public ScheduleProvisioningStatus() { /** * Creates or finds a ScheduleProvisioningStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScheduleProvisioningStatus. */ @@ -50,7 +64,7 @@ public static ScheduleProvisioningStatus fromString(String name) { /** * Gets known ScheduleProvisioningStatus values. - * + * * @return known ScheduleProvisioningStatus values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java index b43e188d1ab23..d9b0a936e1950 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of Schedule entities. */ +/** + * A paginated list of Schedule entities. + */ @Fluent public final class ScheduleResourceArmPaginatedResult { /* @@ -24,13 +26,16 @@ public final class ScheduleResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of ScheduleResourceArmPaginatedResult class. */ + /** + * Creates an instance of ScheduleResourceArmPaginatedResult class. + */ public ScheduleResourceArmPaginatedResult() { } /** - * Get the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. - * + * Get the nextLink property: The link to the next page of Schedule objects. If null, there are no additional + * pages. + * * @return the nextLink value. */ public String nextLink() { @@ -38,8 +43,9 @@ public String nextLink() { } /** - * Set the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. - * + * Set the nextLink property: The link to the next page of Schedule objects. If null, there are no additional + * pages. + * * @param nextLink the nextLink value to set. * @return the ScheduleResourceArmPaginatedResult object itself. */ @@ -50,7 +56,7 @@ public ScheduleResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type Schedule. - * + * * @return the value value. */ public List value() { @@ -59,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type Schedule. - * + * * @param value the value value to set. * @return the ScheduleResourceArmPaginatedResult object itself. */ @@ -70,7 +76,7 @@ public ScheduleResourceArmPaginatedResult withValue(List 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/ScheduleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java index a7abf8e3211c8..33e703dae3500 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Is the schedule enabled or disabled?. */ +/** + * Is the schedule enabled or disabled?. + */ public final class ScheduleStatus extends ExpandableStringEnum { - /** Static value Enabled for ScheduleStatus. */ + /** + * Static value Enabled for ScheduleStatus. + */ public static final ScheduleStatus ENABLED = fromString("Enabled"); - /** Static value Disabled for ScheduleStatus. */ + /** + * Static value Disabled for ScheduleStatus. + */ public static final ScheduleStatus DISABLED = fromString("Disabled"); /** * Creates a new instance of ScheduleStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ScheduleStatus() { /** * Creates or finds a ScheduleStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScheduleStatus. */ @@ -38,7 +44,7 @@ public static ScheduleStatus fromString(String name) { /** * Gets known ScheduleStatus values. - * + * * @return known ScheduleStatus values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleType.java new file mode 100644 index 0000000000000..207171524b949 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleType.java @@ -0,0 +1,73 @@ +// Copyright (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 ScheduleType. + */ +public final class ScheduleType extends ExpandableStringEnum { + /** + * Static value ComputeStartStop for ScheduleType. + */ + public static final ScheduleType COMPUTE_START_STOP = fromString("ComputeStartStop"); + + /** + * Static value CreateJob for ScheduleType. + */ + public static final ScheduleType CREATE_JOB = fromString("CreateJob"); + + /** + * Static value InvokeBatchEndpoint for ScheduleType. + */ + public static final ScheduleType INVOKE_BATCH_ENDPOINT = fromString("InvokeBatchEndpoint"); + + /** + * Static value ImportData for ScheduleType. + */ + public static final ScheduleType IMPORT_DATA = fromString("ImportData"); + + /** + * Static value CreateMonitor for ScheduleType. + */ + public static final ScheduleType CREATE_MONITOR = fromString("CreateMonitor"); + + /** + * Static value FeatureStoreMaterialization for ScheduleType. + */ + public static final ScheduleType FEATURE_STORE_MATERIALIZATION = fromString("FeatureStoreMaterialization"); + + /** + * Creates a new instance of ScheduleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScheduleType() { + } + + /** + * Creates or finds a ScheduleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScheduleType. + */ + @JsonCreator + public static ScheduleType fromString(String name) { + return fromString(name, ScheduleType.class); + } + + /** + * Gets known ScheduleType values. + * + * @return known ScheduleType values. + */ + public static Collection values() { + return values(ScheduleType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java index 19f7f86838287..b724d55b3ccea 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Schedules. */ +/** + * Resource collection API of Schedules. + */ public interface Schedules { /** * List schedules in specified 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. @@ -24,7 +26,7 @@ public interface Schedules { /** * List schedules in specified workspace. - * + * * @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. @@ -35,16 +37,12 @@ public interface Schedules { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context); /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -56,7 +54,7 @@ PagedIterable list( /** * Delete schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -69,7 +67,7 @@ PagedIterable list( /** * Get schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -83,7 +81,7 @@ PagedIterable list( /** * Get schedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Schedule name. @@ -94,9 +92,40 @@ PagedIterable list( */ Schedule get(String resourceGroupName, String workspaceName, String name); + /** + * Trigger run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Request body for trigger once. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 triggerWithResponse(String resourceGroupName, String workspaceName, String name, + TriggerOnceRequest body, Context context); + + /** + * Trigger run. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Schedule name. + * @param body Request body for trigger once. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + TriggerRunSubmissionDto trigger(String resourceGroupName, String workspaceName, String name, + TriggerOnceRequest body); + /** * Get schedule. - * + * * @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. @@ -107,7 +136,7 @@ PagedIterable list( /** * Get schedule. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -119,7 +148,7 @@ PagedIterable list( /** * Delete schedule. - * + * * @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. @@ -129,7 +158,7 @@ PagedIterable list( /** * Delete schedule. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -140,7 +169,7 @@ PagedIterable list( /** * Begins definition for a new Schedule resource. - * + * * @param name resource name. * @return the first stage of the new Schedule definition. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java index 8c7ad3d4aa8a7..5418cbed5571e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java @@ -7,11 +7,13 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Script reference. */ +/** + * Script reference. + */ @Fluent public final class ScriptReference { /* - * The storage source of the script: workspace. + * The storage source of the script: inline, workspace. */ @JsonProperty(value = "scriptSource") private String scriptSource; @@ -34,13 +36,15 @@ public final class ScriptReference { @JsonProperty(value = "timeout") private String timeout; - /** Creates an instance of ScriptReference class. */ + /** + * Creates an instance of ScriptReference class. + */ public ScriptReference() { } /** - * Get the scriptSource property: The storage source of the script: workspace. - * + * Get the scriptSource property: The storage source of the script: inline, workspace. + * * @return the scriptSource value. */ public String scriptSource() { @@ -48,8 +52,8 @@ public String scriptSource() { } /** - * Set the scriptSource property: The storage source of the script: workspace. - * + * Set the scriptSource property: The storage source of the script: inline, workspace. + * * @param scriptSource the scriptSource value to set. * @return the ScriptReference object itself. */ @@ -60,7 +64,7 @@ public ScriptReference withScriptSource(String scriptSource) { /** * Get the scriptData property: The location of scripts in the mounted volume. - * + * * @return the scriptData value. */ public String scriptData() { @@ -69,7 +73,7 @@ public String scriptData() { /** * Set the scriptData property: The location of scripts in the mounted volume. - * + * * @param scriptData the scriptData value to set. * @return the ScriptReference object itself. */ @@ -80,7 +84,7 @@ public ScriptReference withScriptData(String scriptData) { /** * Get the scriptArguments property: Optional command line arguments passed to the script to run. - * + * * @return the scriptArguments value. */ public String scriptArguments() { @@ -89,7 +93,7 @@ public String scriptArguments() { /** * Set the scriptArguments property: Optional command line arguments passed to the script to run. - * + * * @param scriptArguments the scriptArguments value to set. * @return the ScriptReference object itself. */ @@ -100,7 +104,7 @@ public ScriptReference withScriptArguments(String scriptArguments) { /** * Get the timeout property: Optional time period passed to timeout command. - * + * * @return the timeout value. */ public String timeout() { @@ -109,7 +113,7 @@ public String timeout() { /** * Set the timeout property: Optional time period passed to timeout command. - * + * * @param timeout the timeout value to set. * @return the ScriptReference object itself. */ @@ -120,7 +124,7 @@ public ScriptReference withTimeout(String timeout) { /** * 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/ScriptsToExecute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java index 5dfd1557e2477..eba3daed4950c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Customized setup scripts. */ +/** + * Customized setup scripts. + */ @Fluent public final class ScriptsToExecute { /* @@ -22,13 +24,15 @@ public final class ScriptsToExecute { @JsonProperty(value = "creationScript") private ScriptReference creationScript; - /** Creates an instance of ScriptsToExecute class. */ + /** + * Creates an instance of ScriptsToExecute class. + */ public ScriptsToExecute() { } /** * Get the startupScript property: Script that's run every time the machine starts. - * + * * @return the startupScript value. */ public ScriptReference startupScript() { @@ -37,7 +41,7 @@ public ScriptReference startupScript() { /** * Set the startupScript property: Script that's run every time the machine starts. - * + * * @param startupScript the startupScript value to set. * @return the ScriptsToExecute object itself. */ @@ -48,7 +52,7 @@ public ScriptsToExecute withStartupScript(ScriptReference startupScript) { /** * Get the creationScript property: Script that's run only once during provision of the compute. - * + * * @return the creationScript value. */ public ScriptReference creationScript() { @@ -57,7 +61,7 @@ public ScriptReference creationScript() { /** * Set the creationScript property: Script that's run only once during provision of the compute. - * + * * @param creationScript the creationScript value to set. * @return the ScriptsToExecute object itself. */ @@ -68,7 +72,7 @@ public ScriptsToExecute withCreationScript(ScriptReference creationScript) { /** * 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/Seasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java index ecb9dc616a660..7fa5de3dde284 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Forecasting seasonality. */ +/** + * Forecasting seasonality. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,17 +20,18 @@ @JsonTypeName("Seasonality") @JsonSubTypes({ @JsonSubTypes.Type(name = "Auto", value = AutoSeasonality.class), - @JsonSubTypes.Type(name = "Custom", value = CustomSeasonality.class) -}) + @JsonSubTypes.Type(name = "Custom", value = CustomSeasonality.class) }) @Immutable public class Seasonality { - /** Creates an instance of Seasonality class. */ + /** + * Creates an instance of Seasonality class. + */ public Seasonality() { } /** * 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/SeasonalityMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java index b75dc02a46167..f2b5f48d2aba4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Forecasting seasonality mode. */ +/** + * Forecasting seasonality mode. + */ public final class SeasonalityMode extends ExpandableStringEnum { - /** Static value Auto for SeasonalityMode. */ + /** + * Static value Auto for SeasonalityMode. + */ public static final SeasonalityMode AUTO = fromString("Auto"); - /** Static value Custom for SeasonalityMode. */ + /** + * Static value Custom for SeasonalityMode. + */ public static final SeasonalityMode CUSTOM = fromString("Custom"); /** * Creates a new instance of SeasonalityMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SeasonalityMode() { /** * Creates or finds a SeasonalityMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding SeasonalityMode. */ @@ -38,7 +44,7 @@ public static SeasonalityMode fromString(String name) { /** * Gets known SeasonalityMode values. - * + * * @return known SeasonalityMode values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretConfiguration.java new file mode 100644 index 0000000000000..f4318ed0dea56 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretConfiguration.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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Secret Configuration definition. + */ +@Fluent +public final class SecretConfiguration { + /* + * Secret Uri. + * Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion + */ + @JsonProperty(value = "uri") + private String uri; + + /* + * Name of secret in workspace key vault. + */ + @JsonProperty(value = "workspaceSecretName") + private String workspaceSecretName; + + /** + * Creates an instance of SecretConfiguration class. + */ + public SecretConfiguration() { + } + + /** + * Get the uri property: Secret Uri. + * Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: Secret Uri. + * Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion. + * + * @param uri the uri value to set. + * @return the SecretConfiguration object itself. + */ + public SecretConfiguration withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Get the workspaceSecretName property: Name of secret in workspace key vault. + * + * @return the workspaceSecretName value. + */ + public String workspaceSecretName() { + return this.workspaceSecretName; + } + + /** + * Set the workspaceSecretName property: Name of secret in workspace key vault. + * + * @param workspaceSecretName the workspaceSecretName value to set. + * @return the SecretConfiguration object itself. + */ + public SecretConfiguration withWorkspaceSecretName(String workspaceSecretName) { + this.workspaceSecretName = workspaceSecretName; + 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/SecretsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java index 39bf275d36524..5471209a84e4a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java @@ -8,23 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum to determine the datastore secrets type. */ +/** + * Enum to determine the datastore secrets type. + */ public final class SecretsType extends ExpandableStringEnum { - /** Static value AccountKey for SecretsType. */ + /** + * Static value AccountKey for SecretsType. + */ public static final SecretsType ACCOUNT_KEY = fromString("AccountKey"); - /** Static value Certificate for SecretsType. */ + /** + * Static value Certificate for SecretsType. + */ public static final SecretsType CERTIFICATE = fromString("Certificate"); - /** Static value Sas for SecretsType. */ + /** + * Static value Sas for SecretsType. + */ public static final SecretsType SAS = fromString("Sas"); - /** Static value ServicePrincipal for SecretsType. */ + /** + * Static value ServicePrincipal for SecretsType. + */ public static final SecretsType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); + /** + * Static value KerberosPassword for SecretsType. + */ + public static final SecretsType KERBEROS_PASSWORD = fromString("KerberosPassword"); + + /** + * Static value KerberosKeytab for SecretsType. + */ + public static final SecretsType KERBEROS_KEYTAB = fromString("KerberosKeytab"); + /** * Creates a new instance of SecretsType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +53,7 @@ public SecretsType() { /** * Creates or finds a SecretsType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SecretsType. */ @@ -44,7 +64,7 @@ public static SecretsType fromString(String name) { /** * Gets known SecretsType values. - * + * * @return known SecretsType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java new file mode 100644 index 0000000000000..462e55c5480c8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.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; + +/** + * The ServerlessComputeSettings model. + */ +@Fluent +public final class ServerlessComputeSettings { + /* + * The resource ID of an existing virtual network subnet in which serverless compute nodes should be deployed + */ + @JsonProperty(value = "serverlessComputeCustomSubnet") + private String serverlessComputeCustomSubnet; + + /* + * The flag to signal if serverless compute nodes deployed in custom vNet would have no public IP addresses for a + * workspace with private endpoint + */ + @JsonProperty(value = "serverlessComputeNoPublicIP") + private Boolean serverlessComputeNoPublicIp; + + /** + * Creates an instance of ServerlessComputeSettings class. + */ + public ServerlessComputeSettings() { + } + + /** + * Get the serverlessComputeCustomSubnet property: The resource ID of an existing virtual network subnet in which + * serverless compute nodes should be deployed. + * + * @return the serverlessComputeCustomSubnet value. + */ + public String serverlessComputeCustomSubnet() { + return this.serverlessComputeCustomSubnet; + } + + /** + * Set the serverlessComputeCustomSubnet property: The resource ID of an existing virtual network subnet in which + * serverless compute nodes should be deployed. + * + * @param serverlessComputeCustomSubnet the serverlessComputeCustomSubnet value to set. + * @return the ServerlessComputeSettings object itself. + */ + public ServerlessComputeSettings withServerlessComputeCustomSubnet(String serverlessComputeCustomSubnet) { + this.serverlessComputeCustomSubnet = serverlessComputeCustomSubnet; + return this; + } + + /** + * Get the serverlessComputeNoPublicIp property: The flag to signal if serverless compute nodes deployed in custom + * vNet would have no public IP addresses for a workspace with private endpoint. + * + * @return the serverlessComputeNoPublicIp value. + */ + public Boolean serverlessComputeNoPublicIp() { + return this.serverlessComputeNoPublicIp; + } + + /** + * Set the serverlessComputeNoPublicIp property: The flag to signal if serverless compute nodes deployed in custom + * vNet would have no public IP addresses for a workspace with private endpoint. + * + * @param serverlessComputeNoPublicIp the serverlessComputeNoPublicIp value to set. + * @return the ServerlessComputeSettings object itself. + */ + public ServerlessComputeSettings withServerlessComputeNoPublicIp(Boolean serverlessComputeNoPublicIp) { + this.serverlessComputeNoPublicIp = serverlessComputeNoPublicIp; + 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/ServerlessEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java new file mode 100644 index 0000000000000..3c01703e82496 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java @@ -0,0 +1,409 @@ +// Copyright (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.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; +import java.util.Map; + +/** + * An immutable client-side representation of ServerlessEndpoint. + */ +public interface ServerlessEndpoint { + /** + * 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 properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + ServerlessEndpointProperties properties(); + + /** + * 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 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.ServerlessEndpointInner object. + * + * @return the inner object. + */ + ServerlessEndpointInner innerModel(); + + /** + * The entirety of the ServerlessEndpoint definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The ServerlessEndpoint definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ServerlessEndpoint definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the ServerlessEndpoint definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the ServerlessEndpoint 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 ServerlessEndpoint 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(ServerlessEndpointProperties properties); + } + + /** + * The stage of the ServerlessEndpoint 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + ServerlessEndpoint create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ServerlessEndpoint create(Context context); + } + + /** + * The stage of the ServerlessEndpoint 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 ServerlessEndpoint 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 ServerlessEndpoint 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 ServerlessEndpoint 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); + } + } + + /** + * Begins update for the ServerlessEndpoint resource. + * + * @return the stage of resource update. + */ + ServerlessEndpoint.Update update(); + + /** + * The template for ServerlessEndpoint update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ServerlessEndpoint apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ServerlessEndpoint apply(Context context); + } + + /** + * The ServerlessEndpoint update stages. + */ + interface UpdateStages { + /** + * The stage of the ServerlessEndpoint 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 ServerlessEndpoint 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(PartialManagedServiceIdentity identity); + } + + /** + * The stage of the ServerlessEndpoint 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. + */ + ServerlessEndpoint refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ServerlessEndpoint refresh(Context context); + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 getStatusWithResponse(Context context); + + /** + * Status of the model backing the Serverless Endpoint. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + ServerlessEndpointStatus getStatus(); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication along with {@link Response}. + */ + Response listKeysWithResponse(Context context); + + /** + * List EndpointAuthKeys for an Endpoint using Key-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. + * @return keys for endpoint authentication. + */ + EndpointAuthKeys listKeys(); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param body RegenerateKeys request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication. + */ + EndpointAuthKeys regenerateKeys(RegenerateEndpointKeysRequest body); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param body RegenerateKeys request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication. + */ + EndpointAuthKeys regenerateKeys(RegenerateEndpointKeysRequest body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java new file mode 100644 index 0000000000000..1fc70ffbe14d9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.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.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ServerlessEndpointCapacityReservation model. + */ +@Fluent +public final class ServerlessEndpointCapacityReservation { + /* + * [Required] Specifies a capacity reservation group ID to allocate capacity from. + */ + @JsonProperty(value = "capacityReservationGroupId", required = true) + private String capacityReservationGroupId; + + /* + * Specifies a capacity amount to reserve for this endpoint within the parent capacity reservation group. + */ + @JsonProperty(value = "endpointReservedCapacity") + private Integer endpointReservedCapacity; + + /** + * Creates an instance of ServerlessEndpointCapacityReservation class. + */ + public ServerlessEndpointCapacityReservation() { + } + + /** + * Get the capacityReservationGroupId property: [Required] Specifies a capacity reservation group ID to allocate + * capacity from. + * + * @return the capacityReservationGroupId value. + */ + public String capacityReservationGroupId() { + return this.capacityReservationGroupId; + } + + /** + * Set the capacityReservationGroupId property: [Required] Specifies a capacity reservation group ID to allocate + * capacity from. + * + * @param capacityReservationGroupId the capacityReservationGroupId value to set. + * @return the ServerlessEndpointCapacityReservation object itself. + */ + public ServerlessEndpointCapacityReservation withCapacityReservationGroupId(String capacityReservationGroupId) { + this.capacityReservationGroupId = capacityReservationGroupId; + return this; + } + + /** + * Get the endpointReservedCapacity property: Specifies a capacity amount to reserve for this endpoint within the + * parent capacity reservation group. + * + * @return the endpointReservedCapacity value. + */ + public Integer endpointReservedCapacity() { + return this.endpointReservedCapacity; + } + + /** + * Set the endpointReservedCapacity property: Specifies a capacity amount to reserve for this endpoint within the + * parent capacity reservation group. + * + * @param endpointReservedCapacity the endpointReservedCapacity value to set. + * @return the ServerlessEndpointCapacityReservation object itself. + */ + public ServerlessEndpointCapacityReservation withEndpointReservedCapacity(Integer endpointReservedCapacity) { + this.endpointReservedCapacity = endpointReservedCapacity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capacityReservationGroupId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property capacityReservationGroupId in model ServerlessEndpointCapacityReservation")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointCapacityReservation.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java new file mode 100644 index 0000000000000..19e39d6fb2e2f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java @@ -0,0 +1,214 @@ +// Copyright (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 ServerlessEndpointProperties model. + */ +@Fluent +public final class ServerlessEndpointProperties { + /* + * Specifies the authentication mode for the Serverless endpoint. + */ + @JsonProperty(value = "authMode") + private ServerlessInferenceEndpointAuthMode authMode; + + /* + * Optional capacity reservation information for the endpoint. When specified, the Serverless Endpoint + * will be allocated capacity from the specified capacity reservation group. + */ + @JsonProperty(value = "capacityReservation") + private ServerlessEndpointCapacityReservation capacityReservation; + + /* + * The inference uri to target when making requests against the serverless endpoint + */ + @JsonProperty(value = "inferenceEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private ServerlessInferenceEndpoint inferenceEndpoint; + + /* + * The MarketplaceSubscription ARM ID associated to this ServerlessEndpoint. + */ + @JsonProperty(value = "marketplaceSubscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private String marketplaceSubscriptionId; + + /* + * The model settings (model id) for the model being serviced on the ServerlessEndpoint. + */ + @JsonProperty(value = "modelSettings") + private ModelSettings modelSettings; + + /* + * The publisher-defined Serverless Offer to provision the endpoint with. + */ + @JsonProperty(value = "offer") + private ServerlessOffer offer; + + /* + * Provisioning state for the endpoint. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private EndpointProvisioningState provisioningState; + + /* + * State of the Serverless Endpoint. + */ + @JsonProperty(value = "endpointState", access = JsonProperty.Access.WRITE_ONLY) + private ServerlessEndpointState endpointState; + + /** + * Creates an instance of ServerlessEndpointProperties class. + */ + public ServerlessEndpointProperties() { + } + + /** + * Get the authMode property: Specifies the authentication mode for the Serverless endpoint. + * + * @return the authMode value. + */ + public ServerlessInferenceEndpointAuthMode authMode() { + return this.authMode; + } + + /** + * Set the authMode property: Specifies the authentication mode for the Serverless endpoint. + * + * @param authMode the authMode value to set. + * @return the ServerlessEndpointProperties object itself. + */ + public ServerlessEndpointProperties withAuthMode(ServerlessInferenceEndpointAuthMode authMode) { + this.authMode = authMode; + return this; + } + + /** + * Get the capacityReservation property: Optional capacity reservation information for the endpoint. When + * specified, the Serverless Endpoint + * will be allocated capacity from the specified capacity reservation group. + * + * @return the capacityReservation value. + */ + public ServerlessEndpointCapacityReservation capacityReservation() { + return this.capacityReservation; + } + + /** + * Set the capacityReservation property: Optional capacity reservation information for the endpoint. When + * specified, the Serverless Endpoint + * will be allocated capacity from the specified capacity reservation group. + * + * @param capacityReservation the capacityReservation value to set. + * @return the ServerlessEndpointProperties object itself. + */ + public ServerlessEndpointProperties + withCapacityReservation(ServerlessEndpointCapacityReservation capacityReservation) { + this.capacityReservation = capacityReservation; + return this; + } + + /** + * Get the inferenceEndpoint property: The inference uri to target when making requests against the serverless + * endpoint. + * + * @return the inferenceEndpoint value. + */ + public ServerlessInferenceEndpoint inferenceEndpoint() { + return this.inferenceEndpoint; + } + + /** + * Get the marketplaceSubscriptionId property: The MarketplaceSubscription ARM ID associated to this + * ServerlessEndpoint. + * + * @return the marketplaceSubscriptionId value. + */ + public String marketplaceSubscriptionId() { + return this.marketplaceSubscriptionId; + } + + /** + * Get the modelSettings property: The model settings (model id) for the model being serviced on the + * ServerlessEndpoint. + * + * @return the modelSettings value. + */ + public ModelSettings modelSettings() { + return this.modelSettings; + } + + /** + * Set the modelSettings property: The model settings (model id) for the model being serviced on the + * ServerlessEndpoint. + * + * @param modelSettings the modelSettings value to set. + * @return the ServerlessEndpointProperties object itself. + */ + public ServerlessEndpointProperties withModelSettings(ModelSettings modelSettings) { + this.modelSettings = modelSettings; + return this; + } + + /** + * Get the offer property: The publisher-defined Serverless Offer to provision the endpoint with. + * + * @return the offer value. + */ + public ServerlessOffer offer() { + return this.offer; + } + + /** + * Set the offer property: The publisher-defined Serverless Offer to provision the endpoint with. + * + * @param offer the offer value to set. + * @return the ServerlessEndpointProperties object itself. + */ + public ServerlessEndpointProperties withOffer(ServerlessOffer offer) { + this.offer = offer; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the endpoint. + * + * @return the provisioningState value. + */ + public EndpointProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the endpointState property: State of the Serverless Endpoint. + * + * @return the endpointState value. + */ + public ServerlessEndpointState endpointState() { + return this.endpointState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capacityReservation() != null) { + capacityReservation().validate(); + } + if (inferenceEndpoint() != null) { + inferenceEndpoint().validate(); + } + if (modelSettings() != null) { + modelSettings().validate(); + } + if (offer() != null) { + offer().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java new file mode 100644 index 0000000000000..e63560856c018 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java @@ -0,0 +1,88 @@ +// Copyright (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; + +/** + * State of the Serverless Endpoint. + */ +public final class ServerlessEndpointState extends ExpandableStringEnum { + /** + * Static value Unknown for ServerlessEndpointState. + */ + public static final ServerlessEndpointState UNKNOWN = fromString("Unknown"); + + /** + * Static value Creating for ServerlessEndpointState. + */ + public static final ServerlessEndpointState CREATING = fromString("Creating"); + + /** + * Static value Deleting for ServerlessEndpointState. + */ + public static final ServerlessEndpointState DELETING = fromString("Deleting"); + + /** + * Static value Suspending for ServerlessEndpointState. + */ + public static final ServerlessEndpointState SUSPENDING = fromString("Suspending"); + + /** + * Static value Reinstating for ServerlessEndpointState. + */ + public static final ServerlessEndpointState REINSTATING = fromString("Reinstating"); + + /** + * Static value Online for ServerlessEndpointState. + */ + public static final ServerlessEndpointState ONLINE = fromString("Online"); + + /** + * Static value Suspended for ServerlessEndpointState. + */ + public static final ServerlessEndpointState SUSPENDED = fromString("Suspended"); + + /** + * Static value CreationFailed for ServerlessEndpointState. + */ + public static final ServerlessEndpointState CREATION_FAILED = fromString("CreationFailed"); + + /** + * Static value DeletionFailed for ServerlessEndpointState. + */ + public static final ServerlessEndpointState DELETION_FAILED = fromString("DeletionFailed"); + + /** + * Creates a new instance of ServerlessEndpointState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServerlessEndpointState() { + } + + /** + * Creates or finds a ServerlessEndpointState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServerlessEndpointState. + */ + @JsonCreator + public static ServerlessEndpointState fromString(String name) { + return fromString(name, ServerlessEndpointState.class); + } + + /** + * Gets known ServerlessEndpointState values. + * + * @return known ServerlessEndpointState values. + */ + public static Collection values() { + return values(ServerlessEndpointState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointStatus.java new file mode 100644 index 0000000000000..fa0578e58734a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointStatus.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointStatusInner; +import java.util.Map; + +/** + * An immutable client-side representation of ServerlessEndpointStatus. + */ +public interface ServerlessEndpointStatus { + /** + * Gets the metrics property: The model-specific metrics from the backing inference endpoint. + * + * @return the metrics value. + */ + Map metrics(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointStatusInner object. + * + * @return the inner object. + */ + ServerlessEndpointStatusInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..e1bf57fd1f9c0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A paginated list of ServerlessEndpoint entities. + */ +@Fluent +public final class ServerlessEndpointTrackedResourceArmPaginatedResult { + /* + * The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * An array of objects of type ServerlessEndpoint. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Creates an instance of ServerlessEndpointTrackedResourceArmPaginatedResult class. + */ + public ServerlessEndpointTrackedResourceArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of ServerlessEndpoint 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 ServerlessEndpoint objects. If null, there are no + * additional pages. + * + * @param nextLink the nextLink value to set. + * @return the ServerlessEndpointTrackedResourceArmPaginatedResult object itself. + */ + public ServerlessEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type ServerlessEndpoint. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type ServerlessEndpoint. + * + * @param value the value value to set. + * @return the ServerlessEndpointTrackedResourceArmPaginatedResult object itself. + */ + public ServerlessEndpointTrackedResourceArmPaginatedResult 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/ServerlessEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java new file mode 100644 index 0000000000000..b5c60b379c0c9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.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.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 ServerlessEndpoints. + */ +public interface ServerlessEndpoints { + /** + * List Serverless Endpoints. + * + * @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 ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List Serverless Endpoints. + * + * @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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name); + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 workspaceName, String name, Context context); + + /** + * Get Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 serverless Endpoint along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); + + /** + * Get Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 serverless Endpoint. + */ + ServerlessEndpoint get(String resourceGroupName, String workspaceName, String name); + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 response body along with {@link Response}. + */ + Response getStatusWithResponse(String resourceGroupName, String workspaceName, + String name, Context context); + + /** + * Status of the model backing the Serverless Endpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 response. + */ + ServerlessEndpointStatus getStatus(String resourceGroupName, String workspaceName, String name); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 keys for endpoint authentication along with {@link Response}. + */ + Response listKeysWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); + + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint 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 keys for endpoint authentication. + */ + EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String name); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication. + */ + EndpointAuthKeys regenerateKeys(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body); + + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Serverless Endpoint name. + * @param body RegenerateKeys request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return keys for endpoint authentication. + */ + EndpointAuthKeys regenerateKeys(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body, Context context); + + /** + * Get Serverless Endpoint. + * + * @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 serverless Endpoint along with {@link Response}. + */ + ServerlessEndpoint getById(String id); + + /** + * Get Serverless Endpoint. + * + * @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 serverless Endpoint along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete Serverless Endpoint (asynchronous). + * + * @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 Serverless Endpoint (asynchronous). + * + * @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 ServerlessEndpoint resource. + * + * @param name resource name. + * @return the first stage of the new ServerlessEndpoint definition. + */ + ServerlessEndpoint.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java new file mode 100644 index 0000000000000..afe990ff4aaeb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.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.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The ServerlessInferenceEndpoint model. + */ +@Fluent +public final class ServerlessInferenceEndpoint { + /* + * Specifies any required headers to target this serverless endpoint. + */ + @JsonProperty(value = "headers", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map headers; + + /* + * [Required] The inference uri to target when making requests against the Serverless Endpoint. + */ + @JsonProperty(value = "uri", required = true) + private String uri; + + /** + * Creates an instance of ServerlessInferenceEndpoint class. + */ + public ServerlessInferenceEndpoint() { + } + + /** + * Get the headers property: Specifies any required headers to target this serverless endpoint. + * + * @return the headers value. + */ + public Map headers() { + return this.headers; + } + + /** + * Get the uri property: [Required] The inference uri to target when making requests against the Serverless + * Endpoint. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: [Required] The inference uri to target when making requests against the Serverless + * Endpoint. + * + * @param uri the uri value to set. + * @return the ServerlessInferenceEndpoint object itself. + */ + public ServerlessInferenceEndpoint withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (uri() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property uri in model ServerlessInferenceEndpoint")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServerlessInferenceEndpoint.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java new file mode 100644 index 0000000000000..eba1e4021f762 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.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; + +/** + * Defines values for ServerlessInferenceEndpointAuthMode. + */ +public final class ServerlessInferenceEndpointAuthMode + extends ExpandableStringEnum { + /** + * Static value Key for ServerlessInferenceEndpointAuthMode. + */ + public static final ServerlessInferenceEndpointAuthMode KEY = fromString("Key"); + + /** + * Static value AAD for ServerlessInferenceEndpointAuthMode. + */ + public static final ServerlessInferenceEndpointAuthMode AAD = fromString("AAD"); + + /** + * Creates a new instance of ServerlessInferenceEndpointAuthMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServerlessInferenceEndpointAuthMode() { + } + + /** + * Creates or finds a ServerlessInferenceEndpointAuthMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServerlessInferenceEndpointAuthMode. + */ + @JsonCreator + public static ServerlessInferenceEndpointAuthMode fromString(String name) { + return fromString(name, ServerlessInferenceEndpointAuthMode.class); + } + + /** + * Gets known ServerlessInferenceEndpointAuthMode values. + * + * @return known ServerlessInferenceEndpointAuthMode values. + */ + public static Collection values() { + return values(ServerlessInferenceEndpointAuthMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java new file mode 100644 index 0000000000000..10e51c3746dac --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.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.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ServerlessOffer model. + */ +@Fluent +public final class ServerlessOffer { + /* + * [Required] The name of the Serverless Offer + */ + @JsonProperty(value = "offerName", required = true) + private String offerName; + + /* + * [Required] Publisher name of the Serverless Offer + */ + @JsonProperty(value = "publisher", required = true) + private String publisher; + + /** + * Creates an instance of ServerlessOffer class. + */ + public ServerlessOffer() { + } + + /** + * Get the offerName property: [Required] The name of the Serverless Offer. + * + * @return the offerName value. + */ + public String offerName() { + return this.offerName; + } + + /** + * Set the offerName property: [Required] The name of the Serverless Offer. + * + * @param offerName the offerName value to set. + * @return the ServerlessOffer object itself. + */ + public ServerlessOffer withOfferName(String offerName) { + this.offerName = offerName; + return this; + } + + /** + * Get the publisher property: [Required] Publisher name of the Serverless Offer. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: [Required] Publisher name of the Serverless Offer. + * + * @param publisher the publisher value to set. + * @return the ServerlessOffer object itself. + */ + public ServerlessOffer withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (offerName() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property offerName in model ServerlessOffer")); + } + if (publisher() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property publisher in model ServerlessOffer")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServerlessOffer.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java new file mode 100644 index 0000000000000..792b4aad316d4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.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 ServiceAccountKeyName. + */ +public final class ServiceAccountKeyName extends ExpandableStringEnum { + /** + * Static value Key1 for ServiceAccountKeyName. + */ + public static final ServiceAccountKeyName KEY1 = fromString("Key1"); + + /** + * Static value Key2 for ServiceAccountKeyName. + */ + public static final ServiceAccountKeyName KEY2 = fromString("Key2"); + + /** + * Creates a new instance of ServiceAccountKeyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceAccountKeyName() { + } + + /** + * Creates or finds a ServiceAccountKeyName from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServiceAccountKeyName. + */ + @JsonCreator + public static ServiceAccountKeyName fromString(String name) { + return fromString(name, ServiceAccountKeyName.class); + } + + /** + * Gets known ServiceAccountKeyName values. + * + * @return known ServiceAccountKeyName values. + */ + public static Collection values() { + return values(ServiceAccountKeyName.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java index b8a1ef1975a74..bbb85bfc59530 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java @@ -8,22 +8,30 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ServiceDataAccessAuthIdentity. */ +/** + * Defines values for ServiceDataAccessAuthIdentity. + */ public final class ServiceDataAccessAuthIdentity extends ExpandableStringEnum { - /** Static value None for ServiceDataAccessAuthIdentity. */ + /** + * Static value None for ServiceDataAccessAuthIdentity. + */ public static final ServiceDataAccessAuthIdentity NONE = fromString("None"); - /** Static value WorkspaceSystemAssignedIdentity for ServiceDataAccessAuthIdentity. */ - public static final ServiceDataAccessAuthIdentity WORKSPACE_SYSTEM_ASSIGNED_IDENTITY = - fromString("WorkspaceSystemAssignedIdentity"); + /** + * Static value WorkspaceSystemAssignedIdentity for ServiceDataAccessAuthIdentity. + */ + public static final ServiceDataAccessAuthIdentity WORKSPACE_SYSTEM_ASSIGNED_IDENTITY + = fromString("WorkspaceSystemAssignedIdentity"); - /** Static value WorkspaceUserAssignedIdentity for ServiceDataAccessAuthIdentity. */ - public static final ServiceDataAccessAuthIdentity WORKSPACE_USER_ASSIGNED_IDENTITY = - fromString("WorkspaceUserAssignedIdentity"); + /** + * Static value WorkspaceUserAssignedIdentity for ServiceDataAccessAuthIdentity. + */ + public static final ServiceDataAccessAuthIdentity WORKSPACE_USER_ASSIGNED_IDENTITY + = fromString("WorkspaceUserAssignedIdentity"); /** * Creates a new instance of ServiceDataAccessAuthIdentity value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -32,7 +40,7 @@ public ServiceDataAccessAuthIdentity() { /** * Creates or finds a ServiceDataAccessAuthIdentity from its string representation. - * + * * @param name a name to look for. * @return the corresponding ServiceDataAccessAuthIdentity. */ @@ -43,7 +51,7 @@ public static ServiceDataAccessAuthIdentity fromString(String name) { /** * Gets known ServiceDataAccessAuthIdentity values. - * + * * @return known ServiceDataAccessAuthIdentity values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java index aceabf00a371f..9ea3f818f3fec 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java @@ -7,22 +7,26 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ServiceManagedResourcesSettings model. */ +/** + * The ServiceManagedResourcesSettings model. + */ @Fluent public final class ServiceManagedResourcesSettings { /* - * The settings for the service managed cosmosdb account. + * The cosmosDb property. */ @JsonProperty(value = "cosmosDb") private CosmosDbSettings cosmosDb; - /** Creates an instance of ServiceManagedResourcesSettings class. */ + /** + * Creates an instance of ServiceManagedResourcesSettings class. + */ public ServiceManagedResourcesSettings() { } /** - * Get the cosmosDb property: The settings for the service managed cosmosdb account. - * + * Get the cosmosDb property: The cosmosDb property. + * * @return the cosmosDb value. */ public CosmosDbSettings cosmosDb() { @@ -30,8 +34,8 @@ public CosmosDbSettings cosmosDb() { } /** - * Set the cosmosDb property: The settings for the service managed cosmosdb account. - * + * Set the cosmosDb property: The cosmosDb property. + * * @param cosmosDb the cosmosDb value to set. * @return the ServiceManagedResourcesSettings object itself. */ @@ -42,7 +46,7 @@ public ServiceManagedResourcesSettings withCosmosDb(CosmosDbSettings cosmosDb) { /** * 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/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java new file mode 100644 index 0000000000000..e82a298371087 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java @@ -0,0 +1,120 @@ +// Copyright (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; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The ServicePrincipalAuthTypeWorkspaceConnectionProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("ServicePrincipal") +@Fluent +public final class ServicePrincipalAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { + /* + * The credentials property. + */ + @JsonProperty(value = "credentials") + private WorkspaceConnectionServicePrincipal credentials; + + /** + * Creates an instance of ServicePrincipalAuthTypeWorkspaceConnectionProperties class. + */ + public ServicePrincipalAuthTypeWorkspaceConnectionProperties() { + } + + /** + * Get the credentials property: The credentials property. + * + * @return the credentials value. + */ + public WorkspaceConnectionServicePrincipal credentials() { + return this.credentials; + } + + /** + * Set the credentials property: The credentials property. + * + * @param credentials the credentials value to set. + * @return the ServicePrincipalAuthTypeWorkspaceConnectionProperties object itself. + */ + public ServicePrincipalAuthTypeWorkspaceConnectionProperties + withCredentials(WorkspaceConnectionServicePrincipal credentials) { + this.credentials = credentials; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (credentials() != null) { + credentials().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java index f8898ec7e7449..0a7c3749fdeca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.UUID; -/** Service Principal datastore credentials configuration. */ +/** + * Service Principal datastore credentials configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") @JsonTypeName("ServicePrincipal") @Fluent @@ -37,7 +39,7 @@ public final class ServicePrincipalDatastoreCredentials extends DatastoreCredent /* * [Required] Service principal secrets. */ - @JsonProperty(value = "secrets", required = true) + @JsonProperty(value = "secrets") private ServicePrincipalDatastoreSecrets secrets; /* @@ -46,13 +48,15 @@ public final class ServicePrincipalDatastoreCredentials extends DatastoreCredent @JsonProperty(value = "tenantId", required = true) private UUID tenantId; - /** Creates an instance of ServicePrincipalDatastoreCredentials class. */ + /** + * Creates an instance of ServicePrincipalDatastoreCredentials class. + */ public ServicePrincipalDatastoreCredentials() { } /** * Get the authorityUrl property: Authority URL used for authentication. - * + * * @return the authorityUrl value. */ public String authorityUrl() { @@ -61,7 +65,7 @@ public String authorityUrl() { /** * Set the authorityUrl property: Authority URL used for authentication. - * + * * @param authorityUrl the authorityUrl value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ @@ -72,7 +76,7 @@ public ServicePrincipalDatastoreCredentials withAuthorityUrl(String authorityUrl /** * Get the clientId property: [Required] Service principal client ID. - * + * * @return the clientId value. */ public UUID clientId() { @@ -81,7 +85,7 @@ public UUID clientId() { /** * Set the clientId property: [Required] Service principal client ID. - * + * * @param clientId the clientId value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ @@ -92,7 +96,7 @@ public ServicePrincipalDatastoreCredentials withClientId(UUID clientId) { /** * Get the resourceUrl property: Resource the service principal has access to. - * + * * @return the resourceUrl value. */ public String resourceUrl() { @@ -101,7 +105,7 @@ public String resourceUrl() { /** * Set the resourceUrl property: Resource the service principal has access to. - * + * * @param resourceUrl the resourceUrl value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ @@ -112,7 +116,7 @@ public ServicePrincipalDatastoreCredentials withResourceUrl(String resourceUrl) /** * Get the secrets property: [Required] Service principal secrets. - * + * * @return the secrets value. */ public ServicePrincipalDatastoreSecrets secrets() { @@ -121,7 +125,7 @@ public ServicePrincipalDatastoreSecrets secrets() { /** * Set the secrets property: [Required] Service principal secrets. - * + * * @param secrets the secrets value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ @@ -132,7 +136,7 @@ public ServicePrincipalDatastoreCredentials withSecrets(ServicePrincipalDatastor /** * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. - * + * * @return the tenantId value. */ public UUID tenantId() { @@ -141,7 +145,7 @@ public UUID tenantId() { /** * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. - * + * * @param tenantId the tenantId value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ @@ -152,31 +156,25 @@ public ServicePrincipalDatastoreCredentials withTenantId(UUID tenantId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (clientId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clientId in model ServicePrincipalDatastoreCredentials")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clientId in model ServicePrincipalDatastoreCredentials")); } if (secrets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secrets in model ServicePrincipalDatastoreCredentials")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property secrets in model ServicePrincipalDatastoreCredentials")); } else { secrets().validate(); } if (tenantId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property tenantId in model ServicePrincipalDatastoreCredentials")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property tenantId in model ServicePrincipalDatastoreCredentials")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java index 8b4dcd3f879ab..931600bbf7d87 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Datastore Service Principal secrets. */ +/** + * Datastore Service Principal secrets. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") @JsonTypeName("ServicePrincipal") @Fluent @@ -21,13 +23,15 @@ public final class ServicePrincipalDatastoreSecrets extends DatastoreSecretsInne @JsonProperty(value = "clientSecret") private String clientSecret; - /** Creates an instance of ServicePrincipalDatastoreSecrets class. */ + /** + * Creates an instance of ServicePrincipalDatastoreSecrets class. + */ public ServicePrincipalDatastoreSecrets() { } /** * Get the clientSecret property: Service principal secret. - * + * * @return the clientSecret value. */ public String clientSecret() { @@ -36,7 +40,7 @@ public String clientSecret() { /** * Set the clientSecret property: Service principal secret. - * + * * @param clientSecret the clientSecret value to set. * @return the ServicePrincipalDatastoreSecrets object itself. */ @@ -47,7 +51,7 @@ public ServicePrincipalDatastoreSecrets withClientSecret(String clientSecret) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java new file mode 100644 index 0000000000000..636bf3540e20f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java @@ -0,0 +1,148 @@ +// Copyright (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; + +/** + * Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. + */ +@Fluent +public final class ServiceTagDestination { + /* + * The action enum for networking rule. + */ + @JsonProperty(value = "action") + private RuleAction action; + + /* + * Optional, if provided, the ServiceTag property will be ignored. + */ + @JsonProperty(value = "addressPrefixes", access = JsonProperty.Access.WRITE_ONLY) + private List 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..a69dae7044b5e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.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.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/SetupScripts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java index 761f98594eea7..9ec145e9efc5a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Details of customized scripts to execute for setting up the cluster. */ +/** + * Details of customized scripts to execute for setting up the cluster. + */ @Fluent public final class SetupScripts { /* @@ -16,13 +18,15 @@ public final class SetupScripts { @JsonProperty(value = "scripts") private ScriptsToExecute scripts; - /** Creates an instance of SetupScripts class. */ + /** + * Creates an instance of SetupScripts class. + */ public SetupScripts() { } /** * Get the scripts property: Customized setup scripts. - * + * * @return the scripts value. */ public ScriptsToExecute scripts() { @@ -31,7 +35,7 @@ public ScriptsToExecute scripts() { /** * Set the scripts property: Customized setup scripts. - * + * * @param scripts the scripts value to set. * @return the SetupScripts object itself. */ @@ -42,7 +46,7 @@ public SetupScripts withScripts(ScriptsToExecute scripts) { /** * 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/SharedPrivateLinkResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java index 46ec2f251384d..10e08a5df2774 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java @@ -8,28 +8,32 @@ import com.azure.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty; import com.fasterxml.jackson.annotation.JsonProperty; -/** The SharedPrivateLinkResource model. */ +/** + * The SharedPrivateLinkResource model. + */ @Fluent public final class SharedPrivateLinkResource { /* - * Unique name of the private link. + * Unique name of the private link */ @JsonProperty(value = "name") private String name; /* - * Resource properties. + * Properties of a shared private link resource. */ @JsonProperty(value = "properties") private SharedPrivateLinkResourceProperty innerProperties; - /** Creates an instance of SharedPrivateLinkResource class. */ + /** + * Creates an instance of SharedPrivateLinkResource class. + */ public SharedPrivateLinkResource() { } /** * Get the name property: Unique name of the private link. - * + * * @return the name value. */ public String name() { @@ -38,7 +42,7 @@ public String name() { /** * Set the name property: Unique name of the private link. - * + * * @param name the name value to set. * @return the SharedPrivateLinkResource object itself. */ @@ -48,8 +52,8 @@ public SharedPrivateLinkResource withName(String name) { } /** - * Get the innerProperties property: Resource properties. - * + * Get the innerProperties property: Properties of a shared private link resource. + * * @return the innerProperties value. */ private SharedPrivateLinkResourceProperty innerProperties() { @@ -57,54 +61,54 @@ private SharedPrivateLinkResourceProperty innerProperties() { } /** - * Get the privateLinkResourceId property: The resource id that private link links to. - * - * @return the privateLinkResourceId value. + * Get the groupId property: group id of the private link. + * + * @return the groupId value. */ - public String privateLinkResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkResourceId(); + public String groupId() { + return this.innerProperties() == null ? null : this.innerProperties().groupId(); } /** - * Set the privateLinkResourceId property: The resource id that private link links to. - * - * @param privateLinkResourceId the privateLinkResourceId value to set. + * Set the groupId property: group id of the private link. + * + * @param groupId the groupId value to set. * @return the SharedPrivateLinkResource object itself. */ - public SharedPrivateLinkResource withPrivateLinkResourceId(String privateLinkResourceId) { + public SharedPrivateLinkResource withGroupId(String groupId) { if (this.innerProperties() == null) { this.innerProperties = new SharedPrivateLinkResourceProperty(); } - this.innerProperties().withPrivateLinkResourceId(privateLinkResourceId); + this.innerProperties().withGroupId(groupId); return this; } /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. + * Get the privateLinkResourceId property: the resource id that private link links to. + * + * @return the privateLinkResourceId value. */ - public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); + public String privateLinkResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkResourceId(); } /** - * Set the groupId property: The private link resource group id. - * - * @param groupId the groupId value to set. + * Set the privateLinkResourceId property: the resource id that private link links to. + * + * @param privateLinkResourceId the privateLinkResourceId value to set. * @return the SharedPrivateLinkResource object itself. */ - public SharedPrivateLinkResource withGroupId(String groupId) { + public SharedPrivateLinkResource withPrivateLinkResourceId(String privateLinkResourceId) { if (this.innerProperties() == null) { this.innerProperties = new SharedPrivateLinkResourceProperty(); } - this.innerProperties().withGroupId(groupId); + this.innerProperties().withPrivateLinkResourceId(privateLinkResourceId); return this; } /** * Get the requestMessage property: Request message. - * + * * @return the requestMessage value. */ public String requestMessage() { @@ -113,7 +117,7 @@ public String requestMessage() { /** * Set the requestMessage property: Request message. - * + * * @param requestMessage the requestMessage value to set. * @return the SharedPrivateLinkResource object itself. */ @@ -126,23 +130,21 @@ public SharedPrivateLinkResource withRequestMessage(String requestMessage) { } /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * + * Get the status property: Connection status of the service consumer with the service provider. + * * @return the status value. */ - public PrivateEndpointServiceConnectionStatus status() { + public EndpointServiceConnectionStatus status() { return this.innerProperties() == null ? null : this.innerProperties().status(); } /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * + * Set the status property: Connection status of the service consumer with the service provider. + * * @param status the status value to set. * @return the SharedPrivateLinkResource object itself. */ - public SharedPrivateLinkResource withStatus(PrivateEndpointServiceConnectionStatus status) { + public SharedPrivateLinkResource withStatus(EndpointServiceConnectionStatus status) { if (this.innerProperties() == null) { this.innerProperties = new SharedPrivateLinkResourceProperty(); } @@ -152,7 +154,7 @@ public SharedPrivateLinkResource withStatus(PrivateEndpointServiceConnectionStat /** * 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/ShortSeriesHandlingConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java index 2ff1fd6f8e2ee..5308b7ae81c7e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The parameter defining how if AutoML should handle short time series. */ +/** + * The parameter defining how if AutoML should handle short time series. + */ public final class ShortSeriesHandlingConfiguration extends ExpandableStringEnum { - /** Static value None for ShortSeriesHandlingConfiguration. */ + /** + * Static value None for ShortSeriesHandlingConfiguration. + */ public static final ShortSeriesHandlingConfiguration NONE = fromString("None"); - /** Static value Auto for ShortSeriesHandlingConfiguration. */ + /** + * Static value Auto for ShortSeriesHandlingConfiguration. + */ public static final ShortSeriesHandlingConfiguration AUTO = fromString("Auto"); - /** Static value Pad for ShortSeriesHandlingConfiguration. */ + /** + * Static value Pad for ShortSeriesHandlingConfiguration. + */ public static final ShortSeriesHandlingConfiguration PAD = fromString("Pad"); - /** Static value Drop for ShortSeriesHandlingConfiguration. */ + /** + * Static value Drop for ShortSeriesHandlingConfiguration. + */ public static final ShortSeriesHandlingConfiguration DROP = fromString("Drop"); /** * Creates a new instance of ShortSeriesHandlingConfiguration value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ShortSeriesHandlingConfiguration() { /** * Creates or finds a ShortSeriesHandlingConfiguration from its string representation. - * + * * @param name a name to look for. * @return the corresponding ShortSeriesHandlingConfiguration. */ @@ -44,7 +54,7 @@ public static ShortSeriesHandlingConfiguration fromString(String name) { /** * Gets known ShortSeriesHandlingConfiguration values. - * + * * @return known ShortSeriesHandlingConfiguration values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java index 81a4a2701f804..db1ed9a15b6a3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The resource model definition representing SKU. */ +/** + * The resource model definition representing SKU. + */ @Fluent public final class Sku { /* @@ -44,13 +46,15 @@ public final class Sku { @JsonProperty(value = "capacity") private Integer capacity; - /** Creates an instance of Sku class. */ + /** + * Creates an instance of Sku class. + */ public Sku() { } /** * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * + * * @return the name value. */ public String name() { @@ -59,7 +63,7 @@ public String name() { /** * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * + * * @param name the name value to set. * @return the Sku object itself. */ @@ -71,7 +75,7 @@ public Sku withName(String name) { /** * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more * than one tier, but is not required on a PUT. - * + * * @return the tier value. */ public SkuTier tier() { @@ -81,7 +85,7 @@ public SkuTier tier() { /** * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more * than one tier, but is not required on a PUT. - * + * * @param tier the tier value to set. * @return the Sku object itself. */ @@ -93,7 +97,7 @@ public Sku withTier(SkuTier tier) { /** * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this * would be the standalone code. - * + * * @return the size value. */ public String size() { @@ -103,7 +107,7 @@ public String size() { /** * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this * would be the standalone code. - * + * * @param size the size value to set. * @return the Sku object itself. */ @@ -113,9 +117,9 @@ public Sku withSize(String size) { } /** - * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * + * Get the family property: If the service has different generations of hardware, for the same SKU, then that can + * be captured here. + * * @return the family value. */ public String family() { @@ -123,9 +127,9 @@ public String family() { } /** - * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * + * Set the family property: If the service has different generations of hardware, for the same SKU, then that can + * be captured here. + * * @param family the family value to set. * @return the Sku object itself. */ @@ -137,7 +141,7 @@ public Sku withFamily(String family) { /** * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If * scale out/in is not possible for the resource this may be omitted. - * + * * @return the capacity value. */ public Integer capacity() { @@ -147,7 +151,7 @@ public Integer capacity() { /** * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If * scale out/in is not possible for the resource this may be omitted. - * + * * @param capacity the capacity value to set. * @return the Sku object itself. */ @@ -158,7 +162,7 @@ public Sku withCapacity(Integer capacity) { /** * 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/SkuCapacity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java index 4948ce477871c..40323bf9359bc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** SKU capacity information. */ +/** + * SKU capacity information. + */ @Fluent public final class SkuCapacity { /* @@ -34,13 +36,15 @@ public final class SkuCapacity { @JsonProperty(value = "scaleType") private SkuScaleType scaleType; - /** Creates an instance of SkuCapacity class. */ + /** + * Creates an instance of SkuCapacity class. + */ public SkuCapacity() { } /** * Get the defaultProperty property: Gets or sets the default capacity. - * + * * @return the defaultProperty value. */ public Integer defaultProperty() { @@ -49,7 +53,7 @@ public Integer defaultProperty() { /** * Set the defaultProperty property: Gets or sets the default capacity. - * + * * @param defaultProperty the defaultProperty value to set. * @return the SkuCapacity object itself. */ @@ -60,7 +64,7 @@ public SkuCapacity withDefaultProperty(Integer defaultProperty) { /** * Get the maximum property: Gets or sets the maximum. - * + * * @return the maximum value. */ public Integer maximum() { @@ -69,7 +73,7 @@ public Integer maximum() { /** * Set the maximum property: Gets or sets the maximum. - * + * * @param maximum the maximum value to set. * @return the SkuCapacity object itself. */ @@ -80,7 +84,7 @@ public SkuCapacity withMaximum(Integer maximum) { /** * Get the minimum property: Gets or sets the minimum. - * + * * @return the minimum value. */ public Integer minimum() { @@ -89,7 +93,7 @@ public Integer minimum() { /** * Set the minimum property: Gets or sets the minimum. - * + * * @param minimum the minimum value to set. * @return the SkuCapacity object itself. */ @@ -100,7 +104,7 @@ public SkuCapacity withMinimum(Integer minimum) { /** * Get the scaleType property: Gets or sets the type of the scale. - * + * * @return the scaleType value. */ public SkuScaleType scaleType() { @@ -109,7 +113,7 @@ public SkuScaleType scaleType() { /** * Set the scaleType property: Gets or sets the type of the scale. - * + * * @param scaleType the scaleType value to set. * @return the SkuCapacity object itself. */ @@ -120,7 +124,7 @@ public SkuCapacity withScaleType(SkuScaleType scaleType) { /** * 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/SkuResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java index 40eb8b46ed0db..955f61f309ea5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -/** An immutable client-side representation of SkuResource. */ +/** + * An immutable client-side representation of SkuResource. + */ public interface SkuResource { /** * Gets the capacity property: Gets or sets the Sku Capacity. - * + * * @return the capacity value. */ SkuCapacity capacity(); /** * Gets the resourceType property: The resource type name. - * + * * @return the resourceType value. */ String resourceType(); /** * Gets the sku property: Gets or sets the Sku. - * + * * @return the sku value. */ SkuSetting sku(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner object. - * + * * @return the inner object. */ SkuResourceInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java index 33f198f1dfb7f..5b091a194f5d4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A paginated list of SkuResource entities. */ +/** + * A paginated list of SkuResource entities. + */ @Fluent public final class SkuResourceArmPaginatedResult { /* @@ -24,14 +26,16 @@ public final class SkuResourceArmPaginatedResult { @JsonProperty(value = "value") private List value; - /** Creates an instance of SkuResourceArmPaginatedResult class. */ + /** + * Creates an instance of SkuResourceArmPaginatedResult class. + */ public SkuResourceArmPaginatedResult() { } /** * Get the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional * pages. - * + * * @return the nextLink value. */ public String nextLink() { @@ -41,7 +45,7 @@ public String nextLink() { /** * Set the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional * pages. - * + * * @param nextLink the nextLink value to set. * @return the SkuResourceArmPaginatedResult object itself. */ @@ -52,7 +56,7 @@ public SkuResourceArmPaginatedResult withNextLink(String nextLink) { /** * Get the value property: An array of objects of type SkuResource. - * + * * @return the value value. */ public List value() { @@ -61,7 +65,7 @@ public List value() { /** * Set the value property: An array of objects of type SkuResource. - * + * * @param value the value value to set. * @return the SkuResourceArmPaginatedResult object itself. */ @@ -72,7 +76,7 @@ public SkuResourceArmPaginatedResult withValue(List 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/SkuScaleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java index 65e5e32d1e553..978577614a9e3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Node scaling setting for the compute sku. */ +/** + * Node scaling setting for the compute sku. + */ public final class SkuScaleType extends ExpandableStringEnum { - /** Static value Automatic for SkuScaleType. */ + /** + * Static value Automatic for SkuScaleType. + */ public static final SkuScaleType AUTOMATIC = fromString("Automatic"); - /** Static value Manual for SkuScaleType. */ + /** + * Static value Manual for SkuScaleType. + */ public static final SkuScaleType MANUAL = fromString("Manual"); - /** Static value None for SkuScaleType. */ + /** + * Static value None for SkuScaleType. + */ public static final SkuScaleType NONE = fromString("None"); /** * Creates a new instance of SkuScaleType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public SkuScaleType() { /** * Creates or finds a SkuScaleType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SkuScaleType. */ @@ -41,7 +49,7 @@ public static SkuScaleType fromString(String name) { /** * Gets known SkuScaleType values. - * + * * @return known SkuScaleType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java index ab0554e107637..9a43123eb7545 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** SkuSetting fulfills the need for stripped down SKU info in ARM contract. */ +/** + * SkuSetting fulfills the need for stripped down SKU info in ARM contract. + */ @Fluent public final class SkuSetting { /* @@ -24,13 +26,15 @@ public final class SkuSetting { @JsonProperty(value = "tier") private SkuTier tier; - /** Creates an instance of SkuSetting class. */ + /** + * Creates an instance of SkuSetting class. + */ public SkuSetting() { } /** * Get the name property: [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - * + * * @return the name value. */ public String name() { @@ -39,7 +43,7 @@ public String name() { /** * Set the name property: [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - * + * * @param name the name value to set. * @return the SkuSetting object itself. */ @@ -51,7 +55,7 @@ public SkuSetting withName(String name) { /** * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more * than one tier, but is not required on a PUT. - * + * * @return the tier value. */ public SkuTier tier() { @@ -61,7 +65,7 @@ public SkuTier tier() { /** * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more * than one tier, but is not required on a PUT. - * + * * @param tier the tier value to set. * @return the SkuSetting object itself. */ @@ -72,14 +76,13 @@ public SkuSetting withTier(SkuTier tier) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model SkuSetting")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model SkuSetting")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java index 60ccbff0c23ff..517d338c2547a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java @@ -12,19 +12,29 @@ * required on a PUT. */ public enum SkuTier { - /** Enum value Free. */ + /** + * Enum value Free. + */ FREE("Free"), - /** Enum value Basic. */ + /** + * Enum value Basic. + */ BASIC("Basic"), - /** Enum value Standard. */ + /** + * Enum value Standard. + */ STANDARD("Standard"), - /** Enum value Premium. */ + /** + * Enum value Premium. + */ PREMIUM("Premium"); - /** The actual serialized value for a SkuTier instance. */ + /** + * The actual serialized value for a SkuTier instance. + */ private final String value; SkuTier(String value) { @@ -33,7 +43,7 @@ public enum SkuTier { /** * Parses a serialized value to a SkuTier instance. - * + * * @param value the serialized value to parse. * @return the parsed SkuTier object, or null if unable to parse. */ @@ -51,7 +61,9 @@ public static SkuTier fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java index 8499987e169b5..58b0110c6134f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Data source type. */ +/** + * Data source type. + */ public final class SourceType extends ExpandableStringEnum { - /** Static value Dataset for SourceType. */ + /** + * Static value Dataset for SourceType. + */ public static final SourceType DATASET = fromString("Dataset"); - /** Static value Datastore for SourceType. */ + /** + * Static value Datastore for SourceType. + */ public static final SourceType DATASTORE = fromString("Datastore"); - /** Static value URI for SourceType. */ + /** + * Static value URI for SourceType. + */ public static final SourceType URI = fromString("URI"); /** * Creates a new instance of SourceType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public SourceType() { /** * Creates or finds a SourceType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SourceType. */ @@ -41,7 +49,7 @@ public static SourceType fromString(String name) { /** * Gets known SourceType values. - * + * * @return known SourceType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java new file mode 100644 index 0000000000000..3c55d47e49d94 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java @@ -0,0 +1,546 @@ +// Copyright (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; + +/** + * Spark job definition. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") +@JsonTypeName("Spark") +@Fluent +public final class SparkJob extends JobBaseProperties { + /* + * Archive files used in the job. + */ + @JsonProperty(value = "archives") + private List archives; + + /* + * Arguments for the job. + */ + @JsonProperty(value = "args") + private String args; + + /* + * [Required] ARM resource ID of the code asset. + */ + @JsonProperty(value = "codeId", required = true) + private String codeId; + + /* + * Spark configured properties. + */ + @JsonProperty(value = "conf") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map conf; + + /* + * [Required] The entry to execute on startup of the job. + */ + @JsonProperty(value = "entry", required = true) + private SparkJobEntry entry; + + /* + * The ARM resource ID of the Environment specification for the job. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * Environment variables included in the job. + */ + @JsonProperty(value = "environmentVariables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * Files used in the job. + */ + @JsonProperty(value = "files") + private List files; + + /* + * Mapping of input data bindings used in the job. + */ + @JsonProperty(value = "inputs") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map inputs; + + /* + * Jar files used in the job. + */ + @JsonProperty(value = "jars") + private List jars; + + /* + * Mapping of output data bindings used in the job. + */ + @JsonProperty(value = "outputs") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map outputs; + + /* + * Python files used in the job. + */ + @JsonProperty(value = "pyFiles") + private List pyFiles; + + /* + * Queue settings for the job + */ + @JsonProperty(value = "queueSettings") + private QueueSettings queueSettings; + + /* + * Compute Resource configuration for the job. + */ + @JsonProperty(value = "resources") + private SparkResourceConfiguration resources; + + /** + * Creates an instance of SparkJob class. + */ + public SparkJob() { + } + + /** + * Get the archives property: Archive files used in the job. + * + * @return the archives value. + */ + public List archives() { + return this.archives; + } + + /** + * Set the archives property: Archive files used in the job. + * + * @param archives the archives value to set. + * @return the SparkJob object itself. + */ + public SparkJob withArchives(List archives) { + this.archives = archives; + return this; + } + + /** + * Get the args property: Arguments for the job. + * + * @return the args value. + */ + public String args() { + return this.args; + } + + /** + * Set the args property: Arguments for the job. + * + * @param args the args value to set. + * @return the SparkJob object itself. + */ + public SparkJob withArgs(String args) { + this.args = args; + return this; + } + + /** + * Get the codeId property: [Required] ARM resource ID of the code asset. + * + * @return the codeId value. + */ + public String codeId() { + return this.codeId; + } + + /** + * Set the codeId property: [Required] ARM resource ID of the code asset. + * + * @param codeId the codeId value to set. + * @return the SparkJob object itself. + */ + public SparkJob withCodeId(String codeId) { + this.codeId = codeId; + return this; + } + + /** + * Get the conf property: Spark configured properties. + * + * @return the conf value. + */ + public Map conf() { + return this.conf; + } + + /** + * Set the conf property: Spark configured properties. + * + * @param conf the conf value to set. + * @return the SparkJob object itself. + */ + public SparkJob withConf(Map conf) { + this.conf = conf; + return this; + } + + /** + * Get the entry property: [Required] The entry to execute on startup of the job. + * + * @return the entry value. + */ + public SparkJobEntry entry() { + return this.entry; + } + + /** + * Set the entry property: [Required] The entry to execute on startup of the job. + * + * @param entry the entry value to set. + * @return the SparkJob object itself. + */ + public SparkJob withEntry(SparkJobEntry entry) { + this.entry = entry; + return this; + } + + /** + * Get the environmentId property: The ARM resource ID of the Environment specification for the job. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: The ARM resource ID of the Environment specification for the job. + * + * @param environmentId the environmentId value to set. + * @return the SparkJob object itself. + */ + public SparkJob withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the environmentVariables property: Environment variables included in the job. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment variables included in the job. + * + * @param environmentVariables the environmentVariables value to set. + * @return the SparkJob object itself. + */ + public SparkJob withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the files property: Files used in the job. + * + * @return the files value. + */ + public List files() { + return this.files; + } + + /** + * Set the files property: Files used in the job. + * + * @param files the files value to set. + * @return the SparkJob object itself. + */ + public SparkJob withFiles(List files) { + this.files = files; + return this; + } + + /** + * Get the inputs property: Mapping of input data bindings used in the job. + * + * @return the inputs value. + */ + public Map inputs() { + return this.inputs; + } + + /** + * Set the inputs property: Mapping of input data bindings used in the job. + * + * @param inputs the inputs value to set. + * @return the SparkJob object itself. + */ + public SparkJob withInputs(Map inputs) { + this.inputs = inputs; + return this; + } + + /** + * Get the jars property: Jar files used in the job. + * + * @return the jars value. + */ + public List jars() { + return this.jars; + } + + /** + * Set the jars property: Jar files used in the job. + * + * @param jars the jars value to set. + * @return the SparkJob object itself. + */ + public SparkJob withJars(List jars) { + this.jars = jars; + return this; + } + + /** + * Get the outputs property: Mapping of output data bindings used in the job. + * + * @return the outputs value. + */ + public Map outputs() { + return this.outputs; + } + + /** + * Set the outputs property: Mapping of output data bindings used in the job. + * + * @param outputs the outputs value to set. + * @return the SparkJob object itself. + */ + public SparkJob withOutputs(Map outputs) { + this.outputs = outputs; + return this; + } + + /** + * Get the pyFiles property: Python files used in the job. + * + * @return the pyFiles value. + */ + public List pyFiles() { + return this.pyFiles; + } + + /** + * Set the pyFiles property: Python files used in the job. + * + * @param pyFiles the pyFiles value to set. + * @return the SparkJob object itself. + */ + public SparkJob withPyFiles(List pyFiles) { + this.pyFiles = pyFiles; + 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 SparkJob object itself. + */ + public SparkJob withQueueSettings(QueueSettings queueSettings) { + this.queueSettings = queueSettings; + return this; + } + + /** + * Get the resources property: Compute Resource configuration for the job. + * + * @return the resources value. + */ + public SparkResourceConfiguration resources() { + return this.resources; + } + + /** + * Set the resources property: Compute Resource configuration for the job. + * + * @param resources the resources value to set. + * @return the SparkJob object itself. + */ + public SparkJob withResources(SparkResourceConfiguration resources) { + this.resources = resources; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withComputeId(String computeId) { + super.withComputeId(computeId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withSecretsConfiguration(Map secretsConfiguration) { + super.withSecretsConfiguration(secretsConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withServices(Map services) { + super.withServices(services); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SparkJob 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 (codeId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property codeId in model SparkJob")); + } + if (entry() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property entry in model SparkJob")); + } else { + entry().validate(); + } + if (inputs() != null) { + inputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (outputs() != null) { + outputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (queueSettings() != null) { + queueSettings().validate(); + } + if (resources() != null) { + resources().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SparkJob.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java new file mode 100644 index 0000000000000..fca062bff233e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Spark job entry point definition. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "sparkJobEntryType", + defaultImpl = SparkJobEntry.class) +@JsonTypeName("SparkJobEntry") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SparkJobPythonEntry", value = SparkJobPythonEntry.class), + @JsonSubTypes.Type(name = "SparkJobScalaEntry", value = SparkJobScalaEntry.class) }) +@Immutable +public class SparkJobEntry { + /** + * Creates an instance of SparkJobEntry class. + */ + public SparkJobEntry() { + } + + /** + * 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/SparkJobEntryType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java new file mode 100644 index 0000000000000..8940e45e3d4f9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.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 SparkJobEntryType. + */ +public final class SparkJobEntryType extends ExpandableStringEnum { + /** + * Static value SparkJobPythonEntry for SparkJobEntryType. + */ + public static final SparkJobEntryType SPARK_JOB_PYTHON_ENTRY = fromString("SparkJobPythonEntry"); + + /** + * Static value SparkJobScalaEntry for SparkJobEntryType. + */ + public static final SparkJobEntryType SPARK_JOB_SCALA_ENTRY = fromString("SparkJobScalaEntry"); + + /** + * Creates a new instance of SparkJobEntryType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SparkJobEntryType() { + } + + /** + * Creates or finds a SparkJobEntryType from its string representation. + * + * @param name a name to look for. + * @return the corresponding SparkJobEntryType. + */ + @JsonCreator + public static SparkJobEntryType fromString(String name) { + return fromString(name, SparkJobEntryType.class); + } + + /** + * Gets known SparkJobEntryType values. + * + * @return known SparkJobEntryType values. + */ + public static Collection values() { + return values(SparkJobEntryType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java new file mode 100644 index 0000000000000..98d618a2e9ed6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.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 SparkJobPythonEntry model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "sparkJobEntryType") +@JsonTypeName("SparkJobPythonEntry") +@Fluent +public final class SparkJobPythonEntry extends SparkJobEntry { + /* + * [Required] Relative python file path for job entry point. + */ + @JsonProperty(value = "file", required = true) + private String file; + + /** + * Creates an instance of SparkJobPythonEntry class. + */ + public SparkJobPythonEntry() { + } + + /** + * Get the file property: [Required] Relative python file path for job entry point. + * + * @return the file value. + */ + public String file() { + return this.file; + } + + /** + * Set the file property: [Required] Relative python file path for job entry point. + * + * @param file the file value to set. + * @return the SparkJobPythonEntry object itself. + */ + public SparkJobPythonEntry withFile(String file) { + this.file = file; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (file() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property file in model SparkJobPythonEntry")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SparkJobPythonEntry.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java new file mode 100644 index 0000000000000..c9b2e83888ce6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.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 SparkJobScalaEntry model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "sparkJobEntryType") +@JsonTypeName("SparkJobScalaEntry") +@Fluent +public final class SparkJobScalaEntry extends SparkJobEntry { + /* + * [Required] Scala class name used as entry point. + */ + @JsonProperty(value = "className", required = true) + private String className; + + /** + * Creates an instance of SparkJobScalaEntry class. + */ + public SparkJobScalaEntry() { + } + + /** + * Get the className property: [Required] Scala class name used as entry point. + * + * @return the className value. + */ + public String className() { + return this.className; + } + + /** + * Set the className property: [Required] Scala class name used as entry point. + * + * @param className the className value to set. + * @return the SparkJobScalaEntry object itself. + */ + public SparkJobScalaEntry withClassName(String className) { + this.className = className; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (className() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property className in model SparkJobScalaEntry")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SparkJobScalaEntry.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java new file mode 100644 index 0000000000000..6f63b0639705a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SparkResourceConfiguration model. + */ +@Fluent +public final class SparkResourceConfiguration { + /* + * Optional type of VM used as supported by the compute target. + */ + @JsonProperty(value = "instanceType") + private String instanceType; + + /* + * Version of spark runtime used for the job. + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /** + * Creates an instance of SparkResourceConfiguration class. + */ + public SparkResourceConfiguration() { + } + + /** + * Get the instanceType property: Optional type of VM used as supported by the compute target. + * + * @return the instanceType value. + */ + public String instanceType() { + return this.instanceType; + } + + /** + * Set the instanceType property: Optional type of VM used as supported by the compute target. + * + * @param instanceType the instanceType value to set. + * @return the SparkResourceConfiguration object itself. + */ + public SparkResourceConfiguration withInstanceType(String instanceType) { + this.instanceType = instanceType; + return this; + } + + /** + * Get the runtimeVersion property: Version of spark runtime used for the job. + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion property: Version of spark runtime used for the job. + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the SparkResourceConfiguration object itself. + */ + public SparkResourceConfiguration withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + 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/SpeechEndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java new file mode 100644 index 0000000000000..5f91024322979 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.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.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The SpeechEndpointDeploymentResourceProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("Azure.Speech") +@Fluent +public final class SpeechEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Model used for the endpoint deployment. + */ + @JsonProperty(value = "model", required = true) + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + @JsonProperty(value = "raiPolicyName") + private String raiPolicyName; + + /* + * The sku property. + */ + @JsonProperty(value = "sku") + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + @JsonProperty(value = "versionUpgradeOption") + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of SpeechEndpointDeploymentResourceProperties class. + */ + public SpeechEndpointDeploymentResourceProperties() { + } + + /** + * Get the model property: Model used for the endpoint deployment. + * + * @return the model value. + */ + public EndpointDeploymentModel model() { + return this.model; + } + + /** + * Set the model property: Model used for the endpoint deployment. + * + * @param model the model value to set. + * @return the SpeechEndpointDeploymentResourceProperties object itself. + */ + public SpeechEndpointDeploymentResourceProperties withModel(EndpointDeploymentModel model) { + this.model = model; + return this; + } + + /** + * Get the raiPolicyName property: The name of RAI policy. + * + * @return the raiPolicyName value. + */ + public String raiPolicyName() { + return this.raiPolicyName; + } + + /** + * Set the raiPolicyName property: The name of RAI policy. + * + * @param raiPolicyName the raiPolicyName value to set. + * @return the SpeechEndpointDeploymentResourceProperties object itself. + */ + public SpeechEndpointDeploymentResourceProperties withRaiPolicyName(String raiPolicyName) { + this.raiPolicyName = raiPolicyName; + return this; + } + + /** + * Get the sku property: The sku property. + * + * @return the sku value. + */ + public CognitiveServicesSku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku property. + * + * @param sku the sku value to set. + * @return the SpeechEndpointDeploymentResourceProperties object itself. + */ + public SpeechEndpointDeploymentResourceProperties withSku(CognitiveServicesSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the versionUpgradeOption property: Deployment model version upgrade option. + * + * @return the versionUpgradeOption value. + */ + public DeploymentModelVersionUpgradeOption versionUpgradeOption() { + return this.versionUpgradeOption; + } + + /** + * Set the versionUpgradeOption property: Deployment model version upgrade option. + * + * @param versionUpgradeOption the versionUpgradeOption value to set. + * @return the SpeechEndpointDeploymentResourceProperties object itself. + */ + public SpeechEndpointDeploymentResourceProperties + withVersionUpgradeOption(DeploymentModelVersionUpgradeOption versionUpgradeOption) { + this.versionUpgradeOption = versionUpgradeOption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointDeploymentResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (model() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property model in model SpeechEndpointDeploymentResourceProperties")); + } else { + model().validate(); + } + if (sku() != null) { + sku().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SpeechEndpointDeploymentResourceProperties.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java new file mode 100644 index 0000000000000..c4ea095227731 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java @@ -0,0 +1,69 @@ +// Copyright (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; + +/** + * The SpeechEndpointResourceProperties model. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointType") +@JsonTypeName("Azure.Speech") +@Fluent +public final class SpeechEndpointResourceProperties extends EndpointResourceProperties { + /** + * Creates an instance of SpeechEndpointResourceProperties class. + */ + public SpeechEndpointResourceProperties() { + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withName(String name) { + super.withName(name); + 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/SshPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java index eaad83db9998d..97e080d791a58 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java @@ -10,21 +10,25 @@ /** * Access policy for SSH - * - *

State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this + * + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this * instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if * applicable. */ public final class SshPublicAccess extends ExpandableStringEnum { - /** Static value Enabled for SshPublicAccess. */ + /** + * Static value Enabled for SshPublicAccess. + */ public static final SshPublicAccess ENABLED = fromString("Enabled"); - /** Static value Disabled for SshPublicAccess. */ + /** + * Static value Disabled for SshPublicAccess. + */ public static final SshPublicAccess DISABLED = fromString("Disabled"); /** * Creates a new instance of SshPublicAccess value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +37,7 @@ public SshPublicAccess() { /** * Creates or finds a SshPublicAccess from its string representation. - * + * * @param name a name to look for. * @return the corresponding SshPublicAccess. */ @@ -44,7 +48,7 @@ public static SshPublicAccess fromString(String name) { /** * Gets known SshPublicAccess values. - * + * * @return known SshPublicAccess values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java index 8adaca76bc15f..21c744c5d83e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enable or disable ssl for scoring. */ +/** + * Enable or disable ssl for scoring. + */ public final class SslConfigStatus extends ExpandableStringEnum { - /** Static value Disabled for SslConfigStatus. */ + /** + * Static value Disabled for SslConfigStatus. + */ public static final SslConfigStatus DISABLED = fromString("Disabled"); - /** Static value Enabled for SslConfigStatus. */ + /** + * Static value Enabled for SslConfigStatus. + */ public static final SslConfigStatus ENABLED = fromString("Enabled"); - /** Static value Auto for SslConfigStatus. */ + /** + * Static value Auto for SslConfigStatus. + */ public static final SslConfigStatus AUTO = fromString("Auto"); /** * Creates a new instance of SslConfigStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public SslConfigStatus() { /** * Creates or finds a SslConfigStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding SslConfigStatus. */ @@ -41,7 +49,7 @@ public static SslConfigStatus fromString(String name) { /** * Gets known SslConfigStatus values. - * + * * @return known SslConfigStatus values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java index 894cce612693c..d133059fbef6a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ssl configuration for scoring. */ +/** + * The ssl configuration for scoring. + */ @Fluent public final class SslConfiguration { /* @@ -46,13 +48,15 @@ public final class SslConfiguration { @JsonProperty(value = "overwriteExistingDomain") private Boolean overwriteExistingDomain; - /** Creates an instance of SslConfiguration class. */ + /** + * Creates an instance of SslConfiguration class. + */ public SslConfiguration() { } /** * Get the status property: Enable or disable ssl for scoring. - * + * * @return the status value. */ public SslConfigStatus status() { @@ -61,7 +65,7 @@ public SslConfigStatus status() { /** * Set the status property: Enable or disable ssl for scoring. - * + * * @param status the status value to set. * @return the SslConfiguration object itself. */ @@ -72,7 +76,7 @@ public SslConfiguration withStatus(SslConfigStatus status) { /** * Get the cert property: Cert data. - * + * * @return the cert value. */ public String cert() { @@ -81,7 +85,7 @@ public String cert() { /** * Set the cert property: Cert data. - * + * * @param cert the cert value to set. * @return the SslConfiguration object itself. */ @@ -92,7 +96,7 @@ public SslConfiguration withCert(String cert) { /** * Get the key property: Key data. - * + * * @return the key value. */ public String key() { @@ -101,7 +105,7 @@ public String key() { /** * Set the key property: Key data. - * + * * @param key the key value to set. * @return the SslConfiguration object itself. */ @@ -112,7 +116,7 @@ public SslConfiguration withKey(String key) { /** * Get the cname property: CNAME of the cert. - * + * * @return the cname value. */ public String cname() { @@ -121,7 +125,7 @@ public String cname() { /** * Set the cname property: CNAME of the cert. - * + * * @param cname the cname value to set. * @return the SslConfiguration object itself. */ @@ -132,7 +136,7 @@ public SslConfiguration withCname(String cname) { /** * Get the leafDomainLabel property: Leaf domain label of public endpoint. - * + * * @return the leafDomainLabel value. */ public String leafDomainLabel() { @@ -141,7 +145,7 @@ public String leafDomainLabel() { /** * Set the leafDomainLabel property: Leaf domain label of public endpoint. - * + * * @param leafDomainLabel the leafDomainLabel value to set. * @return the SslConfiguration object itself. */ @@ -152,7 +156,7 @@ public SslConfiguration withLeafDomainLabel(String leafDomainLabel) { /** * Get the overwriteExistingDomain property: Indicates whether to overwrite existing domain label. - * + * * @return the overwriteExistingDomain value. */ public Boolean overwriteExistingDomain() { @@ -161,7 +165,7 @@ public Boolean overwriteExistingDomain() { /** * Set the overwriteExistingDomain property: Indicates whether to overwrite existing domain label. - * + * * @param overwriteExistingDomain the overwriteExistingDomain value to set. * @return the SslConfiguration object itself. */ @@ -172,7 +176,7 @@ public SslConfiguration withOverwriteExistingDomain(Boolean overwriteExistingDom /** * 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/StackEnsembleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java index d0081827f0330..ea97b481b7c8f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Advances setting to customize StackEnsemble run. */ +/** + * Advances setting to customize StackEnsemble run. + */ @Fluent public final class StackEnsembleSettings { /* @@ -29,13 +31,15 @@ public final class StackEnsembleSettings { @JsonProperty(value = "stackMetaLearnerType") private StackMetaLearnerType stackMetaLearnerType; - /** Creates an instance of StackEnsembleSettings class. */ + /** + * Creates an instance of StackEnsembleSettings class. + */ public StackEnsembleSettings() { } /** * Get the stackMetaLearnerKWargs property: Optional parameters to pass to the initializer of the meta-learner. - * + * * @return the stackMetaLearnerKWargs value. */ public Object stackMetaLearnerKWargs() { @@ -44,7 +48,7 @@ public Object stackMetaLearnerKWargs() { /** * Set the stackMetaLearnerKWargs property: Optional parameters to pass to the initializer of the meta-learner. - * + * * @param stackMetaLearnerKWargs the stackMetaLearnerKWargs value to set. * @return the StackEnsembleSettings object itself. */ @@ -56,7 +60,7 @@ public StackEnsembleSettings withStackMetaLearnerKWargs(Object stackMetaLearnerK /** * Get the stackMetaLearnerTrainPercentage property: Specifies the proportion of the training set (when choosing * train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. - * + * * @return the stackMetaLearnerTrainPercentage value. */ public Double stackMetaLearnerTrainPercentage() { @@ -66,7 +70,7 @@ public Double stackMetaLearnerTrainPercentage() { /** * Set the stackMetaLearnerTrainPercentage property: Specifies the proportion of the training set (when choosing * train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. - * + * * @param stackMetaLearnerTrainPercentage the stackMetaLearnerTrainPercentage value to set. * @return the StackEnsembleSettings object itself. */ @@ -78,7 +82,7 @@ public StackEnsembleSettings withStackMetaLearnerTrainPercentage(Double stackMet /** * Get the stackMetaLearnerType property: The meta-learner is a model trained on the output of the individual * heterogeneous models. - * + * * @return the stackMetaLearnerType value. */ public StackMetaLearnerType stackMetaLearnerType() { @@ -88,7 +92,7 @@ public StackMetaLearnerType stackMetaLearnerType() { /** * Set the stackMetaLearnerType property: The meta-learner is a model trained on the output of the individual * heterogeneous models. - * + * * @param stackMetaLearnerType the stackMetaLearnerType value to set. * @return the StackEnsembleSettings object itself. */ @@ -99,7 +103,7 @@ public StackEnsembleSettings withStackMetaLearnerType(StackMetaLearnerType stack /** * 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/StackMetaLearnerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java index cd5e9dba54d6d..e25fdcb29eada 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java @@ -9,40 +9,56 @@ import java.util.Collection; /** - * The meta-learner is a model trained on the output of the individual heterogeneous models. Default meta-learners are - * LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet - * for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). This parameter can be one of the - * following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, - * LightGBMRegressor, or LinearRegression. + * The meta-learner is a model trained on the output of the individual heterogeneous models. + * Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is + * enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). + * This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, + * ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression. */ public final class StackMetaLearnerType extends ExpandableStringEnum { - /** Static value None for StackMetaLearnerType. */ + /** + * Static value None for StackMetaLearnerType. + */ public static final StackMetaLearnerType NONE = fromString("None"); - /** Static value LogisticRegression for StackMetaLearnerType. */ + /** + * Static value LogisticRegression for StackMetaLearnerType. + */ public static final StackMetaLearnerType LOGISTIC_REGRESSION = fromString("LogisticRegression"); - /** Static value LogisticRegressionCV for StackMetaLearnerType. */ + /** + * Static value LogisticRegressionCV for StackMetaLearnerType. + */ public static final StackMetaLearnerType LOGISTIC_REGRESSION_CV = fromString("LogisticRegressionCV"); - /** Static value LightGBMClassifier for StackMetaLearnerType. */ + /** + * Static value LightGBMClassifier for StackMetaLearnerType. + */ public static final StackMetaLearnerType LIGHT_GBMCLASSIFIER = fromString("LightGBMClassifier"); - /** Static value ElasticNet for StackMetaLearnerType. */ + /** + * Static value ElasticNet for StackMetaLearnerType. + */ public static final StackMetaLearnerType ELASTIC_NET = fromString("ElasticNet"); - /** Static value ElasticNetCV for StackMetaLearnerType. */ + /** + * Static value ElasticNetCV for StackMetaLearnerType. + */ public static final StackMetaLearnerType ELASTIC_NET_CV = fromString("ElasticNetCV"); - /** Static value LightGBMRegressor for StackMetaLearnerType. */ + /** + * Static value LightGBMRegressor for StackMetaLearnerType. + */ public static final StackMetaLearnerType LIGHT_GBMREGRESSOR = fromString("LightGBMRegressor"); - /** Static value LinearRegression for StackMetaLearnerType. */ + /** + * Static value LinearRegression for StackMetaLearnerType. + */ public static final StackMetaLearnerType LINEAR_REGRESSION = fromString("LinearRegression"); /** * Creates a new instance of StackMetaLearnerType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -51,7 +67,7 @@ public StackMetaLearnerType() { /** * Creates or finds a StackMetaLearnerType from its string representation. - * + * * @param name a name to look for. * @return the corresponding StackMetaLearnerType. */ @@ -62,7 +78,7 @@ public static StackMetaLearnerType fromString(String name) { /** * Gets known StackMetaLearnerType values. - * + * * @return known StackMetaLearnerType values. */ public static Collection values() { 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..e7b3cdb89b66a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.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.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 { + /* + * The ARM resource ID of the component resource 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: The ARM resource ID of the component resource used to preprocess the + * data. + * + * @return the preprocessingComponentId value. + */ + public String preprocessingComponentId() { + return this.preprocessingComponentId; + } + + /** + * Set the preprocessingComponentId property: The ARM resource ID of the component resource 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/Status.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java index c4aa1a421e11b..52f25d48a90f3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java @@ -10,38 +10,54 @@ /** * Update Workspace Quota Status. - * - *

Status of update workspace quota. + * + * Status of update workspace quota. */ public final class Status extends ExpandableStringEnum { - /** Static value Undefined for Status. */ + /** + * Static value Undefined for Status. + */ public static final Status UNDEFINED = fromString("Undefined"); - /** Static value Success for Status. */ + /** + * Static value Success for Status. + */ public static final Status SUCCESS = fromString("Success"); - /** Static value Failure for Status. */ + /** + * Static value Failure for Status. + */ public static final Status FAILURE = fromString("Failure"); - /** Static value InvalidQuotaBelowClusterMinimum for Status. */ + /** + * Static value InvalidQuotaBelowClusterMinimum for Status. + */ public static final Status INVALID_QUOTA_BELOW_CLUSTER_MINIMUM = fromString("InvalidQuotaBelowClusterMinimum"); - /** Static value InvalidQuotaExceedsSubscriptionLimit for Status. */ - public static final Status INVALID_QUOTA_EXCEEDS_SUBSCRIPTION_LIMIT = - fromString("InvalidQuotaExceedsSubscriptionLimit"); + /** + * Static value InvalidQuotaExceedsSubscriptionLimit for Status. + */ + public static final Status INVALID_QUOTA_EXCEEDS_SUBSCRIPTION_LIMIT + = fromString("InvalidQuotaExceedsSubscriptionLimit"); - /** Static value InvalidVMFamilyName for Status. */ + /** + * Static value InvalidVMFamilyName for Status. + */ public static final Status INVALID_VMFAMILY_NAME = fromString("InvalidVMFamilyName"); - /** Static value OperationNotSupportedForSku for Status. */ + /** + * Static value OperationNotSupportedForSku for Status. + */ public static final Status OPERATION_NOT_SUPPORTED_FOR_SKU = fromString("OperationNotSupportedForSku"); - /** Static value OperationNotEnabledForRegion for Status. */ + /** + * Static value OperationNotEnabledForRegion for Status. + */ public static final Status OPERATION_NOT_ENABLED_FOR_REGION = fromString("OperationNotEnabledForRegion"); /** * Creates a new instance of Status value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -50,7 +66,7 @@ public Status() { /** * Creates or finds a Status from its string representation. - * + * * @param name a name to look for. * @return the corresponding Status. */ @@ -61,7 +77,7 @@ public static Status fromString(String name) { /** * Gets known Status values. - * + * * @return known Status values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessage.java new file mode 100644 index 0000000000000..2846fe2abc2d0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessage.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.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Active message associated with project. + */ +@Immutable +public final class StatusMessage { + /* + * Service-defined message code. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Time in UTC at which the message was created. + */ + @JsonProperty(value = "createdDateTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdDateTime; + + /* + * Severity level of message. + */ + @JsonProperty(value = "level", access = JsonProperty.Access.WRITE_ONLY) + private StatusMessageLevel level; + + /* + * A human-readable representation of the message code. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Creates an instance of StatusMessage class. + */ + public StatusMessage() { + } + + /** + * Get the code property: Service-defined message code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the createdDateTime property: Time in UTC at which the message was created. + * + * @return the createdDateTime value. + */ + public OffsetDateTime createdDateTime() { + return this.createdDateTime; + } + + /** + * Get the level property: Severity level of message. + * + * @return the level value. + */ + public StatusMessageLevel level() { + return this.level; + } + + /** + * Get the message property: A human-readable representation of the message code. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * 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/StatusMessageLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessageLevel.java new file mode 100644 index 0000000000000..fe56bf1135d80 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StatusMessageLevel.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for StatusMessageLevel. + */ +public final class StatusMessageLevel extends ExpandableStringEnum { + /** + * Static value Error for StatusMessageLevel. + */ + public static final StatusMessageLevel ERROR = fromString("Error"); + + /** + * Static value Information for StatusMessageLevel. + */ + public static final StatusMessageLevel INFORMATION = fromString("Information"); + + /** + * Static value Warning for StatusMessageLevel. + */ + public static final StatusMessageLevel WARNING = fromString("Warning"); + + /** + * Creates a new instance of StatusMessageLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StatusMessageLevel() { + } + + /** + * Creates or finds a StatusMessageLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding StatusMessageLevel. + */ + @JsonCreator + public static StatusMessageLevel fromString(String name) { + return fromString(name, StatusMessageLevel.class); + } + + /** + * Gets known StatusMessageLevel values. + * + * @return known StatusMessageLevel values. + */ + public static Collection values() { + return values(StatusMessageLevel.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java index 7fcd721f062b2..b4b5e8b8be90f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Stochastic optimizer for image models. */ +/** + * Stochastic optimizer for image models. + */ public final class StochasticOptimizer extends ExpandableStringEnum { - /** Static value None for StochasticOptimizer. */ + /** + * Static value None for StochasticOptimizer. + */ public static final StochasticOptimizer NONE = fromString("None"); - /** Static value Sgd for StochasticOptimizer. */ + /** + * Static value Sgd for StochasticOptimizer. + */ public static final StochasticOptimizer SGD = fromString("Sgd"); - /** Static value Adam for StochasticOptimizer. */ + /** + * Static value Adam for StochasticOptimizer. + */ public static final StochasticOptimizer ADAM = fromString("Adam"); - /** Static value Adamw for StochasticOptimizer. */ + /** + * Static value Adamw for StochasticOptimizer. + */ public static final StochasticOptimizer ADAMW = fromString("Adamw"); /** * Creates a new instance of StochasticOptimizer value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public StochasticOptimizer() { /** * Creates or finds a StochasticOptimizer from its string representation. - * + * * @param name a name to look for. * @return the corresponding StochasticOptimizer. */ @@ -44,7 +54,7 @@ public static StochasticOptimizer fromString(String name) { /** * Gets known StochasticOptimizer values. - * + * * @return known StochasticOptimizer values. */ public static Collection values() { 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..bff1a04de95c5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.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.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/StorageAccountType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java index faa2e9484d9eb..891fb4bfea2c3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** type of this storage account. */ +/** + * type of this storage account. + */ public final class StorageAccountType extends ExpandableStringEnum { - /** Static value Standard_LRS for StorageAccountType. */ + /** + * Static value Standard_LRS for StorageAccountType. + */ public static final StorageAccountType STANDARD_LRS = fromString("Standard_LRS"); - /** Static value Premium_LRS for StorageAccountType. */ + /** + * Static value Premium_LRS for StorageAccountType. + */ public static final StorageAccountType PREMIUM_LRS = fromString("Premium_LRS"); /** * Creates a new instance of StorageAccountType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public StorageAccountType() { /** * Creates or finds a StorageAccountType from its string representation. - * + * * @param name a name to look for. * @return the corresponding StorageAccountType. */ @@ -38,7 +44,7 @@ public static StorageAccountType fromString(String name) { /** * Gets known StorageAccountType values. - * + * * @return known StorageAccountType values. */ public static Collection values() { 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..204f1217b710e 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 @@ -12,11 +12,19 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Sweep job definition. */ +/** + * Sweep job definition. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") @JsonTypeName("Sweep") @Fluent public final class SweepJob extends JobBaseProperties { + /* + * Component Configuration for sweep over component + */ + @JsonProperty(value = "componentConfiguration") + private ComponentConfiguration componentConfiguration; + /* * Early termination policies enable canceling poor-performing runs before they complete */ @@ -49,6 +57,18 @@ 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; + + /* + * Compute Resource configuration for the job. + */ + @JsonProperty(value = "resources") + private JobResourceConfiguration resources; + /* * [Required] The hyperparameter sampling algorithm */ @@ -68,14 +88,36 @@ public final class SweepJob extends JobBaseProperties { @JsonProperty(value = "trial", required = true) private TrialComponent trial; - /** Creates an instance of SweepJob class. */ + /** + * Creates an instance of SweepJob class. + */ public SweepJob() { } + /** + * Get the componentConfiguration property: Component Configuration for sweep over component. + * + * @return the componentConfiguration value. + */ + public ComponentConfiguration componentConfiguration() { + return this.componentConfiguration; + } + + /** + * Set the componentConfiguration property: Component Configuration for sweep over component. + * + * @param componentConfiguration the componentConfiguration value to set. + * @return the SweepJob object itself. + */ + public SweepJob withComponentConfiguration(ComponentConfiguration componentConfiguration) { + this.componentConfiguration = componentConfiguration; + return this; + } + /** * Get the earlyTermination property: Early termination policies enable canceling poor-performing runs before they * complete. - * + * * @return the earlyTermination value. */ public EarlyTerminationPolicy earlyTermination() { @@ -85,7 +127,7 @@ public EarlyTerminationPolicy earlyTermination() { /** * Set the earlyTermination property: Early termination policies enable canceling poor-performing runs before they * complete. - * + * * @param earlyTermination the earlyTermination value to set. * @return the SweepJob object itself. */ @@ -96,7 +138,7 @@ public SweepJob withEarlyTermination(EarlyTerminationPolicy earlyTermination) { /** * Get the inputs property: Mapping of input data bindings used in the job. - * + * * @return the inputs value. */ public Map inputs() { @@ -105,7 +147,7 @@ public Map inputs() { /** * Set the inputs property: Mapping of input data bindings used in the job. - * + * * @param inputs the inputs value to set. * @return the SweepJob object itself. */ @@ -116,7 +158,7 @@ public SweepJob withInputs(Map inputs) { /** * Get the limits property: Sweep Job limit. - * + * * @return the limits value. */ public SweepJobLimits limits() { @@ -125,7 +167,7 @@ public SweepJobLimits limits() { /** * Set the limits property: Sweep Job limit. - * + * * @param limits the limits value to set. * @return the SweepJob object itself. */ @@ -136,7 +178,7 @@ public SweepJob withLimits(SweepJobLimits limits) { /** * Get the objective property: [Required] Optimization objective. - * + * * @return the objective value. */ public Objective objective() { @@ -145,7 +187,7 @@ public Objective objective() { /** * Set the objective property: [Required] Optimization objective. - * + * * @param objective the objective value to set. * @return the SweepJob object itself. */ @@ -156,7 +198,7 @@ public SweepJob withObjective(Objective objective) { /** * Get the outputs property: Mapping of output data bindings used in the job. - * + * * @return the outputs value. */ public Map outputs() { @@ -165,7 +207,7 @@ public Map outputs() { /** * Set the outputs property: Mapping of output data bindings used in the job. - * + * * @param outputs the outputs value to set. * @return the SweepJob object itself. */ @@ -174,9 +216,49 @@ 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 resources property: Compute Resource configuration for the job. + * + * @return the resources value. + */ + public JobResourceConfiguration resources() { + return this.resources; + } + + /** + * Set the resources property: Compute Resource configuration for the job. + * + * @param resources the resources value to set. + * @return the SweepJob object itself. + */ + public SweepJob withResources(JobResourceConfiguration resources) { + this.resources = resources; + return this; + } + /** * Get the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. - * + * * @return the samplingAlgorithm value. */ public SamplingAlgorithm samplingAlgorithm() { @@ -185,7 +267,7 @@ public SamplingAlgorithm samplingAlgorithm() { /** * Set the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. - * + * * @param samplingAlgorithm the samplingAlgorithm value to set. * @return the SweepJob object itself. */ @@ -197,7 +279,7 @@ public SweepJob withSamplingAlgorithm(SamplingAlgorithm samplingAlgorithm) { /** * Get the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The * dictionary key is the name of the parameter. - * + * * @return the searchSpace value. */ public Object searchSpace() { @@ -207,7 +289,7 @@ public Object searchSpace() { /** * Set the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The * dictionary key is the name of the parameter. - * + * * @param searchSpace the searchSpace value to set. * @return the SweepJob object itself. */ @@ -218,7 +300,7 @@ public SweepJob withSearchSpace(Object searchSpace) { /** * Get the trial property: [Required] Trial component definition. - * + * * @return the trial value. */ public TrialComponent trial() { @@ -227,7 +309,7 @@ public TrialComponent trial() { /** * Set the trial property: [Required] Trial component definition. - * + * * @param trial the trial value to set. * @return the SweepJob object itself. */ @@ -236,70 +318,108 @@ public SweepJob withTrial(TrialComponent trial) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJob withComponentId(String componentId) { super.withComponentId(componentId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJob withComputeId(String computeId) { super.withComputeId(computeId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJob withDisplayName(String displayName) { super.withDisplayName(displayName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJob withExperimentName(String experimentName) { super.withExperimentName(experimentName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJob withIdentity(IdentityConfiguration identity) { super.withIdentity(identity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJob withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public SweepJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SweepJob withSecretsConfiguration(Map secretsConfiguration) { + super.withSecretsConfiguration(secretsConfiguration); + return this; + } + + /** + * {@inheritDoc} + */ @Override public SweepJob withServices(Map services) { super.withServices(services); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJob withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJob withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJob withTags(Map tags) { super.withTags(tags); @@ -308,56 +428,56 @@ public SweepJob withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (componentConfiguration() != null) { + componentConfiguration().validate(); + } if (earlyTermination() != null) { earlyTermination().validate(); } if (inputs() != null) { - inputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + inputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } if (limits() != null) { limits().validate(); } if (objective() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property objective in model SweepJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property objective in model SweepJob")); } else { objective().validate(); } if (outputs() != null) { - outputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + outputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (queueSettings() != null) { + queueSettings().validate(); + } + if (resources() != null) { + resources().validate(); } if (samplingAlgorithm() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property samplingAlgorithm in model SweepJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property samplingAlgorithm in model SweepJob")); } else { samplingAlgorithm().validate(); } if (searchSpace() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property searchSpace in model SweepJob")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property searchSpace in model SweepJob")); } if (trial() == null) { throw LOGGER diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java index 6bca811bd4032..98b92634df465 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** Sweep Job limit class. */ +/** + * Sweep Job limit class. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobLimitsType") @JsonTypeName("Sweep") @Fluent @@ -33,13 +35,15 @@ public final class SweepJobLimits extends JobLimits { @JsonProperty(value = "trialTimeout") private Duration trialTimeout; - /** Creates an instance of SweepJobLimits class. */ + /** + * Creates an instance of SweepJobLimits class. + */ public SweepJobLimits() { } /** * Get the maxConcurrentTrials property: Sweep Job max concurrent trials. - * + * * @return the maxConcurrentTrials value. */ public Integer maxConcurrentTrials() { @@ -48,7 +52,7 @@ public Integer maxConcurrentTrials() { /** * Set the maxConcurrentTrials property: Sweep Job max concurrent trials. - * + * * @param maxConcurrentTrials the maxConcurrentTrials value to set. * @return the SweepJobLimits object itself. */ @@ -59,7 +63,7 @@ public SweepJobLimits withMaxConcurrentTrials(Integer maxConcurrentTrials) { /** * Get the maxTotalTrials property: Sweep Job max total trials. - * + * * @return the maxTotalTrials value. */ public Integer maxTotalTrials() { @@ -68,7 +72,7 @@ public Integer maxTotalTrials() { /** * Set the maxTotalTrials property: Sweep Job max total trials. - * + * * @param maxTotalTrials the maxTotalTrials value to set. * @return the SweepJobLimits object itself. */ @@ -79,7 +83,7 @@ public SweepJobLimits withMaxTotalTrials(Integer maxTotalTrials) { /** * Get the trialTimeout property: Sweep Job Trial timeout value. - * + * * @return the trialTimeout value. */ public Duration trialTimeout() { @@ -88,7 +92,7 @@ public Duration trialTimeout() { /** * Set the trialTimeout property: Sweep Job Trial timeout value. - * + * * @param trialTimeout the trialTimeout value to set. * @return the SweepJobLimits object itself. */ @@ -97,7 +101,9 @@ public SweepJobLimits withTrialTimeout(Duration trialTimeout) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SweepJobLimits withTimeout(Duration timeout) { super.withTimeout(timeout); @@ -106,7 +112,7 @@ public SweepJobLimits withTimeout(Duration timeout) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java index 287f483c99310..e473f117caa76 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A SynapseSpark compute. */ +/** + * A SynapseSpark compute. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("SynapseSpark") @Fluent @@ -20,13 +22,15 @@ public final class SynapseSpark extends Compute { @JsonProperty(value = "properties") private SynapseSparkProperties properties; - /** Creates an instance of SynapseSpark class. */ + /** + * Creates an instance of SynapseSpark class. + */ public SynapseSpark() { } /** * Get the properties property: The properties property. - * + * * @return the properties value. */ public SynapseSparkProperties properties() { @@ -35,7 +39,7 @@ public SynapseSparkProperties properties() { /** * Set the properties property: The properties property. - * + * * @param properties the properties value to set. * @return the SynapseSpark object itself. */ @@ -44,28 +48,36 @@ public SynapseSpark withProperties(SynapseSparkProperties properties) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SynapseSpark withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SynapseSpark withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SynapseSpark withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public SynapseSpark withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -74,7 +86,7 @@ public SynapseSpark withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java index 29e0a16a673d5..dcd368e0bd866 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The SynapseSparkProperties model. */ +/** + * The SynapseSparkProperties model. + */ @Fluent public final class SynapseSparkProperties { /* @@ -70,13 +72,15 @@ public final class SynapseSparkProperties { @JsonProperty(value = "poolName") private String poolName; - /** Creates an instance of SynapseSparkProperties class. */ + /** + * Creates an instance of SynapseSparkProperties class. + */ public SynapseSparkProperties() { } /** * Get the autoScaleProperties property: Auto scale properties. - * + * * @return the autoScaleProperties value. */ public AutoScaleProperties autoScaleProperties() { @@ -85,7 +89,7 @@ public AutoScaleProperties autoScaleProperties() { /** * Set the autoScaleProperties property: Auto scale properties. - * + * * @param autoScaleProperties the autoScaleProperties value to set. * @return the SynapseSparkProperties object itself. */ @@ -96,7 +100,7 @@ public SynapseSparkProperties withAutoScaleProperties(AutoScaleProperties autoSc /** * Get the autoPauseProperties property: Auto pause properties. - * + * * @return the autoPauseProperties value. */ public AutoPauseProperties autoPauseProperties() { @@ -105,7 +109,7 @@ public AutoPauseProperties autoPauseProperties() { /** * Set the autoPauseProperties property: Auto pause properties. - * + * * @param autoPauseProperties the autoPauseProperties value to set. * @return the SynapseSparkProperties object itself. */ @@ -116,7 +120,7 @@ public SynapseSparkProperties withAutoPauseProperties(AutoPauseProperties autoPa /** * Get the sparkVersion property: Spark version. - * + * * @return the sparkVersion value. */ public String sparkVersion() { @@ -125,7 +129,7 @@ public String sparkVersion() { /** * Set the sparkVersion property: Spark version. - * + * * @param sparkVersion the sparkVersion value to set. * @return the SynapseSparkProperties object itself. */ @@ -136,7 +140,7 @@ public SynapseSparkProperties withSparkVersion(String sparkVersion) { /** * Get the nodeCount property: The number of compute nodes currently assigned to the compute. - * + * * @return the nodeCount value. */ public Integer nodeCount() { @@ -145,7 +149,7 @@ public Integer nodeCount() { /** * Set the nodeCount property: The number of compute nodes currently assigned to the compute. - * + * * @param nodeCount the nodeCount value to set. * @return the SynapseSparkProperties object itself. */ @@ -156,7 +160,7 @@ public SynapseSparkProperties withNodeCount(Integer nodeCount) { /** * Get the nodeSize property: Node size. - * + * * @return the nodeSize value. */ public String nodeSize() { @@ -165,7 +169,7 @@ public String nodeSize() { /** * Set the nodeSize property: Node size. - * + * * @param nodeSize the nodeSize value to set. * @return the SynapseSparkProperties object itself. */ @@ -176,7 +180,7 @@ public SynapseSparkProperties withNodeSize(String nodeSize) { /** * Get the nodeSizeFamily property: Node size family. - * + * * @return the nodeSizeFamily value. */ public String nodeSizeFamily() { @@ -185,7 +189,7 @@ public String nodeSizeFamily() { /** * Set the nodeSizeFamily property: Node size family. - * + * * @param nodeSizeFamily the nodeSizeFamily value to set. * @return the SynapseSparkProperties object itself. */ @@ -196,7 +200,7 @@ public SynapseSparkProperties withNodeSizeFamily(String nodeSizeFamily) { /** * Get the subscriptionId property: Azure subscription identifier. - * + * * @return the subscriptionId value. */ public String subscriptionId() { @@ -205,7 +209,7 @@ public String subscriptionId() { /** * Set the subscriptionId property: Azure subscription identifier. - * + * * @param subscriptionId the subscriptionId value to set. * @return the SynapseSparkProperties object itself. */ @@ -216,7 +220,7 @@ public SynapseSparkProperties withSubscriptionId(String subscriptionId) { /** * Get the resourceGroup property: Name of the resource group in which workspace is located. - * + * * @return the resourceGroup value. */ public String resourceGroup() { @@ -225,7 +229,7 @@ public String resourceGroup() { /** * Set the resourceGroup property: Name of the resource group in which workspace is located. - * + * * @param resourceGroup the resourceGroup value to set. * @return the SynapseSparkProperties object itself. */ @@ -236,7 +240,7 @@ public SynapseSparkProperties withResourceGroup(String resourceGroup) { /** * Get the workspaceName property: Name of Azure Machine Learning workspace. - * + * * @return the workspaceName value. */ public String workspaceName() { @@ -245,7 +249,7 @@ public String workspaceName() { /** * Set the workspaceName property: Name of Azure Machine Learning workspace. - * + * * @param workspaceName the workspaceName value to set. * @return the SynapseSparkProperties object itself. */ @@ -256,7 +260,7 @@ public SynapseSparkProperties withWorkspaceName(String workspaceName) { /** * Get the poolName property: Pool name. - * + * * @return the poolName value. */ public String poolName() { @@ -265,7 +269,7 @@ public String poolName() { /** * Set the poolName property: Pool name. - * + * * @param poolName the poolName value to set. * @return the SynapseSparkProperties object itself. */ @@ -276,7 +280,7 @@ public SynapseSparkProperties withPoolName(String poolName) { /** * 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/SystemCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java new file mode 100644 index 0000000000000..2ec3f60f46f32 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.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; + +/** + * 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..2af698071181a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java @@ -0,0 +1,185 @@ +// Copyright (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/SystemService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java index 3bdbdeaf51e7e..3e26c06a3b7cd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** A system service running on a compute. */ +/** + * A system service running on a compute. + */ @Immutable public final class SystemService { /* @@ -28,13 +30,15 @@ public final class SystemService { @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private String version; - /** Creates an instance of SystemService class. */ + /** + * Creates an instance of SystemService class. + */ public SystemService() { } /** * Get the systemServiceType property: The type of this system service. - * + * * @return the systemServiceType value. */ public String systemServiceType() { @@ -43,7 +47,7 @@ public String systemServiceType() { /** * Get the publicIpAddress property: Public IP address. - * + * * @return the publicIpAddress value. */ public String publicIpAddress() { @@ -52,7 +56,7 @@ public String publicIpAddress() { /** * Get the version property: The version for this type. - * + * * @return the version value. */ public String version() { @@ -61,7 +65,7 @@ public String version() { /** * 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/TableFixedParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableFixedParameters.java new file mode 100644 index 0000000000000..4cf5c5495a3b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableFixedParameters.java @@ -0,0 +1,550 @@ +// Copyright (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; + +/** + * Fixed training parameters that won't be swept over during AutoML Table training. + */ +@Fluent +public final class TableFixedParameters { + /* + * Specify the boosting type, e.g gbdt for XGBoost. + */ + @JsonProperty(value = "booster") + private String booster; + + /* + * Specify the boosting type, e.g gbdt for LightGBM. + */ + @JsonProperty(value = "boostingType") + private String boostingType; + + /* + * Specify the grow policy, which controls the way new nodes are added to the tree. + */ + @JsonProperty(value = "growPolicy") + private String growPolicy; + + /* + * The learning rate for the training procedure. + */ + @JsonProperty(value = "learningRate") + private Double learningRate; + + /* + * Specify the Maximum number of discrete bins to bucket continuous features . + */ + @JsonProperty(value = "maxBin") + private Integer maxBin; + + /* + * Specify the max depth to limit the tree depth explicitly. + */ + @JsonProperty(value = "maxDepth") + private Integer maxDepth; + + /* + * Specify the max leaves to limit the tree leaves explicitly. + */ + @JsonProperty(value = "maxLeaves") + private Integer maxLeaves; + + /* + * The minimum number of data per leaf. + */ + @JsonProperty(value = "minDataInLeaf") + private Integer minDataInLeaf; + + /* + * Minimum loss reduction required to make a further partition on a leaf node of the tree. + */ + @JsonProperty(value = "minSplitGain") + private Double minSplitGain; + + /* + * The name of the model to train. + */ + @JsonProperty(value = "modelName") + private String modelName; + + /* + * Specify the number of trees (or rounds) in an model. + */ + @JsonProperty(value = "nEstimators") + private Integer nEstimators; + + /* + * Specify the number of leaves. + */ + @JsonProperty(value = "numLeaves") + private Integer numLeaves; + + /* + * The name of the preprocessor to use. + */ + @JsonProperty(value = "preprocessorName") + private String preprocessorName; + + /* + * L1 regularization term on weights. + */ + @JsonProperty(value = "regAlpha") + private Double regAlpha; + + /* + * L2 regularization term on weights. + */ + @JsonProperty(value = "regLambda") + private Double regLambda; + + /* + * Subsample ratio of the training instance. + */ + @JsonProperty(value = "subsample") + private Double subsample; + + /* + * Frequency of subsample. + */ + @JsonProperty(value = "subsampleFreq") + private Double subsampleFreq; + + /* + * Specify the tree method. + */ + @JsonProperty(value = "treeMethod") + private String treeMethod; + + /* + * If true, center before scaling the data with StandardScalar. + */ + @JsonProperty(value = "withMean") + private Boolean withMean; + + /* + * If true, scaling the data with Unit Variance with StandardScalar. + */ + @JsonProperty(value = "withStd") + private Boolean withStd; + + /** + * Creates an instance of TableFixedParameters class. + */ + public TableFixedParameters() { + } + + /** + * Get the booster property: Specify the boosting type, e.g gbdt for XGBoost. + * + * @return the booster value. + */ + public String booster() { + return this.booster; + } + + /** + * Set the booster property: Specify the boosting type, e.g gbdt for XGBoost. + * + * @param booster the booster value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withBooster(String booster) { + this.booster = booster; + return this; + } + + /** + * Get the boostingType property: Specify the boosting type, e.g gbdt for LightGBM. + * + * @return the boostingType value. + */ + public String boostingType() { + return this.boostingType; + } + + /** + * Set the boostingType property: Specify the boosting type, e.g gbdt for LightGBM. + * + * @param boostingType the boostingType value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withBoostingType(String boostingType) { + this.boostingType = boostingType; + return this; + } + + /** + * Get the growPolicy property: Specify the grow policy, which controls the way new nodes are added to the tree. + * + * @return the growPolicy value. + */ + public String growPolicy() { + return this.growPolicy; + } + + /** + * Set the growPolicy property: Specify the grow policy, which controls the way new nodes are added to the tree. + * + * @param growPolicy the growPolicy value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withGrowPolicy(String growPolicy) { + this.growPolicy = growPolicy; + return this; + } + + /** + * Get the learningRate property: The learning rate for the training procedure. + * + * @return the learningRate value. + */ + public Double learningRate() { + return this.learningRate; + } + + /** + * Set the learningRate property: The learning rate for the training procedure. + * + * @param learningRate the learningRate value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withLearningRate(Double learningRate) { + this.learningRate = learningRate; + return this; + } + + /** + * Get the maxBin property: Specify the Maximum number of discrete bins to bucket continuous features . + * + * @return the maxBin value. + */ + public Integer maxBin() { + return this.maxBin; + } + + /** + * Set the maxBin property: Specify the Maximum number of discrete bins to bucket continuous features . + * + * @param maxBin the maxBin value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMaxBin(Integer maxBin) { + this.maxBin = maxBin; + return this; + } + + /** + * Get the maxDepth property: Specify the max depth to limit the tree depth explicitly. + * + * @return the maxDepth value. + */ + public Integer maxDepth() { + return this.maxDepth; + } + + /** + * Set the maxDepth property: Specify the max depth to limit the tree depth explicitly. + * + * @param maxDepth the maxDepth value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMaxDepth(Integer maxDepth) { + this.maxDepth = maxDepth; + return this; + } + + /** + * Get the maxLeaves property: Specify the max leaves to limit the tree leaves explicitly. + * + * @return the maxLeaves value. + */ + public Integer maxLeaves() { + return this.maxLeaves; + } + + /** + * Set the maxLeaves property: Specify the max leaves to limit the tree leaves explicitly. + * + * @param maxLeaves the maxLeaves value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMaxLeaves(Integer maxLeaves) { + this.maxLeaves = maxLeaves; + return this; + } + + /** + * Get the minDataInLeaf property: The minimum number of data per leaf. + * + * @return the minDataInLeaf value. + */ + public Integer minDataInLeaf() { + return this.minDataInLeaf; + } + + /** + * Set the minDataInLeaf property: The minimum number of data per leaf. + * + * @param minDataInLeaf the minDataInLeaf value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMinDataInLeaf(Integer minDataInLeaf) { + this.minDataInLeaf = minDataInLeaf; + return this; + } + + /** + * Get the minSplitGain property: Minimum loss reduction required to make a further partition on a leaf node of the + * tree. + * + * @return the minSplitGain value. + */ + public Double minSplitGain() { + return this.minSplitGain; + } + + /** + * Set the minSplitGain property: Minimum loss reduction required to make a further partition on a leaf node of the + * tree. + * + * @param minSplitGain the minSplitGain value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withMinSplitGain(Double minSplitGain) { + this.minSplitGain = minSplitGain; + return this; + } + + /** + * Get the modelName property: The name of the model to train. + * + * @return the modelName value. + */ + public String modelName() { + return this.modelName; + } + + /** + * Set the modelName property: The name of the model to train. + * + * @param modelName the modelName value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withModelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Get the nEstimators property: Specify the number of trees (or rounds) in an model. + * + * @return the nEstimators value. + */ + public Integer nEstimators() { + return this.nEstimators; + } + + /** + * Set the nEstimators property: Specify the number of trees (or rounds) in an model. + * + * @param nEstimators the nEstimators value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withNEstimators(Integer nEstimators) { + this.nEstimators = nEstimators; + return this; + } + + /** + * Get the numLeaves property: Specify the number of leaves. + * + * @return the numLeaves value. + */ + public Integer numLeaves() { + return this.numLeaves; + } + + /** + * Set the numLeaves property: Specify the number of leaves. + * + * @param numLeaves the numLeaves value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withNumLeaves(Integer numLeaves) { + this.numLeaves = numLeaves; + return this; + } + + /** + * Get the preprocessorName property: The name of the preprocessor to use. + * + * @return the preprocessorName value. + */ + public String preprocessorName() { + return this.preprocessorName; + } + + /** + * Set the preprocessorName property: The name of the preprocessor to use. + * + * @param preprocessorName the preprocessorName value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withPreprocessorName(String preprocessorName) { + this.preprocessorName = preprocessorName; + return this; + } + + /** + * Get the regAlpha property: L1 regularization term on weights. + * + * @return the regAlpha value. + */ + public Double regAlpha() { + return this.regAlpha; + } + + /** + * Set the regAlpha property: L1 regularization term on weights. + * + * @param regAlpha the regAlpha value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withRegAlpha(Double regAlpha) { + this.regAlpha = regAlpha; + return this; + } + + /** + * Get the regLambda property: L2 regularization term on weights. + * + * @return the regLambda value. + */ + public Double regLambda() { + return this.regLambda; + } + + /** + * Set the regLambda property: L2 regularization term on weights. + * + * @param regLambda the regLambda value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withRegLambda(Double regLambda) { + this.regLambda = regLambda; + return this; + } + + /** + * Get the subsample property: Subsample ratio of the training instance. + * + * @return the subsample value. + */ + public Double subsample() { + return this.subsample; + } + + /** + * Set the subsample property: Subsample ratio of the training instance. + * + * @param subsample the subsample value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withSubsample(Double subsample) { + this.subsample = subsample; + return this; + } + + /** + * Get the subsampleFreq property: Frequency of subsample. + * + * @return the subsampleFreq value. + */ + public Double subsampleFreq() { + return this.subsampleFreq; + } + + /** + * Set the subsampleFreq property: Frequency of subsample. + * + * @param subsampleFreq the subsampleFreq value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withSubsampleFreq(Double subsampleFreq) { + this.subsampleFreq = subsampleFreq; + return this; + } + + /** + * Get the treeMethod property: Specify the tree method. + * + * @return the treeMethod value. + */ + public String treeMethod() { + return this.treeMethod; + } + + /** + * Set the treeMethod property: Specify the tree method. + * + * @param treeMethod the treeMethod value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withTreeMethod(String treeMethod) { + this.treeMethod = treeMethod; + return this; + } + + /** + * Get the withMean property: If true, center before scaling the data with StandardScalar. + * + * @return the withMean value. + */ + public Boolean withMean() { + return this.withMean; + } + + /** + * Set the withMean property: If true, center before scaling the data with StandardScalar. + * + * @param withMean the withMean value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withWithMean(Boolean withMean) { + this.withMean = withMean; + return this; + } + + /** + * Get the withStd property: If true, scaling the data with Unit Variance with StandardScalar. + * + * @return the withStd value. + */ + public Boolean withStd() { + return this.withStd; + } + + /** + * Set the withStd property: If true, scaling the data with Unit Variance with StandardScalar. + * + * @param withStd the withStd value to set. + * @return the TableFixedParameters object itself. + */ + public TableFixedParameters withWithStd(Boolean withStd) { + this.withStd = withStd; + 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/TableParameterSubspace.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableParameterSubspace.java new file mode 100644 index 0000000000000..de526e59ae89f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableParameterSubspace.java @@ -0,0 +1,550 @@ +// Copyright (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 TableParameterSubspace model. + */ +@Fluent +public final class TableParameterSubspace { + /* + * Specify the boosting type, e.g gbdt for XGBoost. + */ + @JsonProperty(value = "booster") + private String booster; + + /* + * Specify the boosting type, e.g gbdt for LightGBM. + */ + @JsonProperty(value = "boostingType") + private String boostingType; + + /* + * Specify the grow policy, which controls the way new nodes are added to the tree. + */ + @JsonProperty(value = "growPolicy") + private String growPolicy; + + /* + * The learning rate for the training procedure. + */ + @JsonProperty(value = "learningRate") + private String learningRate; + + /* + * Specify the Maximum number of discrete bins to bucket continuous features . + */ + @JsonProperty(value = "maxBin") + private String maxBin; + + /* + * Specify the max depth to limit the tree depth explicitly. + */ + @JsonProperty(value = "maxDepth") + private String maxDepth; + + /* + * Specify the max leaves to limit the tree leaves explicitly. + */ + @JsonProperty(value = "maxLeaves") + private String maxLeaves; + + /* + * The minimum number of data per leaf. + */ + @JsonProperty(value = "minDataInLeaf") + private String minDataInLeaf; + + /* + * Minimum loss reduction required to make a further partition on a leaf node of the tree. + */ + @JsonProperty(value = "minSplitGain") + private String minSplitGain; + + /* + * The name of the model to train. + */ + @JsonProperty(value = "modelName") + private String modelName; + + /* + * Specify the number of trees (or rounds) in an model. + */ + @JsonProperty(value = "nEstimators") + private String nEstimators; + + /* + * Specify the number of leaves. + */ + @JsonProperty(value = "numLeaves") + private String numLeaves; + + /* + * The name of the preprocessor to use. + */ + @JsonProperty(value = "preprocessorName") + private String preprocessorName; + + /* + * L1 regularization term on weights. + */ + @JsonProperty(value = "regAlpha") + private String regAlpha; + + /* + * L2 regularization term on weights. + */ + @JsonProperty(value = "regLambda") + private String regLambda; + + /* + * Subsample ratio of the training instance. + */ + @JsonProperty(value = "subsample") + private String subsample; + + /* + * Frequency of subsample + */ + @JsonProperty(value = "subsampleFreq") + private String subsampleFreq; + + /* + * Specify the tree method. + */ + @JsonProperty(value = "treeMethod") + private String treeMethod; + + /* + * If true, center before scaling the data with StandardScalar. + */ + @JsonProperty(value = "withMean") + private String withMean; + + /* + * If true, scaling the data with Unit Variance with StandardScalar. + */ + @JsonProperty(value = "withStd") + private String withStd; + + /** + * Creates an instance of TableParameterSubspace class. + */ + public TableParameterSubspace() { + } + + /** + * Get the booster property: Specify the boosting type, e.g gbdt for XGBoost. + * + * @return the booster value. + */ + public String booster() { + return this.booster; + } + + /** + * Set the booster property: Specify the boosting type, e.g gbdt for XGBoost. + * + * @param booster the booster value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withBooster(String booster) { + this.booster = booster; + return this; + } + + /** + * Get the boostingType property: Specify the boosting type, e.g gbdt for LightGBM. + * + * @return the boostingType value. + */ + public String boostingType() { + return this.boostingType; + } + + /** + * Set the boostingType property: Specify the boosting type, e.g gbdt for LightGBM. + * + * @param boostingType the boostingType value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withBoostingType(String boostingType) { + this.boostingType = boostingType; + return this; + } + + /** + * Get the growPolicy property: Specify the grow policy, which controls the way new nodes are added to the tree. + * + * @return the growPolicy value. + */ + public String growPolicy() { + return this.growPolicy; + } + + /** + * Set the growPolicy property: Specify the grow policy, which controls the way new nodes are added to the tree. + * + * @param growPolicy the growPolicy value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withGrowPolicy(String growPolicy) { + this.growPolicy = growPolicy; + return this; + } + + /** + * Get the learningRate property: The learning rate for the training procedure. + * + * @return the learningRate value. + */ + public String learningRate() { + return this.learningRate; + } + + /** + * Set the learningRate property: The learning rate for the training procedure. + * + * @param learningRate the learningRate value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withLearningRate(String learningRate) { + this.learningRate = learningRate; + return this; + } + + /** + * Get the maxBin property: Specify the Maximum number of discrete bins to bucket continuous features . + * + * @return the maxBin value. + */ + public String maxBin() { + return this.maxBin; + } + + /** + * Set the maxBin property: Specify the Maximum number of discrete bins to bucket continuous features . + * + * @param maxBin the maxBin value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMaxBin(String maxBin) { + this.maxBin = maxBin; + return this; + } + + /** + * Get the maxDepth property: Specify the max depth to limit the tree depth explicitly. + * + * @return the maxDepth value. + */ + public String maxDepth() { + return this.maxDepth; + } + + /** + * Set the maxDepth property: Specify the max depth to limit the tree depth explicitly. + * + * @param maxDepth the maxDepth value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMaxDepth(String maxDepth) { + this.maxDepth = maxDepth; + return this; + } + + /** + * Get the maxLeaves property: Specify the max leaves to limit the tree leaves explicitly. + * + * @return the maxLeaves value. + */ + public String maxLeaves() { + return this.maxLeaves; + } + + /** + * Set the maxLeaves property: Specify the max leaves to limit the tree leaves explicitly. + * + * @param maxLeaves the maxLeaves value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMaxLeaves(String maxLeaves) { + this.maxLeaves = maxLeaves; + return this; + } + + /** + * Get the minDataInLeaf property: The minimum number of data per leaf. + * + * @return the minDataInLeaf value. + */ + public String minDataInLeaf() { + return this.minDataInLeaf; + } + + /** + * Set the minDataInLeaf property: The minimum number of data per leaf. + * + * @param minDataInLeaf the minDataInLeaf value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMinDataInLeaf(String minDataInLeaf) { + this.minDataInLeaf = minDataInLeaf; + return this; + } + + /** + * Get the minSplitGain property: Minimum loss reduction required to make a further partition on a leaf node of the + * tree. + * + * @return the minSplitGain value. + */ + public String minSplitGain() { + return this.minSplitGain; + } + + /** + * Set the minSplitGain property: Minimum loss reduction required to make a further partition on a leaf node of the + * tree. + * + * @param minSplitGain the minSplitGain value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withMinSplitGain(String minSplitGain) { + this.minSplitGain = minSplitGain; + return this; + } + + /** + * Get the modelName property: The name of the model to train. + * + * @return the modelName value. + */ + public String modelName() { + return this.modelName; + } + + /** + * Set the modelName property: The name of the model to train. + * + * @param modelName the modelName value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withModelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Get the nEstimators property: Specify the number of trees (or rounds) in an model. + * + * @return the nEstimators value. + */ + public String nEstimators() { + return this.nEstimators; + } + + /** + * Set the nEstimators property: Specify the number of trees (or rounds) in an model. + * + * @param nEstimators the nEstimators value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withNEstimators(String nEstimators) { + this.nEstimators = nEstimators; + return this; + } + + /** + * Get the numLeaves property: Specify the number of leaves. + * + * @return the numLeaves value. + */ + public String numLeaves() { + return this.numLeaves; + } + + /** + * Set the numLeaves property: Specify the number of leaves. + * + * @param numLeaves the numLeaves value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withNumLeaves(String numLeaves) { + this.numLeaves = numLeaves; + return this; + } + + /** + * Get the preprocessorName property: The name of the preprocessor to use. + * + * @return the preprocessorName value. + */ + public String preprocessorName() { + return this.preprocessorName; + } + + /** + * Set the preprocessorName property: The name of the preprocessor to use. + * + * @param preprocessorName the preprocessorName value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withPreprocessorName(String preprocessorName) { + this.preprocessorName = preprocessorName; + return this; + } + + /** + * Get the regAlpha property: L1 regularization term on weights. + * + * @return the regAlpha value. + */ + public String regAlpha() { + return this.regAlpha; + } + + /** + * Set the regAlpha property: L1 regularization term on weights. + * + * @param regAlpha the regAlpha value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withRegAlpha(String regAlpha) { + this.regAlpha = regAlpha; + return this; + } + + /** + * Get the regLambda property: L2 regularization term on weights. + * + * @return the regLambda value. + */ + public String regLambda() { + return this.regLambda; + } + + /** + * Set the regLambda property: L2 regularization term on weights. + * + * @param regLambda the regLambda value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withRegLambda(String regLambda) { + this.regLambda = regLambda; + return this; + } + + /** + * Get the subsample property: Subsample ratio of the training instance. + * + * @return the subsample value. + */ + public String subsample() { + return this.subsample; + } + + /** + * Set the subsample property: Subsample ratio of the training instance. + * + * @param subsample the subsample value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withSubsample(String subsample) { + this.subsample = subsample; + return this; + } + + /** + * Get the subsampleFreq property: Frequency of subsample. + * + * @return the subsampleFreq value. + */ + public String subsampleFreq() { + return this.subsampleFreq; + } + + /** + * Set the subsampleFreq property: Frequency of subsample. + * + * @param subsampleFreq the subsampleFreq value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withSubsampleFreq(String subsampleFreq) { + this.subsampleFreq = subsampleFreq; + return this; + } + + /** + * Get the treeMethod property: Specify the tree method. + * + * @return the treeMethod value. + */ + public String treeMethod() { + return this.treeMethod; + } + + /** + * Set the treeMethod property: Specify the tree method. + * + * @param treeMethod the treeMethod value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withTreeMethod(String treeMethod) { + this.treeMethod = treeMethod; + return this; + } + + /** + * Get the withMean property: If true, center before scaling the data with StandardScalar. + * + * @return the withMean value. + */ + public String withMean() { + return this.withMean; + } + + /** + * Set the withMean property: If true, center before scaling the data with StandardScalar. + * + * @param withMean the withMean value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withWithMean(String withMean) { + this.withMean = withMean; + return this; + } + + /** + * Get the withStd property: If true, scaling the data with Unit Variance with StandardScalar. + * + * @return the withStd value. + */ + public String withStd() { + return this.withStd; + } + + /** + * Set the withStd property: If true, scaling the data with Unit Variance with StandardScalar. + * + * @param withStd the withStd value to set. + * @return the TableParameterSubspace object itself. + */ + public TableParameterSubspace withWithStd(String withStd) { + this.withStd = withStd; + 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/TableSweepSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableSweepSettings.java new file mode 100644 index 0000000000000..716e7c5fe969d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableSweepSettings.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 TableSweepSettings model. + */ +@Fluent +public final class TableSweepSettings { + /* + * Type of early termination policy for the sweeping job. + */ + @JsonProperty(value = "earlyTermination") + private EarlyTerminationPolicy earlyTermination; + + /* + * [Required] Type of sampling algorithm. + */ + @JsonProperty(value = "samplingAlgorithm", required = true) + private SamplingAlgorithmType samplingAlgorithm; + + /** + * Creates an instance of TableSweepSettings class. + */ + public TableSweepSettings() { + } + + /** + * Get the earlyTermination property: Type of early termination policy for the sweeping job. + * + * @return the earlyTermination value. + */ + public EarlyTerminationPolicy earlyTermination() { + return this.earlyTermination; + } + + /** + * Set the earlyTermination property: Type of early termination policy for the sweeping job. + * + * @param earlyTermination the earlyTermination value to set. + * @return the TableSweepSettings object itself. + */ + public TableSweepSettings withEarlyTermination(EarlyTerminationPolicy earlyTermination) { + this.earlyTermination = earlyTermination; + return this; + } + + /** + * Get the samplingAlgorithm property: [Required] Type of sampling algorithm. + * + * @return the samplingAlgorithm value. + */ + public SamplingAlgorithmType samplingAlgorithm() { + return this.samplingAlgorithm; + } + + /** + * Set the samplingAlgorithm property: [Required] Type of sampling algorithm. + * + * @param samplingAlgorithm the samplingAlgorithm value to set. + * @return the TableSweepSettings object itself. + */ + public TableSweepSettings withSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithm) { + this.samplingAlgorithm = samplingAlgorithm; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (earlyTermination() != null) { + earlyTermination().validate(); + } + if (samplingAlgorithm() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property samplingAlgorithm in model TableSweepSettings")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TableSweepSettings.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java index c9bb43ee04433..aa6eef1cd8c91 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. */ +/** + * Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. + */ @Fluent public class TableVertical { /* @@ -23,6 +25,12 @@ public class TableVertical { @JsonProperty(value = "featurizationSettings") private TableVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private TableFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @@ -36,6 +44,18 @@ public class TableVertical { @JsonProperty(value = "nCrossValidations") private NCrossValidations nCrossValidations; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private TableSweepSettings sweepSettings; + /* * Test data input. */ @@ -71,13 +91,15 @@ public class TableVertical { @JsonProperty(value = "weightColumnName") private String weightColumnName; - /** Creates an instance of TableVertical class. */ + /** + * Creates an instance of TableVertical class. + */ public TableVertical() { } /** * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * + * * @return the cvSplitColumnNames value. */ public List cvSplitColumnNames() { @@ -86,7 +108,7 @@ public List cvSplitColumnNames() { /** * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * + * * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the TableVertical object itself. */ @@ -97,7 +119,7 @@ public TableVertical withCvSplitColumnNames(List cvSplitColumnNames) { /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @return the featurizationSettings value. */ public TableVerticalFeaturizationSettings featurizationSettings() { @@ -106,7 +128,7 @@ public TableVerticalFeaturizationSettings featurizationSettings() { /** * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @param featurizationSettings the featurizationSettings value to set. * @return the TableVertical object itself. */ @@ -115,9 +137,29 @@ public TableVertical withFeaturizationSettings(TableVerticalFeaturizationSetting return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public TableFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the TableVertical object itself. + */ + public TableVertical withFixedParameters(TableFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. - * + * * @return the limitSettings value. */ public TableVerticalLimitSettings limitSettings() { @@ -126,7 +168,7 @@ public TableVerticalLimitSettings limitSettings() { /** * Set the limitSettings property: Execution constraints for AutoMLJob. - * + * * @param limitSettings the limitSettings value to set. * @return the TableVertical object itself. */ @@ -136,9 +178,9 @@ public TableVertical withLimitSettings(TableVerticalLimitSettings limitSettings) } /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * + * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. + * * @return the nCrossValidations value. */ public NCrossValidations nCrossValidations() { @@ -146,9 +188,9 @@ public NCrossValidations nCrossValidations() { } /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * + * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. + * * @param nCrossValidations the nCrossValidations value to set. * @return the TableVertical object itself. */ @@ -157,9 +199,51 @@ public TableVertical withNCrossValidations(NCrossValidations nCrossValidations) return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the TableVertical object itself. + */ + public TableVertical withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public TableSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the TableVertical object itself. + */ + public TableVertical withSweepSettings(TableSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + /** * Get the testData property: Test data input. - * + * * @return the testData value. */ public MLTableJobInput testData() { @@ -168,7 +252,7 @@ public MLTableJobInput testData() { /** * Set the testData property: Test data input. - * + * * @param testData the testData value to set. * @return the TableVertical object itself. */ @@ -179,8 +263,9 @@ public TableVertical withTestData(MLTableJobInput testData) { /** * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the testDataSize value. */ public Double testDataSize() { @@ -189,8 +274,9 @@ public Double testDataSize() { /** * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param testDataSize the testDataSize value to set. * @return the TableVertical object itself. */ @@ -201,7 +287,7 @@ public TableVertical withTestDataSize(Double testDataSize) { /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -210,7 +296,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the TableVertical object itself. */ @@ -221,8 +307,10 @@ public TableVertical withValidationData(MLTableJobInput validationData) { /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @return the validationDataSize value. */ public Double validationDataSize() { @@ -231,8 +319,10 @@ public Double validationDataSize() { /** * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * + * purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + * * @param validationDataSize the validationDataSize value to set. * @return the TableVertical object itself. */ @@ -244,7 +334,7 @@ public TableVertical withValidationDataSize(Double validationDataSize) { /** * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column * as an input, causing rows in the data to be weighted up or down. - * + * * @return the weightColumnName value. */ public String weightColumnName() { @@ -254,7 +344,7 @@ public String weightColumnName() { /** * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column * as an input, causing rows in the data to be weighted up or down. - * + * * @param weightColumnName the weightColumnName value to set. * @return the TableVertical object itself. */ @@ -265,19 +355,28 @@ public TableVertical withWeightColumnName(String weightColumnName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } if (nCrossValidations() != null) { nCrossValidations().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } if (testData() != null) { testData().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java index d7ab964abe6df..f9260b7bd558d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java @@ -10,7 +10,9 @@ import java.util.List; import java.util.Map; -/** Featurization Configuration. */ +/** + * Featurization Configuration. + */ @Fluent public final class TableVerticalFeaturizationSettings extends FeaturizationSettings { /* @@ -49,13 +51,15 @@ public final class TableVerticalFeaturizationSettings extends FeaturizationSetti @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map> transformerParams; - /** Creates an instance of TableVerticalFeaturizationSettings class. */ + /** + * Creates an instance of TableVerticalFeaturizationSettings class. + */ public TableVerticalFeaturizationSettings() { } /** * Get the blockedTransformers property: These transformers shall not be used in featurization. - * + * * @return the blockedTransformers value. */ public List blockedTransformers() { @@ -64,7 +68,7 @@ public List blockedTransformers() { /** * Set the blockedTransformers property: These transformers shall not be used in featurization. - * + * * @param blockedTransformers the blockedTransformers value to set. * @return the TableVerticalFeaturizationSettings object itself. */ @@ -75,7 +79,7 @@ public TableVerticalFeaturizationSettings withBlockedTransformers(List columnNameAndTypes() { @@ -84,7 +88,7 @@ public Map columnNameAndTypes() { /** * Set the columnNameAndTypes property: Dictionary of column name and its type (int, float, string, datetime etc). - * + * * @param columnNameAndTypes the columnNameAndTypes value to set. * @return the TableVerticalFeaturizationSettings object itself. */ @@ -95,7 +99,7 @@ public TableVerticalFeaturizationSettings withColumnNameAndTypes(Map> transformerParams() { @@ -148,19 +154,21 @@ public Map> transformerParams() { } /** - * Set the transformerParams property: User can specify additional transformers to be used along with the columns to - * which it would be applied and parameters for the transformer constructor. - * + * Set the transformerParams property: User can specify additional transformers to be used along with the columns + * to which it would be applied and parameters for the transformer constructor. + * * @param transformerParams the transformerParams value to set. * @return the TableVerticalFeaturizationSettings object itself. */ - public TableVerticalFeaturizationSettings withTransformerParams( - Map> transformerParams) { + public TableVerticalFeaturizationSettings + withTransformerParams(Map> transformerParams) { this.transformerParams = transformerParams; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TableVerticalFeaturizationSettings withDatasetLanguage(String datasetLanguage) { super.withDatasetLanguage(datasetLanguage); @@ -169,21 +177,18 @@ public TableVerticalFeaturizationSettings withDatasetLanguage(String datasetLang /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (transformerParams() != null) { - transformerParams() - .values() - .forEach( - e -> { - if (e != null) { - e.forEach(e1 -> e1.validate()); - } - }); + transformerParams().values().forEach(e -> { + if (e != null) { + e.forEach(e1 -> e1.validate()); + } + }); } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java index 92ee3e6cee9bb..1793adb02229d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; -/** Job execution constraints. */ +/** + * Job execution constraints. + */ @Fluent public final class TableVerticalLimitSettings { /* @@ -36,12 +38,30 @@ public final class TableVerticalLimitSettings { @JsonProperty(value = "maxCoresPerTrial") private Integer maxCoresPerTrial; + /* + * Maximum nodes to use for the experiment. + */ + @JsonProperty(value = "maxNodes") + private Integer maxNodes; + /* * Number of iterations. */ @JsonProperty(value = "maxTrials") private Integer maxTrials; + /* + * Number of concurrent sweeping runs that user wants to trigger. + */ + @JsonProperty(value = "sweepConcurrentTrials") + private Integer sweepConcurrentTrials; + + /* + * Number of sweeping runs that user wants to trigger. + */ + @JsonProperty(value = "sweepTrials") + private Integer sweepTrials; + /* * AutoML job timeout. */ @@ -54,14 +74,16 @@ public final class TableVerticalLimitSettings { @JsonProperty(value = "trialTimeout") private Duration trialTimeout; - /** Creates an instance of TableVerticalLimitSettings class. */ + /** + * Creates an instance of TableVerticalLimitSettings class. + */ public TableVerticalLimitSettings() { } /** * Get the enableEarlyTermination property: Enable early termination, determines whether or not if AutoMLJob will * terminate early if there is no score improvement in last 20 iterations. - * + * * @return the enableEarlyTermination value. */ public Boolean enableEarlyTermination() { @@ -71,7 +93,7 @@ public Boolean enableEarlyTermination() { /** * Set the enableEarlyTermination property: Enable early termination, determines whether or not if AutoMLJob will * terminate early if there is no score improvement in last 20 iterations. - * + * * @param enableEarlyTermination the enableEarlyTermination value to set. * @return the TableVerticalLimitSettings object itself. */ @@ -82,7 +104,7 @@ public TableVerticalLimitSettings withEnableEarlyTermination(Boolean enableEarly /** * Get the exitScore property: Exit score for the AutoML job. - * + * * @return the exitScore value. */ public Double exitScore() { @@ -91,7 +113,7 @@ public Double exitScore() { /** * Set the exitScore property: Exit score for the AutoML job. - * + * * @param exitScore the exitScore value to set. * @return the TableVerticalLimitSettings object itself. */ @@ -102,7 +124,7 @@ public TableVerticalLimitSettings withExitScore(Double exitScore) { /** * Get the maxConcurrentTrials property: Maximum Concurrent iterations. - * + * * @return the maxConcurrentTrials value. */ public Integer maxConcurrentTrials() { @@ -111,7 +133,7 @@ public Integer maxConcurrentTrials() { /** * Set the maxConcurrentTrials property: Maximum Concurrent iterations. - * + * * @param maxConcurrentTrials the maxConcurrentTrials value to set. * @return the TableVerticalLimitSettings object itself. */ @@ -122,7 +144,7 @@ public TableVerticalLimitSettings withMaxConcurrentTrials(Integer maxConcurrentT /** * Get the maxCoresPerTrial property: Max cores per iteration. - * + * * @return the maxCoresPerTrial value. */ public Integer maxCoresPerTrial() { @@ -131,7 +153,7 @@ public Integer maxCoresPerTrial() { /** * Set the maxCoresPerTrial property: Max cores per iteration. - * + * * @param maxCoresPerTrial the maxCoresPerTrial value to set. * @return the TableVerticalLimitSettings object itself. */ @@ -140,9 +162,29 @@ public TableVerticalLimitSettings withMaxCoresPerTrial(Integer maxCoresPerTrial) return this; } + /** + * Get the maxNodes property: Maximum nodes to use for the experiment. + * + * @return the maxNodes value. + */ + public Integer maxNodes() { + return this.maxNodes; + } + + /** + * Set the maxNodes property: Maximum nodes to use for the experiment. + * + * @param maxNodes the maxNodes value to set. + * @return the TableVerticalLimitSettings object itself. + */ + public TableVerticalLimitSettings withMaxNodes(Integer maxNodes) { + this.maxNodes = maxNodes; + return this; + } + /** * Get the maxTrials property: Number of iterations. - * + * * @return the maxTrials value. */ public Integer maxTrials() { @@ -151,7 +193,7 @@ public Integer maxTrials() { /** * Set the maxTrials property: Number of iterations. - * + * * @param maxTrials the maxTrials value to set. * @return the TableVerticalLimitSettings object itself. */ @@ -160,9 +202,49 @@ public TableVerticalLimitSettings withMaxTrials(Integer maxTrials) { return this; } + /** + * Get the sweepConcurrentTrials property: Number of concurrent sweeping runs that user wants to trigger. + * + * @return the sweepConcurrentTrials value. + */ + public Integer sweepConcurrentTrials() { + return this.sweepConcurrentTrials; + } + + /** + * Set the sweepConcurrentTrials property: Number of concurrent sweeping runs that user wants to trigger. + * + * @param sweepConcurrentTrials the sweepConcurrentTrials value to set. + * @return the TableVerticalLimitSettings object itself. + */ + public TableVerticalLimitSettings withSweepConcurrentTrials(Integer sweepConcurrentTrials) { + this.sweepConcurrentTrials = sweepConcurrentTrials; + return this; + } + + /** + * Get the sweepTrials property: Number of sweeping runs that user wants to trigger. + * + * @return the sweepTrials value. + */ + public Integer sweepTrials() { + return this.sweepTrials; + } + + /** + * Set the sweepTrials property: Number of sweeping runs that user wants to trigger. + * + * @param sweepTrials the sweepTrials value to set. + * @return the TableVerticalLimitSettings object itself. + */ + public TableVerticalLimitSettings withSweepTrials(Integer sweepTrials) { + this.sweepTrials = sweepTrials; + return this; + } + /** * Get the timeout property: AutoML job timeout. - * + * * @return the timeout value. */ public Duration timeout() { @@ -171,7 +253,7 @@ public Duration timeout() { /** * Set the timeout property: AutoML job timeout. - * + * * @param timeout the timeout value to set. * @return the TableVerticalLimitSettings object itself. */ @@ -182,7 +264,7 @@ public TableVerticalLimitSettings withTimeout(Duration timeout) { /** * Get the trialTimeout property: Iteration timeout. - * + * * @return the trialTimeout value. */ public Duration trialTimeout() { @@ -191,7 +273,7 @@ public Duration trialTimeout() { /** * Set the trialTimeout property: Iteration timeout. - * + * * @param trialTimeout the trialTimeout value to set. * @return the TableVerticalLimitSettings object itself. */ @@ -202,7 +284,7 @@ public TableVerticalLimitSettings withTrialTimeout(Duration trialTimeout) { /** * 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/TargetAggregationFunction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java index 49604b1815276..8e70fe9b7c1ae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Target aggregate function. */ +/** + * Target aggregate function. + */ public final class TargetAggregationFunction extends ExpandableStringEnum { - /** Static value None for TargetAggregationFunction. */ + /** + * Static value None for TargetAggregationFunction. + */ public static final TargetAggregationFunction NONE = fromString("None"); - /** Static value Sum for TargetAggregationFunction. */ + /** + * Static value Sum for TargetAggregationFunction. + */ public static final TargetAggregationFunction SUM = fromString("Sum"); - /** Static value Max for TargetAggregationFunction. */ + /** + * Static value Max for TargetAggregationFunction. + */ public static final TargetAggregationFunction MAX = fromString("Max"); - /** Static value Min for TargetAggregationFunction. */ + /** + * Static value Min for TargetAggregationFunction. + */ public static final TargetAggregationFunction MIN = fromString("Min"); - /** Static value Mean for TargetAggregationFunction. */ + /** + * Static value Mean for TargetAggregationFunction. + */ public static final TargetAggregationFunction MEAN = fromString("Mean"); /** * Creates a new instance of TargetAggregationFunction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public TargetAggregationFunction() { /** * Creates or finds a TargetAggregationFunction from its string representation. - * + * * @param name a name to look for. * @return the corresponding TargetAggregationFunction. */ @@ -47,7 +59,7 @@ public static TargetAggregationFunction fromString(String name) { /** * Gets known TargetAggregationFunction values. - * + * * @return known TargetAggregationFunction values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java index fccdc8d599ffe..2404e466ea028 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The number of past periods to lag from the target column. */ +/** + * The number of past periods to lag from the target column. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,17 +20,18 @@ @JsonTypeName("TargetLags") @JsonSubTypes({ @JsonSubTypes.Type(name = "Auto", value = AutoTargetLags.class), - @JsonSubTypes.Type(name = "Custom", value = CustomTargetLags.class) -}) + @JsonSubTypes.Type(name = "Custom", value = CustomTargetLags.class) }) @Immutable public class TargetLags { - /** Creates an instance of TargetLags class. */ + /** + * Creates an instance of TargetLags class. + */ public TargetLags() { } /** * 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/TargetLagsMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java index ef47b6b6d6b87..599ba8e622e7c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Target lags selection modes. */ +/** + * Target lags selection modes. + */ public final class TargetLagsMode extends ExpandableStringEnum { - /** Static value Auto for TargetLagsMode. */ + /** + * Static value Auto for TargetLagsMode. + */ public static final TargetLagsMode AUTO = fromString("Auto"); - /** Static value Custom for TargetLagsMode. */ + /** + * Static value Custom for TargetLagsMode. + */ public static final TargetLagsMode CUSTOM = fromString("Custom"); /** * Creates a new instance of TargetLagsMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public TargetLagsMode() { /** * Creates or finds a TargetLagsMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding TargetLagsMode. */ @@ -38,7 +44,7 @@ public static TargetLagsMode fromString(String name) { /** * Gets known TargetLagsMode values. - * + * * @return known TargetLagsMode values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java index 3596ee80736e3..0ceb57ba62f4c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Forecasting target rolling window size. */ +/** + * Forecasting target rolling window size. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,17 +20,18 @@ @JsonTypeName("TargetRollingWindowSize") @JsonSubTypes({ @JsonSubTypes.Type(name = "Auto", value = AutoTargetRollingWindowSize.class), - @JsonSubTypes.Type(name = "Custom", value = CustomTargetRollingWindowSize.class) -}) + @JsonSubTypes.Type(name = "Custom", value = CustomTargetRollingWindowSize.class) }) @Immutable public class TargetRollingWindowSize { - /** Creates an instance of TargetRollingWindowSize class. */ + /** + * Creates an instance of TargetRollingWindowSize class. + */ public TargetRollingWindowSize() { } /** * 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/TargetRollingWindowSizeMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java index abd6fa5e2f673..2d8a27c1b7030 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Target rolling windows size mode. */ +/** + * Target rolling windows size mode. + */ public final class TargetRollingWindowSizeMode extends ExpandableStringEnum { - /** Static value Auto for TargetRollingWindowSizeMode. */ + /** + * Static value Auto for TargetRollingWindowSizeMode. + */ public static final TargetRollingWindowSizeMode AUTO = fromString("Auto"); - /** Static value Custom for TargetRollingWindowSizeMode. */ + /** + * Static value Custom for TargetRollingWindowSizeMode. + */ public static final TargetRollingWindowSizeMode CUSTOM = fromString("Custom"); /** * Creates a new instance of TargetRollingWindowSizeMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public TargetRollingWindowSizeMode() { /** * Creates or finds a TargetRollingWindowSizeMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding TargetRollingWindowSizeMode. */ @@ -38,7 +44,7 @@ public static TargetRollingWindowSizeMode fromString(String name) { /** * Gets known TargetRollingWindowSizeMode values. - * + * * @return known TargetRollingWindowSizeMode values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java index c40f464a708f7..7c629418f0169 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.Duration; -/** The TargetUtilizationScaleSettings model. */ +/** + * The TargetUtilizationScaleSettings model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scaleType") @JsonTypeName("TargetUtilization") @Fluent @@ -39,14 +41,16 @@ public final class TargetUtilizationScaleSettings extends OnlineScaleSettings { @JsonProperty(value = "targetUtilizationPercentage") private Integer targetUtilizationPercentage; - /** Creates an instance of TargetUtilizationScaleSettings class. */ + /** + * Creates an instance of TargetUtilizationScaleSettings class. + */ public TargetUtilizationScaleSettings() { } /** * Get the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will * be reserved for max_instances. - * + * * @return the maxInstances value. */ public Integer maxInstances() { @@ -56,7 +60,7 @@ public Integer maxInstances() { /** * Set the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will * be reserved for max_instances. - * + * * @param maxInstances the maxInstances value to set. * @return the TargetUtilizationScaleSettings object itself. */ @@ -67,7 +71,7 @@ public TargetUtilizationScaleSettings withMaxInstances(Integer maxInstances) { /** * Get the minInstances property: The minimum number of instances to always be present. - * + * * @return the minInstances value. */ public Integer minInstances() { @@ -76,7 +80,7 @@ public Integer minInstances() { /** * Set the minInstances property: The minimum number of instances to always be present. - * + * * @param minInstances the minInstances value to set. * @return the TargetUtilizationScaleSettings object itself. */ @@ -88,7 +92,7 @@ public TargetUtilizationScaleSettings withMinInstances(Integer minInstances) { /** * Get the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision * as low as Seconds. - * + * * @return the pollingInterval value. */ public Duration pollingInterval() { @@ -98,7 +102,7 @@ public Duration pollingInterval() { /** * Set the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision * as low as Seconds. - * + * * @param pollingInterval the pollingInterval value to set. * @return the TargetUtilizationScaleSettings object itself. */ @@ -109,7 +113,7 @@ public TargetUtilizationScaleSettings withPollingInterval(Duration pollingInterv /** * Get the targetUtilizationPercentage property: Target CPU usage for the autoscaler. - * + * * @return the targetUtilizationPercentage value. */ public Integer targetUtilizationPercentage() { @@ -118,7 +122,7 @@ public Integer targetUtilizationPercentage() { /** * Set the targetUtilizationPercentage property: Target CPU usage for the autoscaler. - * + * * @param targetUtilizationPercentage the targetUtilizationPercentage value to set. * @return the TargetUtilizationScaleSettings object itself. */ @@ -129,7 +133,7 @@ public TargetUtilizationScaleSettings withTargetUtilizationPercentage(Integer ta /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java index abf23d57afbba..9b0dbd5049857 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java @@ -8,41 +8,63 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** AutoMLJob Task type. */ +/** + * AutoMLJob Task type. + */ public final class TaskType extends ExpandableStringEnum { - /** Static value Classification for TaskType. */ + /** + * Static value Classification for TaskType. + */ public static final TaskType CLASSIFICATION = fromString("Classification"); - /** Static value Regression for TaskType. */ + /** + * Static value Regression for TaskType. + */ public static final TaskType REGRESSION = fromString("Regression"); - /** Static value Forecasting for TaskType. */ + /** + * Static value Forecasting for TaskType. + */ public static final TaskType FORECASTING = fromString("Forecasting"); - /** Static value ImageClassification for TaskType. */ + /** + * Static value ImageClassification for TaskType. + */ public static final TaskType IMAGE_CLASSIFICATION = fromString("ImageClassification"); - /** Static value ImageClassificationMultilabel for TaskType. */ + /** + * Static value ImageClassificationMultilabel for TaskType. + */ public static final TaskType IMAGE_CLASSIFICATION_MULTILABEL = fromString("ImageClassificationMultilabel"); - /** Static value ImageObjectDetection for TaskType. */ + /** + * Static value ImageObjectDetection for TaskType. + */ public static final TaskType IMAGE_OBJECT_DETECTION = fromString("ImageObjectDetection"); - /** Static value ImageInstanceSegmentation for TaskType. */ + /** + * Static value ImageInstanceSegmentation for TaskType. + */ public static final TaskType IMAGE_INSTANCE_SEGMENTATION = fromString("ImageInstanceSegmentation"); - /** Static value TextClassification for TaskType. */ + /** + * Static value TextClassification for TaskType. + */ public static final TaskType TEXT_CLASSIFICATION = fromString("TextClassification"); - /** Static value TextClassificationMultilabel for TaskType. */ + /** + * Static value TextClassificationMultilabel for TaskType. + */ public static final TaskType TEXT_CLASSIFICATION_MULTILABEL = fromString("TextClassificationMultilabel"); - /** Static value TextNER for TaskType. */ + /** + * Static value TextNER for TaskType. + */ public static final TaskType TEXT_NER = fromString("TextNER"); /** * Creates a new instance of TaskType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -51,7 +73,7 @@ public TaskType() { /** * Creates or finds a TaskType from its string representation. - * + * * @param name a name to look for. * @return the corresponding TaskType. */ @@ -62,7 +84,7 @@ public static TaskType fromString(String name) { /** * Gets known TaskType values. - * + * * @return known TaskType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java index 618e0345d142e..cef364dccd702 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** TensorFlow distribution configuration. */ +/** + * TensorFlow distribution configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") @JsonTypeName("TensorFlow") @Fluent @@ -26,13 +28,15 @@ public final class TensorFlow extends DistributionConfiguration { @JsonProperty(value = "workerCount") private Integer workerCount; - /** Creates an instance of TensorFlow class. */ + /** + * Creates an instance of TensorFlow class. + */ public TensorFlow() { } /** * Get the parameterServerCount property: Number of parameter server tasks. - * + * * @return the parameterServerCount value. */ public Integer parameterServerCount() { @@ -41,7 +45,7 @@ public Integer parameterServerCount() { /** * Set the parameterServerCount property: Number of parameter server tasks. - * + * * @param parameterServerCount the parameterServerCount value to set. * @return the TensorFlow object itself. */ @@ -52,7 +56,7 @@ public TensorFlow withParameterServerCount(Integer parameterServerCount) { /** * Get the workerCount property: Number of workers. If not specified, will default to the instance count. - * + * * @return the workerCount value. */ public Integer workerCount() { @@ -61,7 +65,7 @@ public Integer workerCount() { /** * Set the workerCount property: Number of workers. If not specified, will default to the instance count. - * + * * @param workerCount the workerCount value to set. * @return the TensorFlow object itself. */ @@ -72,7 +76,7 @@ public TensorFlow withWorkerCount(Integer workerCount) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextAnnotationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextAnnotationType.java new file mode 100644 index 0000000000000..1f7b6039d7e2a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextAnnotationType.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; + +/** + * Annotation type of text data. + */ +public final class TextAnnotationType extends ExpandableStringEnum { + /** + * Static value Classification for TextAnnotationType. + */ + public static final TextAnnotationType CLASSIFICATION = fromString("Classification"); + + /** + * Static value NamedEntityRecognition for TextAnnotationType. + */ + public static final TextAnnotationType NAMED_ENTITY_RECOGNITION = fromString("NamedEntityRecognition"); + + /** + * Creates a new instance of TextAnnotationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TextAnnotationType() { + } + + /** + * Creates or finds a TextAnnotationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TextAnnotationType. + */ + @JsonCreator + public static TextAnnotationType fromString(String name) { + return fromString(name, TextAnnotationType.class); + } + + /** + * Gets known TextAnnotationType values. + * + * @return known TextAnnotationType values. + */ + public static Collection values() { + return values(TextAnnotationType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java index 72f0a652601ee..6318ffbf440b5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java @@ -8,8 +8,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; -/** Text Classification task in AutoML NLP vertical. NLP - Natural Language Processing. */ +/** + * Text Classification task in AutoML NLP vertical. + * NLP - Natural Language Processing. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("TextClassification") @Fluent @@ -26,25 +30,45 @@ public final class TextClassification extends AutoMLVertical { @JsonProperty(value = "featurizationSettings") private NlpVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private NlpFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private NlpSweepSettings sweepSettings; + /* * Validation data inputs. */ @JsonProperty(value = "validationData") private MLTableJobInput validationData; - /** Creates an instance of TextClassification class. */ + /** + * Creates an instance of TextClassification class. + */ public TextClassification() { } /** * Get the primaryMetric property: Primary metric for Text-Classification task. - * + * * @return the primaryMetric value. */ public ClassificationPrimaryMetrics primaryMetric() { @@ -53,7 +77,7 @@ public ClassificationPrimaryMetrics primaryMetric() { /** * Set the primaryMetric property: Primary metric for Text-Classification task. - * + * * @param primaryMetric the primaryMetric value to set. * @return the TextClassification object itself. */ @@ -64,7 +88,7 @@ public TextClassification withPrimaryMetric(ClassificationPrimaryMetrics primary /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @return the featurizationSettings value. */ public NlpVerticalFeaturizationSettings featurizationSettings() { @@ -73,7 +97,7 @@ public NlpVerticalFeaturizationSettings featurizationSettings() { /** * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @param featurizationSettings the featurizationSettings value to set. * @return the TextClassification object itself. */ @@ -82,9 +106,29 @@ public TextClassification withFeaturizationSettings(NlpVerticalFeaturizationSett return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public NlpFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the TextClassification object itself. + */ + public TextClassification withFixedParameters(NlpFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. - * + * * @return the limitSettings value. */ public NlpVerticalLimitSettings limitSettings() { @@ -93,7 +137,7 @@ public NlpVerticalLimitSettings limitSettings() { /** * Set the limitSettings property: Execution constraints for AutoMLJob. - * + * * @param limitSettings the limitSettings value to set. * @return the TextClassification object itself. */ @@ -102,9 +146,51 @@ public TextClassification withLimitSettings(NlpVerticalLimitSettings limitSettin return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the TextClassification object itself. + */ + public TextClassification withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public NlpSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the TextClassification object itself. + */ + public TextClassification withSweepSettings(NlpSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -113,7 +199,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the TextClassification object itself. */ @@ -122,21 +208,27 @@ public TextClassification withValidationData(MLTableJobInput validationData) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TextClassification withLogVerbosity(LogVerbosity logVerbosity) { super.withLogVerbosity(logVerbosity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TextClassification withTargetColumnName(String targetColumnName) { super.withTargetColumnName(targetColumnName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TextClassification withTrainingData(MLTableJobInput trainingData) { super.withTrainingData(trainingData); @@ -145,7 +237,7 @@ public TextClassification withTrainingData(MLTableJobInput trainingData) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -154,9 +246,18 @@ public void validate() { if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } if (validationData() != null) { validationData().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java index ceb85f9675e78..2ebb57b823b56 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java @@ -8,8 +8,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; -/** Text Classification Multilabel task in AutoML NLP vertical. NLP - Natural Language Processing. */ +/** + * Text Classification Multilabel task in AutoML NLP vertical. + * NLP - Natural Language Processing. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("TextClassificationMultilabel") @Fluent @@ -27,26 +31,46 @@ public final class TextClassificationMultilabel extends AutoMLVertical { @JsonProperty(value = "featurizationSettings") private NlpVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private NlpFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private NlpSweepSettings sweepSettings; + /* * Validation data inputs. */ @JsonProperty(value = "validationData") private MLTableJobInput validationData; - /** Creates an instance of TextClassificationMultilabel class. */ + /** + * Creates an instance of TextClassificationMultilabel class. + */ public TextClassificationMultilabel() { } /** - * Get the primaryMetric property: Primary metric for Text-Classification-Multilabel task. Currently only Accuracy - * is supported as primary metric, hence user need not set it explicitly. - * + * Get the primaryMetric property: Primary metric for Text-Classification-Multilabel task. + * Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. + * * @return the primaryMetric value. */ public ClassificationMultilabelPrimaryMetrics primaryMetric() { @@ -55,7 +79,7 @@ public ClassificationMultilabelPrimaryMetrics primaryMetric() { /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @return the featurizationSettings value. */ public NlpVerticalFeaturizationSettings featurizationSettings() { @@ -64,19 +88,39 @@ public NlpVerticalFeaturizationSettings featurizationSettings() { /** * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @param featurizationSettings the featurizationSettings value to set. * @return the TextClassificationMultilabel object itself. */ - public TextClassificationMultilabel withFeaturizationSettings( - NlpVerticalFeaturizationSettings featurizationSettings) { + public TextClassificationMultilabel + withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { this.featurizationSettings = featurizationSettings; return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public NlpFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the TextClassificationMultilabel object itself. + */ + public TextClassificationMultilabel withFixedParameters(NlpFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. - * + * * @return the limitSettings value. */ public NlpVerticalLimitSettings limitSettings() { @@ -85,7 +129,7 @@ public NlpVerticalLimitSettings limitSettings() { /** * Set the limitSettings property: Execution constraints for AutoMLJob. - * + * * @param limitSettings the limitSettings value to set. * @return the TextClassificationMultilabel object itself. */ @@ -94,9 +138,51 @@ public TextClassificationMultilabel withLimitSettings(NlpVerticalLimitSettings l return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the TextClassificationMultilabel object itself. + */ + public TextClassificationMultilabel withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public NlpSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the TextClassificationMultilabel object itself. + */ + public TextClassificationMultilabel withSweepSettings(NlpSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -105,7 +191,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the TextClassificationMultilabel object itself. */ @@ -114,21 +200,27 @@ public TextClassificationMultilabel withValidationData(MLTableJobInput validatio return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { super.withLogVerbosity(logVerbosity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TextClassificationMultilabel withTargetColumnName(String targetColumnName) { super.withTargetColumnName(targetColumnName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TextClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { super.withTrainingData(trainingData); @@ -137,7 +229,7 @@ public TextClassificationMultilabel withTrainingData(MLTableJobInput trainingDat /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -146,9 +238,18 @@ public void validate() { if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } if (validationData() != null) { validationData().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java index ed17e1f9beb25..4af0d97f31cf3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java @@ -8,8 +8,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; -/** Text-NER task in AutoML NLP vertical. NER - Named Entity Recognition. NLP - Natural Language Processing. */ +/** + * Text-NER task in AutoML NLP vertical. + * NER - Named Entity Recognition. + * NLP - Natural Language Processing. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") @JsonTypeName("TextNER") @Fluent @@ -27,26 +32,46 @@ public final class TextNer extends AutoMLVertical { @JsonProperty(value = "featurizationSettings") private NlpVerticalFeaturizationSettings featurizationSettings; + /* + * Model/training parameters that will remain constant throughout training. + */ + @JsonProperty(value = "fixedParameters") + private NlpFixedParameters fixedParameters; + /* * Execution constraints for AutoMLJob. */ @JsonProperty(value = "limitSettings") private NlpVerticalLimitSettings limitSettings; + /* + * Search space for sampling different combinations of models and their hyperparameters. + */ + @JsonProperty(value = "searchSpace") + private List searchSpace; + + /* + * Settings for model sweeping and hyperparameter tuning. + */ + @JsonProperty(value = "sweepSettings") + private NlpSweepSettings sweepSettings; + /* * Validation data inputs. */ @JsonProperty(value = "validationData") private MLTableJobInput validationData; - /** Creates an instance of TextNer class. */ + /** + * Creates an instance of TextNer class. + */ public TextNer() { } /** - * Get the primaryMetric property: Primary metric for Text-NER task. Only 'Accuracy' is supported for Text-NER, so - * user need not set this explicitly. - * + * Get the primaryMetric property: Primary metric for Text-NER task. + * Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + * * @return the primaryMetric value. */ public ClassificationPrimaryMetrics primaryMetric() { @@ -55,7 +80,7 @@ public ClassificationPrimaryMetrics primaryMetric() { /** * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @return the featurizationSettings value. */ public NlpVerticalFeaturizationSettings featurizationSettings() { @@ -64,7 +89,7 @@ public NlpVerticalFeaturizationSettings featurizationSettings() { /** * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * + * * @param featurizationSettings the featurizationSettings value to set. * @return the TextNer object itself. */ @@ -73,9 +98,29 @@ public TextNer withFeaturizationSettings(NlpVerticalFeaturizationSettings featur return this; } + /** + * Get the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @return the fixedParameters value. + */ + public NlpFixedParameters fixedParameters() { + return this.fixedParameters; + } + + /** + * Set the fixedParameters property: Model/training parameters that will remain constant throughout training. + * + * @param fixedParameters the fixedParameters value to set. + * @return the TextNer object itself. + */ + public TextNer withFixedParameters(NlpFixedParameters fixedParameters) { + this.fixedParameters = fixedParameters; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. - * + * * @return the limitSettings value. */ public NlpVerticalLimitSettings limitSettings() { @@ -84,7 +129,7 @@ public NlpVerticalLimitSettings limitSettings() { /** * Set the limitSettings property: Execution constraints for AutoMLJob. - * + * * @param limitSettings the limitSettings value to set. * @return the TextNer object itself. */ @@ -93,9 +138,51 @@ public TextNer withLimitSettings(NlpVerticalLimitSettings limitSettings) { return this; } + /** + * Get the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @return the searchSpace value. + */ + public List searchSpace() { + return this.searchSpace; + } + + /** + * Set the searchSpace property: Search space for sampling different combinations of models and their + * hyperparameters. + * + * @param searchSpace the searchSpace value to set. + * @return the TextNer object itself. + */ + public TextNer withSearchSpace(List searchSpace) { + this.searchSpace = searchSpace; + return this; + } + + /** + * Get the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @return the sweepSettings value. + */ + public NlpSweepSettings sweepSettings() { + return this.sweepSettings; + } + + /** + * Set the sweepSettings property: Settings for model sweeping and hyperparameter tuning. + * + * @param sweepSettings the sweepSettings value to set. + * @return the TextNer object itself. + */ + public TextNer withSweepSettings(NlpSweepSettings sweepSettings) { + this.sweepSettings = sweepSettings; + return this; + } + /** * Get the validationData property: Validation data inputs. - * + * * @return the validationData value. */ public MLTableJobInput validationData() { @@ -104,7 +191,7 @@ public MLTableJobInput validationData() { /** * Set the validationData property: Validation data inputs. - * + * * @param validationData the validationData value to set. * @return the TextNer object itself. */ @@ -113,21 +200,27 @@ public TextNer withValidationData(MLTableJobInput validationData) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TextNer withLogVerbosity(LogVerbosity logVerbosity) { super.withLogVerbosity(logVerbosity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TextNer withTargetColumnName(String targetColumnName) { super.withTargetColumnName(targetColumnName); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TextNer withTrainingData(MLTableJobInput trainingData) { super.withTrainingData(trainingData); @@ -136,7 +229,7 @@ public TextNer withTrainingData(MLTableJobInput trainingData) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override @@ -145,9 +238,18 @@ public void validate() { if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (fixedParameters() != null) { + fixedParameters().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } + if (searchSpace() != null) { + searchSpace().forEach(e -> e.validate()); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } if (validationData() != null) { validationData().validate(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ThrottlingRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ThrottlingRule.java new file mode 100644 index 0000000000000..140ae91bf996b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ThrottlingRule.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; + +/** + * The ThrottlingRule model. + */ +@Fluent +public final class ThrottlingRule { + /* + * The key property. + */ + @JsonProperty(value = "key") + private String key; + + /* + * The renewalPeriod property. + */ + @JsonProperty(value = "renewalPeriod") + private Float renewalPeriod; + + /* + * The count property. + */ + @JsonProperty(value = "count") + private Float count; + + /* + * The minCount property. + */ + @JsonProperty(value = "minCount") + private Float minCount; + + /* + * The dynamicThrottlingEnabled property. + */ + @JsonProperty(value = "dynamicThrottlingEnabled") + private Boolean dynamicThrottlingEnabled; + + /* + * The matchPatterns property. + */ + @JsonProperty(value = "matchPatterns") + private List matchPatterns; + + /** + * Creates an instance of ThrottlingRule class. + */ + public ThrottlingRule() { + } + + /** + * Get the key property: The key property. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The key property. + * + * @param key the key value to set. + * @return the ThrottlingRule object itself. + */ + public ThrottlingRule withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the renewalPeriod property: The renewalPeriod property. + * + * @return the renewalPeriod value. + */ + public Float renewalPeriod() { + return this.renewalPeriod; + } + + /** + * Set the renewalPeriod property: The renewalPeriod property. + * + * @param renewalPeriod the renewalPeriod value to set. + * @return the ThrottlingRule object itself. + */ + public ThrottlingRule withRenewalPeriod(Float renewalPeriod) { + this.renewalPeriod = renewalPeriod; + return this; + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + public Float count() { + return this.count; + } + + /** + * Set the count property: The count property. + * + * @param count the count value to set. + * @return the ThrottlingRule object itself. + */ + public ThrottlingRule withCount(Float count) { + this.count = count; + return this; + } + + /** + * Get the minCount property: The minCount property. + * + * @return the minCount value. + */ + public Float minCount() { + return this.minCount; + } + + /** + * Set the minCount property: The minCount property. + * + * @param minCount the minCount value to set. + * @return the ThrottlingRule object itself. + */ + public ThrottlingRule withMinCount(Float minCount) { + this.minCount = minCount; + return this; + } + + /** + * Get the dynamicThrottlingEnabled property: The dynamicThrottlingEnabled property. + * + * @return the dynamicThrottlingEnabled value. + */ + public Boolean dynamicThrottlingEnabled() { + return this.dynamicThrottlingEnabled; + } + + /** + * Set the dynamicThrottlingEnabled property: The dynamicThrottlingEnabled property. + * + * @param dynamicThrottlingEnabled the dynamicThrottlingEnabled value to set. + * @return the ThrottlingRule object itself. + */ + public ThrottlingRule withDynamicThrottlingEnabled(Boolean dynamicThrottlingEnabled) { + this.dynamicThrottlingEnabled = dynamicThrottlingEnabled; + return this; + } + + /** + * Get the matchPatterns property: The matchPatterns property. + * + * @return the matchPatterns value. + */ + public List matchPatterns() { + return this.matchPatterns; + } + + /** + * Set the matchPatterns property: The matchPatterns property. + * + * @param matchPatterns the matchPatterns value to set. + * @return the ThrottlingRule object itself. + */ + public ThrottlingRule withMatchPatterns(List matchPatterns) { + this.matchPatterns = matchPatterns; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (matchPatterns() != null) { + matchPatterns().forEach(e -> e.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..153efc81f0a41 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.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 TmpfsOptions model. + */ +@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..f30030c1baaa5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.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.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/TrainingMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingMode.java new file mode 100644 index 0000000000000..25d803e68e9f8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingMode.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Training mode dictates whether to use distributed training or not. + */ +public final class TrainingMode extends ExpandableStringEnum { + /** + * Static value Auto for TrainingMode. + */ + public static final TrainingMode AUTO = fromString("Auto"); + + /** + * Static value Distributed for TrainingMode. + */ + public static final TrainingMode DISTRIBUTED = fromString("Distributed"); + + /** + * Static value NonDistributed for TrainingMode. + */ + public static final TrainingMode NON_DISTRIBUTED = fromString("NonDistributed"); + + /** + * Creates a new instance of TrainingMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TrainingMode() { + } + + /** + * Creates or finds a TrainingMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding TrainingMode. + */ + @JsonCreator + public static TrainingMode fromString(String name) { + return fromString(name, TrainingMode.class); + } + + /** + * Gets known TrainingMode values. + * + * @return known TrainingMode values. + */ + public static Collection values() { + return values(TrainingMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java index cade4da668652..b1bc9aaf96f4e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; -/** Training related configuration. */ +/** + * Training related configuration. + */ @Fluent public class TrainingSettings { /* @@ -55,13 +57,24 @@ public class TrainingSettings { @JsonProperty(value = "stackEnsembleSettings") private StackEnsembleSettings stackEnsembleSettings; - /** Creates an instance of TrainingSettings class. */ + /* + * TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future + * may result in mixed mode or heuristics based mode selection. Default is 'auto'. + * If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. + * If 'NonDistributed' then only non distributed algorithms are chosen. + */ + @JsonProperty(value = "trainingMode") + private TrainingMode trainingMode; + + /** + * Creates an instance of TrainingSettings class. + */ public TrainingSettings() { } /** * Get the enableDnnTraining property: Enable recommendation of DNN models. - * + * * @return the enableDnnTraining value. */ public Boolean enableDnnTraining() { @@ -70,7 +83,7 @@ public Boolean enableDnnTraining() { /** * Set the enableDnnTraining property: Enable recommendation of DNN models. - * + * * @param enableDnnTraining the enableDnnTraining value to set. * @return the TrainingSettings object itself. */ @@ -81,7 +94,7 @@ public TrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { /** * Get the enableModelExplainability property: Flag to turn on explainability on best model. - * + * * @return the enableModelExplainability value. */ public Boolean enableModelExplainability() { @@ -90,7 +103,7 @@ public Boolean enableModelExplainability() { /** * Set the enableModelExplainability property: Flag to turn on explainability on best model. - * + * * @param enableModelExplainability the enableModelExplainability value to set. * @return the TrainingSettings object itself. */ @@ -101,7 +114,7 @@ public TrainingSettings withEnableModelExplainability(Boolean enableModelExplain /** * Get the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. - * + * * @return the enableOnnxCompatibleModels value. */ public Boolean enableOnnxCompatibleModels() { @@ -110,7 +123,7 @@ public Boolean enableOnnxCompatibleModels() { /** * Set the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. - * + * * @param enableOnnxCompatibleModels the enableOnnxCompatibleModels value to set. * @return the TrainingSettings object itself. */ @@ -121,7 +134,7 @@ public TrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompati /** * Get the enableStackEnsemble property: Enable stack ensemble run. - * + * * @return the enableStackEnsemble value. */ public Boolean enableStackEnsemble() { @@ -130,7 +143,7 @@ public Boolean enableStackEnsemble() { /** * Set the enableStackEnsemble property: Enable stack ensemble run. - * + * * @param enableStackEnsemble the enableStackEnsemble value to set. * @return the TrainingSettings object itself. */ @@ -141,7 +154,7 @@ public TrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { /** * Get the enableVoteEnsemble property: Enable voting ensemble run. - * + * * @return the enableVoteEnsemble value. */ public Boolean enableVoteEnsemble() { @@ -150,7 +163,7 @@ public Boolean enableVoteEnsemble() { /** * Set the enableVoteEnsemble property: Enable voting ensemble run. - * + * * @param enableVoteEnsemble the enableVoteEnsemble value to set. * @return the TrainingSettings object itself. */ @@ -160,10 +173,10 @@ public TrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { } /** - * Get the ensembleModelDownloadTimeout property: During VotingEnsemble and StackEnsemble model generation, multiple - * fitted models from the previous child runs are downloaded. Configure this parameter with a higher value than 300 - * secs, if more time is needed. - * + * Get the ensembleModelDownloadTimeout property: During VotingEnsemble and StackEnsemble model generation, + * multiple fitted models from the previous child runs are downloaded. + * Configure this parameter with a higher value than 300 secs, if more time is needed. + * * @return the ensembleModelDownloadTimeout value. */ public Duration ensembleModelDownloadTimeout() { @@ -171,10 +184,10 @@ public Duration ensembleModelDownloadTimeout() { } /** - * Set the ensembleModelDownloadTimeout property: During VotingEnsemble and StackEnsemble model generation, multiple - * fitted models from the previous child runs are downloaded. Configure this parameter with a higher value than 300 - * secs, if more time is needed. - * + * Set the ensembleModelDownloadTimeout property: During VotingEnsemble and StackEnsemble model generation, + * multiple fitted models from the previous child runs are downloaded. + * Configure this parameter with a higher value than 300 secs, if more time is needed. + * * @param ensembleModelDownloadTimeout the ensembleModelDownloadTimeout value to set. * @return the TrainingSettings object itself. */ @@ -185,7 +198,7 @@ public TrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelD /** * Get the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. - * + * * @return the stackEnsembleSettings value. */ public StackEnsembleSettings stackEnsembleSettings() { @@ -194,7 +207,7 @@ public StackEnsembleSettings stackEnsembleSettings() { /** * Set the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. - * + * * @param stackEnsembleSettings the stackEnsembleSettings value to set. * @return the TrainingSettings object itself. */ @@ -203,9 +216,35 @@ public TrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEns return this; } + /** + * Get the trainingMode property: TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' + * for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. + * If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. + * If 'NonDistributed' then only non distributed algorithms are chosen. + * + * @return the trainingMode value. + */ + public TrainingMode trainingMode() { + return this.trainingMode; + } + + /** + * Set the trainingMode property: TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' + * for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. + * If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. + * If 'NonDistributed' then only non distributed algorithms are chosen. + * + * @param trainingMode the trainingMode value to set. + * @return the TrainingSettings object itself. + */ + public TrainingSettings withTrainingMode(TrainingMode trainingMode) { + this.trainingMode = trainingMode; + 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/TrialComponent.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java index 71293f3a75c85..6f4c738714666 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Trial component definition. */ +/** + * Trial component definition. + */ @Fluent public final class TrialComponent { /* @@ -50,13 +52,15 @@ public final class TrialComponent { @JsonProperty(value = "resources") private JobResourceConfiguration resources; - /** Creates an instance of TrialComponent class. */ + /** + * Creates an instance of TrialComponent class. + */ public TrialComponent() { } /** * Get the codeId property: ARM resource ID of the code asset. - * + * * @return the codeId value. */ public String codeId() { @@ -65,7 +69,7 @@ public String codeId() { /** * Set the codeId property: ARM resource ID of the code asset. - * + * * @param codeId the codeId value to set. * @return the TrialComponent object itself. */ @@ -76,7 +80,7 @@ public TrialComponent withCodeId(String codeId) { /** * Get the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * + * * @return the command value. */ public String command() { @@ -85,7 +89,7 @@ public String command() { /** * Set the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * + * * @param command the command value to set. * @return the TrialComponent object itself. */ @@ -97,7 +101,7 @@ public TrialComponent withCommand(String command) { /** * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, * Tensorflow, PyTorch, or null. - * + * * @return the distribution value. */ public DistributionConfiguration distribution() { @@ -107,7 +111,7 @@ public DistributionConfiguration distribution() { /** * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, * Tensorflow, PyTorch, or null. - * + * * @param distribution the distribution value to set. * @return the TrialComponent object itself. */ @@ -118,7 +122,7 @@ public TrialComponent withDistribution(DistributionConfiguration distribution) { /** * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. - * + * * @return the environmentId value. */ public String environmentId() { @@ -127,7 +131,7 @@ public String environmentId() { /** * Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. - * + * * @param environmentId the environmentId value to set. * @return the TrialComponent object itself. */ @@ -138,7 +142,7 @@ public TrialComponent withEnvironmentId(String environmentId) { /** * Get the environmentVariables property: Environment variables included in the job. - * + * * @return the environmentVariables value. */ public Map environmentVariables() { @@ -147,7 +151,7 @@ public Map environmentVariables() { /** * Set the environmentVariables property: Environment variables included in the job. - * + * * @param environmentVariables the environmentVariables value to set. * @return the TrialComponent object itself. */ @@ -158,7 +162,7 @@ public TrialComponent withEnvironmentVariables(Map environmentVa /** * Get the resources property: Compute Resource configuration for the job. - * + * * @return the resources value. */ public JobResourceConfiguration resources() { @@ -167,7 +171,7 @@ public JobResourceConfiguration resources() { /** * Set the resources property: Compute Resource configuration for the job. - * + * * @param resources the resources value to set. * @return the TrialComponent object itself. */ @@ -178,22 +182,20 @@ public TrialComponent withResources(JobResourceConfiguration resources) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (command() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property command in model TrialComponent")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property command in model TrialComponent")); } if (distribution() != null) { distribution().validate(); } if (environmentId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property environmentId in model TrialComponent")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property environmentId in model TrialComponent")); } if (resources() != null) { resources().validate(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java index b7180fe49f25d..507a86363b820 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The TriggerBase model. */ +/** + * The TriggerBase model. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,8 +21,7 @@ @JsonTypeName("TriggerBase") @JsonSubTypes({ @JsonSubTypes.Type(name = "Recurrence", value = RecurrenceTrigger.class), - @JsonSubTypes.Type(name = "Cron", value = CronTrigger.class) -}) + @JsonSubTypes.Type(name = "Cron", value = CronTrigger.class) }) @Fluent public class TriggerBase { /* @@ -46,15 +47,18 @@ public class TriggerBase { @JsonProperty(value = "timeZone") private String timeZone; - /** Creates an instance of TriggerBase class. */ + /** + * Creates an instance of TriggerBase class. + */ public TriggerBase() { } /** * Get the endTime property: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer - * https://en.wikipedia.org/wiki/ISO_8601. Recommented format would be "2022-06-01T00:00:01" If not present, the - * schedule will run indefinitely. - * + * https://en.wikipedia.org/wiki/ISO_8601. + * Recommented format would be "2022-06-01T00:00:01" + * If not present, the schedule will run indefinitely. + * * @return the endTime value. */ public String endTime() { @@ -63,9 +67,10 @@ public String endTime() { /** * Set the endTime property: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer - * https://en.wikipedia.org/wiki/ISO_8601. Recommented format would be "2022-06-01T00:00:01" If not present, the - * schedule will run indefinitely. - * + * https://en.wikipedia.org/wiki/ISO_8601. + * Recommented format would be "2022-06-01T00:00:01" + * If not present, the schedule will run indefinitely. + * * @param endTime the endTime value to set. * @return the TriggerBase object itself. */ @@ -76,7 +81,7 @@ public TriggerBase withEndTime(String endTime) { /** * Get the startTime property: Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - * + * * @return the startTime value. */ public String startTime() { @@ -85,7 +90,7 @@ public String startTime() { /** * Set the startTime property: Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - * + * * @param startTime the startTime value to set. * @return the TriggerBase object itself. */ @@ -95,10 +100,10 @@ public TriggerBase withStartTime(String startTime) { } /** - * Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time - * zone format. Refer: + * 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() { @@ -106,10 +111,10 @@ public String timeZone() { } /** - * Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time - * zone format. Refer: + * 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 TriggerBase object itself. */ @@ -120,7 +125,7 @@ public TriggerBase withTimeZone(String timeZone) { /** * 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/TriggerOnceRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerOnceRequest.java new file mode 100644 index 0000000000000..12cd0b619f048 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerOnceRequest.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The TriggerOnceRequest model. + */ +@Fluent +public final class TriggerOnceRequest { + /* + * [Required] Specify the schedule time for trigger once + */ + @JsonProperty(value = "scheduleTime", required = true) + private String scheduleTime; + + /** + * Creates an instance of TriggerOnceRequest class. + */ + public TriggerOnceRequest() { + } + + /** + * Get the scheduleTime property: [Required] Specify the schedule time for trigger once. + * + * @return the scheduleTime value. + */ + public String scheduleTime() { + return this.scheduleTime; + } + + /** + * Set the scheduleTime property: [Required] Specify the schedule time for trigger once. + * + * @param scheduleTime the scheduleTime value to set. + * @return the TriggerOnceRequest object itself. + */ + public TriggerOnceRequest withScheduleTime(String scheduleTime) { + this.scheduleTime = scheduleTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scheduleTime() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property scheduleTime in model TriggerOnceRequest")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(TriggerOnceRequest.class); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerRunSubmissionDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerRunSubmissionDto.java new file mode 100644 index 0000000000000..a0b21f98f1bf1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerRunSubmissionDto.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.resourcemanager.machinelearning.fluent.models.TriggerRunSubmissionDtoInner; + +/** + * An immutable client-side representation of TriggerRunSubmissionDto. + */ +public interface TriggerRunSubmissionDto { + /** + * Gets the scheduleActionType property: The scheduleActionType property. + * + * @return the scheduleActionType value. + */ + ScheduleType scheduleActionType(); + + /** + * Gets the submissionId property: The submissionId property. + * + * @return the submissionId value. + */ + String submissionId(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.TriggerRunSubmissionDtoInner object. + * + * @return the inner object. + */ + TriggerRunSubmissionDtoInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java index 4f9332d727acd..676599835ddfb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TriggerType. */ +/** + * Defines values for TriggerType. + */ public final class TriggerType extends ExpandableStringEnum { - /** Static value Recurrence for TriggerType. */ + /** + * Static value Recurrence for TriggerType. + */ public static final TriggerType RECURRENCE = fromString("Recurrence"); - /** Static value Cron for TriggerType. */ + /** + * Static value Cron for TriggerType. + */ public static final TriggerType CRON = fromString("Cron"); /** * Creates a new instance of TriggerType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public TriggerType() { /** * Creates or finds a TriggerType from its string representation. - * + * * @param name a name to look for. * @return the corresponding TriggerType. */ @@ -38,7 +44,7 @@ public static TriggerType fromString(String name) { /** * Gets known TriggerType values. - * + * * @return known TriggerType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonInferencingServer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonInferencingServer.java new file mode 100644 index 0000000000000..e8ce5828d811e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonInferencingServer.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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; + +/** + * Triton inferencing server configurations. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "serverType") +@JsonTypeName("Triton") +@Fluent +public final class TritonInferencingServer extends InferencingServer { + /* + * Inference configuration for Triton. + */ + @JsonProperty(value = "inferenceConfiguration") + private OnlineInferenceConfiguration inferenceConfiguration; + + /** + * Creates an instance of TritonInferencingServer class. + */ + public TritonInferencingServer() { + } + + /** + * Get the inferenceConfiguration property: Inference configuration for Triton. + * + * @return the inferenceConfiguration value. + */ + public OnlineInferenceConfiguration inferenceConfiguration() { + return this.inferenceConfiguration; + } + + /** + * Set the inferenceConfiguration property: Inference configuration for Triton. + * + * @param inferenceConfiguration the inferenceConfiguration value to set. + * @return the TritonInferencingServer object itself. + */ + public TritonInferencingServer withInferenceConfiguration(OnlineInferenceConfiguration inferenceConfiguration) { + this.inferenceConfiguration = inferenceConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (inferenceConfiguration() != null) { + inferenceConfiguration().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java index 44b616664524e..afd8e4ba36ee0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The TritonModelJobInput model. */ +/** + * The TritonModelJobInput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") @JsonTypeName("triton_model") @Fluent @@ -21,19 +23,27 @@ public final class TritonModelJobInput extends JobInput { @JsonProperty(value = "mode") private InputDeliveryMode mode; + /* + * Input Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * [Required] Input Asset URI. */ @JsonProperty(value = "uri", required = true) private String uri; - /** Creates an instance of TritonModelJobInput class. */ + /** + * Creates an instance of TritonModelJobInput class. + */ public TritonModelJobInput() { } /** * Get the mode property: Input Asset Delivery Mode. - * + * * @return the mode value. */ public InputDeliveryMode mode() { @@ -42,7 +52,7 @@ public InputDeliveryMode mode() { /** * Set the mode property: Input Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the TritonModelJobInput object itself. */ @@ -51,9 +61,29 @@ public TritonModelJobInput withMode(InputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Input Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Input Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the TritonModelJobInput object itself. + */ + public TritonModelJobInput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: [Required] Input Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -62,7 +92,7 @@ public String uri() { /** * Set the uri property: [Required] Input Asset URI. - * + * * @param uri the uri value to set. * @return the TritonModelJobInput object itself. */ @@ -71,7 +101,9 @@ public TritonModelJobInput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TritonModelJobInput withDescription(String description) { super.withDescription(description); @@ -80,16 +112,15 @@ public TritonModelJobInput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (uri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model TritonModelJobInput")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property uri in model TritonModelJobInput")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java index f7630d5f5c709..120b86a8db8df 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java @@ -9,30 +9,118 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The TritonModelJobOutput model. */ +/** + * The TritonModelJobOutput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") @JsonTypeName("triton_model") @Fluent public final class TritonModelJobOutput extends JobOutput { + /* + * Output Asset Name. + */ + @JsonProperty(value = "assetName") + private String assetName; + + /* + * Output Asset Version. + */ + @JsonProperty(value = "assetVersion") + private String assetVersion; + + /* + * Auto delete setting of output data asset. + */ + @JsonProperty(value = "autoDeleteSetting") + private AutoDeleteSetting autoDeleteSetting; + /* * Output Asset Delivery Mode. */ @JsonProperty(value = "mode") private OutputDeliveryMode mode; + /* + * Output Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * Output Asset URI. */ @JsonProperty(value = "uri") private String uri; - /** Creates an instance of TritonModelJobOutput class. */ + /** + * Creates an instance of TritonModelJobOutput class. + */ public TritonModelJobOutput() { } + /** + * Get the assetName property: Output Asset Name. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Output Asset Name. + * + * @param assetName the assetName value to set. + * @return the TritonModelJobOutput object itself. + */ + public TritonModelJobOutput withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the assetVersion property: Output Asset Version. + * + * @return the assetVersion value. + */ + public String assetVersion() { + return this.assetVersion; + } + + /** + * Set the assetVersion property: Output Asset Version. + * + * @param assetVersion the assetVersion value to set. + * @return the TritonModelJobOutput object itself. + */ + public TritonModelJobOutput withAssetVersion(String assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @return the autoDeleteSetting value. + */ + public AutoDeleteSetting autoDeleteSetting() { + return this.autoDeleteSetting; + } + + /** + * Set the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @param autoDeleteSetting the autoDeleteSetting value to set. + * @return the TritonModelJobOutput object itself. + */ + public TritonModelJobOutput withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + this.autoDeleteSetting = autoDeleteSetting; + return this; + } + /** * Get the mode property: Output Asset Delivery Mode. - * + * * @return the mode value. */ public OutputDeliveryMode mode() { @@ -41,7 +129,7 @@ public OutputDeliveryMode mode() { /** * Set the mode property: Output Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the TritonModelJobOutput object itself. */ @@ -50,9 +138,29 @@ public TritonModelJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Output Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Output Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the TritonModelJobOutput object itself. + */ + public TritonModelJobOutput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: Output Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -61,7 +169,7 @@ public String uri() { /** * Set the uri property: Output Asset URI. - * + * * @param uri the uri value to set. * @return the TritonModelJobOutput object itself. */ @@ -70,7 +178,9 @@ public TritonModelJobOutput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TritonModelJobOutput withDescription(String description) { super.withDescription(description); @@ -79,11 +189,14 @@ public TritonModelJobOutput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (autoDeleteSetting() != null) { + autoDeleteSetting().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java index 2399793310aad..8782c066eae0a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. */ +/** + * Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "policyType") @JsonTypeName("TruncationSelection") @Fluent @@ -20,13 +22,15 @@ public final class TruncationSelectionPolicy extends EarlyTerminationPolicy { @JsonProperty(value = "truncationPercentage") private Integer truncationPercentage; - /** Creates an instance of TruncationSelectionPolicy class. */ + /** + * Creates an instance of TruncationSelectionPolicy class. + */ public TruncationSelectionPolicy() { } /** * Get the truncationPercentage property: The percentage of runs to cancel at each evaluation interval. - * + * * @return the truncationPercentage value. */ public Integer truncationPercentage() { @@ -35,7 +39,7 @@ public Integer truncationPercentage() { /** * Set the truncationPercentage property: The percentage of runs to cancel at each evaluation interval. - * + * * @param truncationPercentage the truncationPercentage value to set. * @return the TruncationSelectionPolicy object itself. */ @@ -44,14 +48,18 @@ public TruncationSelectionPolicy withTruncationPercentage(Integer truncationPerc return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TruncationSelectionPolicy withDelayEvaluation(Integer delayEvaluation) { super.withDelayEvaluation(delayEvaluation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterval) { super.withEvaluationInterval(evaluationInterval); @@ -60,7 +68,7 @@ public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterv /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java index f9bb3d7df5966..c17c60bf59dc0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for UnderlyingResourceAction. */ +/** + * Defines values for UnderlyingResourceAction. + */ public final class UnderlyingResourceAction extends ExpandableStringEnum { - /** Static value Delete for UnderlyingResourceAction. */ + /** + * Static value Delete for UnderlyingResourceAction. + */ public static final UnderlyingResourceAction DELETE = fromString("Delete"); - /** Static value Detach for UnderlyingResourceAction. */ + /** + * Static value Detach for UnderlyingResourceAction. + */ public static final UnderlyingResourceAction DETACH = fromString("Detach"); /** * Creates a new instance of UnderlyingResourceAction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public UnderlyingResourceAction() { /** * Creates or finds a UnderlyingResourceAction from its string representation. - * + * * @param name a name to look for. * @return the corresponding UnderlyingResourceAction. */ @@ -38,7 +44,7 @@ public static UnderlyingResourceAction fromString(String name) { /** * Gets known UnderlyingResourceAction values. - * + * * @return known UnderlyingResourceAction values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java index 05ae959e99b83..5805d0350f1ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java @@ -10,16 +10,18 @@ /** * Unit of time measure - * - *

The unit of time measurement for the specified VM price. Example: OneHour. + * + * The unit of time measurement for the specified VM price. Example: OneHour. */ public final class UnitOfMeasure extends ExpandableStringEnum { - /** Static value OneHour for UnitOfMeasure. */ + /** + * Static value OneHour for UnitOfMeasure. + */ public static final UnitOfMeasure ONE_HOUR = fromString("OneHour"); /** * Creates a new instance of UnitOfMeasure value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -28,7 +30,7 @@ public UnitOfMeasure() { /** * Creates or finds a UnitOfMeasure from its string representation. - * + * * @param name a name to look for. * @return the corresponding UnitOfMeasure. */ @@ -39,7 +41,7 @@ public static UnitOfMeasure fromString(String name) { /** * Gets known UnitOfMeasure values. - * + * * @return known UnitOfMeasure values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java index 88d2a8f9fa55a..70865cb08fc24 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties for update Quota response. */ +/** + * The properties for update Quota response. + */ @Fluent public final class UpdateWorkspaceQuotas { /* @@ -24,7 +26,7 @@ public final class UpdateWorkspaceQuotas { /* * Limit. - * + * * The maximum permitted quota of the resource. */ @JsonProperty(value = "limit") @@ -38,19 +40,21 @@ public final class UpdateWorkspaceQuotas { /* * Update Workspace Quota Status. - * + * * Status of update workspace quota. */ @JsonProperty(value = "status") private Status status; - /** Creates an instance of UpdateWorkspaceQuotas class. */ + /** + * Creates an instance of UpdateWorkspaceQuotas class. + */ public UpdateWorkspaceQuotas() { } /** * Get the id property: Specifies the resource ID. - * + * * @return the id value. */ public String id() { @@ -59,7 +63,7 @@ public String id() { /** * Get the type property: Specifies the resource type. - * + * * @return the type value. */ public String type() { @@ -68,9 +72,9 @@ public String type() { /** * Get the limit property: Limit. - * - *

The maximum permitted quota of the resource. - * + * + * The maximum permitted quota of the resource. + * * @return the limit value. */ public Long limit() { @@ -79,9 +83,9 @@ public Long limit() { /** * Set the limit property: Limit. - * - *

The maximum permitted quota of the resource. - * + * + * The maximum permitted quota of the resource. + * * @param limit the limit value to set. * @return the UpdateWorkspaceQuotas object itself. */ @@ -92,7 +96,7 @@ public UpdateWorkspaceQuotas withLimit(Long limit) { /** * Get the unit property: An enum describing the unit of quota measurement. - * + * * @return the unit value. */ public QuotaUnit unit() { @@ -101,9 +105,9 @@ public QuotaUnit unit() { /** * Get the status property: Update Workspace Quota Status. - * - *

Status of update workspace quota. - * + * + * Status of update workspace quota. + * * @return the status value. */ public Status status() { @@ -112,9 +116,9 @@ public Status status() { /** * Set the status property: Update Workspace Quota Status. - * - *

Status of update workspace quota. - * + * + * Status of update workspace quota. + * * @param status the status value to set. * @return the UpdateWorkspaceQuotas object itself. */ @@ -125,7 +129,7 @@ public UpdateWorkspaceQuotas withStatus(Status status) { /** * 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/UpdateWorkspaceQuotasResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.java index 9315ebeaa797a..ed71dd79a1d02 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.java @@ -7,11 +7,13 @@ import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; import java.util.List; -/** An immutable client-side representation of UpdateWorkspaceQuotasResult. */ +/** + * An immutable client-side representation of UpdateWorkspaceQuotasResult. + */ public interface UpdateWorkspaceQuotasResult { /** * Gets the value property: The list of workspace quota update result. - * + * * @return the value value. */ List value(); @@ -19,14 +21,14 @@ public interface UpdateWorkspaceQuotasResult { /** * Gets the nextLink property: The URI to fetch the next page of workspace quota update result. Call ListNext() with * this to fetch the next page of Workspace Quota update result. - * + * * @return the nextLink value. */ String nextLink(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner object. - * + * * @return the inner object. */ UpdateWorkspaceQuotasResultInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java index 0fe62c32561ae..6cfadf95f80ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java @@ -9,51 +9,94 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** uri-file data version entity. */ +/** + * uri-file data version entity. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") @JsonTypeName("uri_file") @Fluent public final class UriFileDataVersion extends DataVersionBaseProperties { - /** Creates an instance of UriFileDataVersion class. */ + /** + * Creates an instance of UriFileDataVersion class. + */ public UriFileDataVersion() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFileDataVersion withDataUri(String dataUri) { super.withDataUri(dataUri); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public UriFileDataVersion withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public UriFileDataVersion withStage(String stage) { + super.withStage(stage); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public UriFileDataVersion withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + return this; + } + + /** + * {@inheritDoc} + */ @Override public UriFileDataVersion withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFileDataVersion withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFileDataVersion withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFileDataVersion withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFileDataVersion withTags(Map tags) { super.withTags(tags); @@ -62,7 +105,7 @@ public UriFileDataVersion withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java index c52666009a7f3..88eb0e4d82fb3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The UriFileJobInput model. */ +/** + * The UriFileJobInput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") @JsonTypeName("uri_file") @Fluent @@ -21,19 +23,27 @@ public final class UriFileJobInput extends JobInput { @JsonProperty(value = "mode") private InputDeliveryMode mode; + /* + * Input Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * [Required] Input Asset URI. */ @JsonProperty(value = "uri", required = true) private String uri; - /** Creates an instance of UriFileJobInput class. */ + /** + * Creates an instance of UriFileJobInput class. + */ public UriFileJobInput() { } /** * Get the mode property: Input Asset Delivery Mode. - * + * * @return the mode value. */ public InputDeliveryMode mode() { @@ -42,7 +52,7 @@ public InputDeliveryMode mode() { /** * Set the mode property: Input Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the UriFileJobInput object itself. */ @@ -51,9 +61,29 @@ public UriFileJobInput withMode(InputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Input Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Input Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the UriFileJobInput object itself. + */ + public UriFileJobInput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: [Required] Input Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -62,7 +92,7 @@ public String uri() { /** * Set the uri property: [Required] Input Asset URI. - * + * * @param uri the uri value to set. * @return the UriFileJobInput object itself. */ @@ -71,7 +101,9 @@ public UriFileJobInput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFileJobInput withDescription(String description) { super.withDescription(description); @@ -80,16 +112,15 @@ public UriFileJobInput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (uri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model UriFileJobInput")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property uri in model UriFileJobInput")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java index e59ccfb629ef3..a2d5ff31566a5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java @@ -9,30 +9,118 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The UriFileJobOutput model. */ +/** + * The UriFileJobOutput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") @JsonTypeName("uri_file") @Fluent public final class UriFileJobOutput extends JobOutput { + /* + * Output Asset Name. + */ + @JsonProperty(value = "assetName") + private String assetName; + + /* + * Output Asset Version. + */ + @JsonProperty(value = "assetVersion") + private String assetVersion; + + /* + * Auto delete setting of output data asset. + */ + @JsonProperty(value = "autoDeleteSetting") + private AutoDeleteSetting autoDeleteSetting; + /* * Output Asset Delivery Mode. */ @JsonProperty(value = "mode") private OutputDeliveryMode mode; + /* + * Output Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * Output Asset URI. */ @JsonProperty(value = "uri") private String uri; - /** Creates an instance of UriFileJobOutput class. */ + /** + * Creates an instance of UriFileJobOutput class. + */ public UriFileJobOutput() { } + /** + * Get the assetName property: Output Asset Name. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Output Asset Name. + * + * @param assetName the assetName value to set. + * @return the UriFileJobOutput object itself. + */ + public UriFileJobOutput withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the assetVersion property: Output Asset Version. + * + * @return the assetVersion value. + */ + public String assetVersion() { + return this.assetVersion; + } + + /** + * Set the assetVersion property: Output Asset Version. + * + * @param assetVersion the assetVersion value to set. + * @return the UriFileJobOutput object itself. + */ + public UriFileJobOutput withAssetVersion(String assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @return the autoDeleteSetting value. + */ + public AutoDeleteSetting autoDeleteSetting() { + return this.autoDeleteSetting; + } + + /** + * Set the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @param autoDeleteSetting the autoDeleteSetting value to set. + * @return the UriFileJobOutput object itself. + */ + public UriFileJobOutput withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + this.autoDeleteSetting = autoDeleteSetting; + return this; + } + /** * Get the mode property: Output Asset Delivery Mode. - * + * * @return the mode value. */ public OutputDeliveryMode mode() { @@ -41,7 +129,7 @@ public OutputDeliveryMode mode() { /** * Set the mode property: Output Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the UriFileJobOutput object itself. */ @@ -50,9 +138,29 @@ public UriFileJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Output Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Output Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the UriFileJobOutput object itself. + */ + public UriFileJobOutput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: Output Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -61,7 +169,7 @@ public String uri() { /** * Set the uri property: Output Asset URI. - * + * * @param uri the uri value to set. * @return the UriFileJobOutput object itself. */ @@ -70,7 +178,9 @@ public UriFileJobOutput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFileJobOutput withDescription(String description) { super.withDescription(description); @@ -79,11 +189,14 @@ public UriFileJobOutput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (autoDeleteSetting() != null) { + autoDeleteSetting().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java index 5904ef425eb8c..88a793d221a25 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java @@ -9,51 +9,94 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** uri-folder data version entity. */ +/** + * uri-folder data version entity. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") @JsonTypeName("uri_folder") @Fluent public final class UriFolderDataVersion extends DataVersionBaseProperties { - /** Creates an instance of UriFolderDataVersion class. */ + /** + * Creates an instance of UriFolderDataVersion class. + */ public UriFolderDataVersion() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFolderDataVersion withDataUri(String dataUri) { super.withDataUri(dataUri); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ + @Override + public UriFolderDataVersion withIntellectualProperty(IntellectualProperty intellectualProperty) { + super.withIntellectualProperty(intellectualProperty); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public UriFolderDataVersion withStage(String stage) { + super.withStage(stage); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public UriFolderDataVersion withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + super.withAutoDeleteSetting(autoDeleteSetting); + return this; + } + + /** + * {@inheritDoc} + */ @Override public UriFolderDataVersion withIsAnonymous(Boolean isAnonymous) { super.withIsAnonymous(isAnonymous); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFolderDataVersion withIsArchived(Boolean isArchived) { super.withIsArchived(isArchived); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFolderDataVersion withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFolderDataVersion withProperties(Map properties) { super.withProperties(properties); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFolderDataVersion withTags(Map tags) { super.withTags(tags); @@ -62,7 +105,7 @@ public UriFolderDataVersion withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java index 1434274fa4f7b..925ab09540bcc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The UriFolderJobInput model. */ +/** + * The UriFolderJobInput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") @JsonTypeName("uri_folder") @Fluent @@ -21,19 +23,27 @@ public final class UriFolderJobInput extends JobInput { @JsonProperty(value = "mode") private InputDeliveryMode mode; + /* + * Input Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * [Required] Input Asset URI. */ @JsonProperty(value = "uri", required = true) private String uri; - /** Creates an instance of UriFolderJobInput class. */ + /** + * Creates an instance of UriFolderJobInput class. + */ public UriFolderJobInput() { } /** * Get the mode property: Input Asset Delivery Mode. - * + * * @return the mode value. */ public InputDeliveryMode mode() { @@ -42,7 +52,7 @@ public InputDeliveryMode mode() { /** * Set the mode property: Input Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the UriFolderJobInput object itself. */ @@ -51,9 +61,29 @@ public UriFolderJobInput withMode(InputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Input Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Input Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the UriFolderJobInput object itself. + */ + public UriFolderJobInput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: [Required] Input Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -62,7 +92,7 @@ public String uri() { /** * Set the uri property: [Required] Input Asset URI. - * + * * @param uri the uri value to set. * @return the UriFolderJobInput object itself. */ @@ -71,7 +101,9 @@ public UriFolderJobInput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFolderJobInput withDescription(String description) { super.withDescription(description); @@ -80,16 +112,15 @@ public UriFolderJobInput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (uri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model UriFolderJobInput")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property uri in model UriFolderJobInput")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java index c0a7ef31b48ff..4d857630e51a5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java @@ -9,30 +9,118 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The UriFolderJobOutput model. */ +/** + * The UriFolderJobOutput model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") @JsonTypeName("uri_folder") @Fluent public final class UriFolderJobOutput extends JobOutput { + /* + * Output Asset Name. + */ + @JsonProperty(value = "assetName") + private String assetName; + + /* + * Output Asset Version. + */ + @JsonProperty(value = "assetVersion") + private String assetVersion; + + /* + * Auto delete setting of output data asset. + */ + @JsonProperty(value = "autoDeleteSetting") + private AutoDeleteSetting autoDeleteSetting; + /* * Output Asset Delivery Mode. */ @JsonProperty(value = "mode") private OutputDeliveryMode mode; + /* + * Output Asset Delivery Path. + */ + @JsonProperty(value = "pathOnCompute") + private String pathOnCompute; + /* * Output Asset URI. */ @JsonProperty(value = "uri") private String uri; - /** Creates an instance of UriFolderJobOutput class. */ + /** + * Creates an instance of UriFolderJobOutput class. + */ public UriFolderJobOutput() { } + /** + * Get the assetName property: Output Asset Name. + * + * @return the assetName value. + */ + public String assetName() { + return this.assetName; + } + + /** + * Set the assetName property: Output Asset Name. + * + * @param assetName the assetName value to set. + * @return the UriFolderJobOutput object itself. + */ + public UriFolderJobOutput withAssetName(String assetName) { + this.assetName = assetName; + return this; + } + + /** + * Get the assetVersion property: Output Asset Version. + * + * @return the assetVersion value. + */ + public String assetVersion() { + return this.assetVersion; + } + + /** + * Set the assetVersion property: Output Asset Version. + * + * @param assetVersion the assetVersion value to set. + * @return the UriFolderJobOutput object itself. + */ + public UriFolderJobOutput withAssetVersion(String assetVersion) { + this.assetVersion = assetVersion; + return this; + } + + /** + * Get the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @return the autoDeleteSetting value. + */ + public AutoDeleteSetting autoDeleteSetting() { + return this.autoDeleteSetting; + } + + /** + * Set the autoDeleteSetting property: Auto delete setting of output data asset. + * + * @param autoDeleteSetting the autoDeleteSetting value to set. + * @return the UriFolderJobOutput object itself. + */ + public UriFolderJobOutput withAutoDeleteSetting(AutoDeleteSetting autoDeleteSetting) { + this.autoDeleteSetting = autoDeleteSetting; + return this; + } + /** * Get the mode property: Output Asset Delivery Mode. - * + * * @return the mode value. */ public OutputDeliveryMode mode() { @@ -41,7 +129,7 @@ public OutputDeliveryMode mode() { /** * Set the mode property: Output Asset Delivery Mode. - * + * * @param mode the mode value to set. * @return the UriFolderJobOutput object itself. */ @@ -50,9 +138,29 @@ public UriFolderJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the pathOnCompute property: Output Asset Delivery Path. + * + * @return the pathOnCompute value. + */ + public String pathOnCompute() { + return this.pathOnCompute; + } + + /** + * Set the pathOnCompute property: Output Asset Delivery Path. + * + * @param pathOnCompute the pathOnCompute value to set. + * @return the UriFolderJobOutput object itself. + */ + public UriFolderJobOutput withPathOnCompute(String pathOnCompute) { + this.pathOnCompute = pathOnCompute; + return this; + } + /** * Get the uri property: Output Asset URI. - * + * * @return the uri value. */ public String uri() { @@ -61,7 +169,7 @@ public String uri() { /** * Set the uri property: Output Asset URI. - * + * * @param uri the uri value to set. * @return the UriFolderJobOutput object itself. */ @@ -70,7 +178,9 @@ public UriFolderJobOutput withUri(String uri) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UriFolderJobOutput withDescription(String description) { super.withDescription(description); @@ -79,11 +189,14 @@ public UriFolderJobOutput withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); + if (autoDeleteSetting() != null) { + autoDeleteSetting().validate(); + } } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java index c98ae6d128078..7ba869f98e85a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java @@ -6,60 +6,62 @@ import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -/** An immutable client-side representation of Usage. */ +/** + * An immutable client-side representation of Usage. + */ public interface Usage { /** * Gets the id property: Specifies the resource ID. - * + * * @return the id value. */ String id(); /** * Gets the amlWorkspaceLocation property: Region of the AML workspace in the id. - * + * * @return the amlWorkspaceLocation value. */ String amlWorkspaceLocation(); /** * Gets the type property: Specifies the resource type. - * + * * @return the type value. */ String type(); /** * Gets the unit property: An enum describing the unit of usage measurement. - * + * * @return the unit value. */ UsageUnit unit(); /** * Gets the currentValue property: The current usage of the resource. - * + * * @return the currentValue value. */ Long currentValue(); /** * Gets the limit property: The maximum permitted usage of the resource. - * + * * @return the limit value. */ Long limit(); /** * Gets the name property: The name of the type of usage. - * + * * @return the name value. */ UsageName name(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.UsageInner object. - * + * * @return the inner object. */ UsageInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java index de4afdbbbac5a..719f7680c09cb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Usage Names. */ +/** + * The Usage Names. + */ @Immutable public final class UsageName { /* @@ -22,13 +24,15 @@ public final class UsageName { @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) private String localizedValue; - /** Creates an instance of UsageName class. */ + /** + * Creates an instance of UsageName class. + */ public UsageName() { } /** * Get the value property: The name of the resource. - * + * * @return the value value. */ public String value() { @@ -37,7 +41,7 @@ public String value() { /** * Get the localizedValue property: The localized name of the resource. - * + * * @return the localizedValue value. */ public String localizedValue() { @@ -46,7 +50,7 @@ public String localizedValue() { /** * 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/UsageUnit.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java index a9cc9108faf8c..b40a056a8f208 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** An enum describing the unit of usage measurement. */ +/** + * An enum describing the unit of usage measurement. + */ public final class UsageUnit extends ExpandableStringEnum { - /** Static value Count for UsageUnit. */ + /** + * Static value Count for UsageUnit. + */ public static final UsageUnit COUNT = fromString("Count"); /** * Creates a new instance of UsageUnit value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public UsageUnit() { /** * Creates or finds a UsageUnit from its string representation. - * + * * @param name a name to look for. * @return the corresponding UsageUnit. */ @@ -35,7 +39,7 @@ public static UsageUnit fromString(String name) { /** * Gets known UsageUnit values. - * + * * @return known UsageUnit values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java index 829c32dc42506..ac79b69d00ed0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java @@ -7,30 +7,32 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Usages. */ +/** + * Resource collection API of Usages. + */ public interface Usages { /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ PagedIterable list(String location); /** * Gets the current usage information as well as limits for AML resources for given subscription and location. - * + * * @param location The location for which resource usage is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. + * paginated response with {@link PagedIterable}. */ PagedIterable list(String location, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java index 25769eb8e8b47..6a88c970056d4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Configure STL Decomposition of the time-series target column. */ +/** + * Configure STL Decomposition of the time-series target column. + */ public final class UseStl extends ExpandableStringEnum { - /** Static value None for UseStl. */ + /** + * Static value None for UseStl. + */ public static final UseStl NONE = fromString("None"); - /** Static value Season for UseStl. */ + /** + * Static value Season for UseStl. + */ public static final UseStl SEASON = fromString("Season"); - /** Static value SeasonTrend for UseStl. */ + /** + * Static value SeasonTrend for UseStl. + */ public static final UseStl SEASON_TREND = fromString("SeasonTrend"); /** * Creates a new instance of UseStl value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public UseStl() { /** * Creates or finds a UseStl from its string representation. - * + * * @param name a name to look for. * @return the corresponding UseStl. */ @@ -41,7 +49,7 @@ public static UseStl fromString(String name) { /** * Gets known UseStl values. - * + * * @return known UseStl values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java index 617f6a6e5ec26..791749607da59 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java @@ -8,12 +8,14 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Settings for user account that gets created on each on the nodes of a compute. */ +/** + * Settings for user account that gets created on each on the nodes of a compute. + */ @Fluent public final class UserAccountCredentials { /* * User name. - * + * * Name of the administrator user account which can be used to SSH to nodes. */ @JsonProperty(value = "adminUserName", required = true) @@ -21,7 +23,7 @@ public final class UserAccountCredentials { /* * SSH public key. - * + * * SSH public key of the administrator user account. */ @JsonProperty(value = "adminUserSshPublicKey") @@ -29,21 +31,23 @@ public final class UserAccountCredentials { /* * Password. - * + * * Password of the administrator user account. */ @JsonProperty(value = "adminUserPassword") private String adminUserPassword; - /** Creates an instance of UserAccountCredentials class. */ + /** + * Creates an instance of UserAccountCredentials class. + */ public UserAccountCredentials() { } /** * Get the adminUsername property: User name. - * - *

Name of the administrator user account which can be used to SSH to nodes. - * + * + * Name of the administrator user account which can be used to SSH to nodes. + * * @return the adminUsername value. */ public String adminUsername() { @@ -52,9 +56,9 @@ public String adminUsername() { /** * Set the adminUsername property: User name. - * - *

Name of the administrator user account which can be used to SSH to nodes. - * + * + * Name of the administrator user account which can be used to SSH to nodes. + * * @param adminUsername the adminUsername value to set. * @return the UserAccountCredentials object itself. */ @@ -65,9 +69,9 @@ public UserAccountCredentials withAdminUsername(String adminUsername) { /** * Get the adminUserSshPublicKey property: SSH public key. - * - *

SSH public key of the administrator user account. - * + * + * SSH public key of the administrator user account. + * * @return the adminUserSshPublicKey value. */ public String adminUserSshPublicKey() { @@ -76,9 +80,9 @@ public String adminUserSshPublicKey() { /** * Set the adminUserSshPublicKey property: SSH public key. - * - *

SSH public key of the administrator user account. - * + * + * SSH public key of the administrator user account. + * * @param adminUserSshPublicKey the adminUserSshPublicKey value to set. * @return the UserAccountCredentials object itself. */ @@ -89,9 +93,9 @@ public UserAccountCredentials withAdminUserSshPublicKey(String adminUserSshPubli /** * Get the adminUserPassword property: Password. - * - *

Password of the administrator user account. - * + * + * Password of the administrator user account. + * * @return the adminUserPassword value. */ public String adminUserPassword() { @@ -100,9 +104,9 @@ public String adminUserPassword() { /** * Set the adminUserPassword property: Password. - * - *

Password of the administrator user account. - * + * + * Password of the administrator user account. + * * @param adminUserPassword the adminUserPassword value to set. * @return the UserAccountCredentials object itself. */ @@ -113,15 +117,13 @@ public UserAccountCredentials withAdminUserPassword(String adminUserPassword) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (adminUsername() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property adminUsername in model UserAccountCredentials")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property adminUsername in model UserAccountCredentials")); } } 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..f52d0f4b68baf 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 @@ -8,9 +8,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; -/** User assigned identity properties. */ +/** + * User assigned identity properties. + */ @Immutable -public class UserAssignedIdentity { +public final class UserAssignedIdentity { /* * The principal ID of the assigned identity. */ @@ -23,13 +25,15 @@ public class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; - /** Creates an instance of UserAssignedIdentity class. */ + /** + * Creates an instance of UserAssignedIdentity class. + */ public UserAssignedIdentity() { } /** * Get the principalId property: The principal ID of the assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -38,7 +42,7 @@ public UUID principalId() { /** * Get the clientId property: The client ID of the assigned identity. - * + * * @return the clientId value. */ public UUID clientId() { @@ -47,7 +51,7 @@ public UUID clientId() { /** * 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/UserCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java new file mode 100644 index 0000000000000..f8a028970432c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.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.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..516115cbca200 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.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.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..fbcfceee2cd00 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 @@ -8,18 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** User identity configuration. */ +/** + * User identity configuration. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "identityType") @JsonTypeName("UserIdentity") @Immutable -public class UserIdentity extends IdentityConfiguration { - /** Creates an instance of UserIdentity class. */ +public final class UserIdentity extends IdentityConfiguration { + /** + * Creates an instance of UserIdentity class. + */ public UserIdentity() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java index c63b03a2f6017..10cd6e4946b2f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java @@ -8,8 +8,12 @@ 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.List; -/** The UsernamePasswordAuthTypeWorkspaceConnectionProperties model. */ +/** + * The UsernamePasswordAuthTypeWorkspaceConnectionProperties model. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("UsernamePassword") @Fluent @@ -20,13 +24,15 @@ public final class UsernamePasswordAuthTypeWorkspaceConnectionProperties extends @JsonProperty(value = "credentials") private WorkspaceConnectionUsernamePassword credentials; - /** Creates an instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties class. */ + /** + * Creates an instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties class. + */ public UsernamePasswordAuthTypeWorkspaceConnectionProperties() { } /** * Get the credentials property: The credentials property. - * + * * @return the credentials value. */ public WorkspaceConnectionUsernamePassword credentials() { @@ -35,47 +41,73 @@ public WorkspaceConnectionUsernamePassword credentials() { /** * Set the credentials property: The credentials property. - * + * * @param credentials the credentials value to set. * @return the UsernamePasswordAuthTypeWorkspaceConnectionProperties object itself. */ - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCredentials( - WorkspaceConnectionUsernamePassword credentials) { + public UsernamePasswordAuthTypeWorkspaceConnectionProperties + withCredentials(WorkspaceConnectionUsernamePassword credentials) { this.credentials = credentials; return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { super.withCategory(category); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withMetadata(Object metadata) { + super.withMetadata(metadata); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java index 3b9e225d7d15c..81cbd7b53df76 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java @@ -10,19 +10,23 @@ /** * OS type - * - *

Operating system type used by the VM. + * + * Operating system type used by the VM. */ public final class VMPriceOSType extends ExpandableStringEnum { - /** Static value Linux for VMPriceOSType. */ + /** + * Static value Linux for VMPriceOSType. + */ public static final VMPriceOSType LINUX = fromString("Linux"); - /** Static value Windows for VMPriceOSType. */ + /** + * Static value Windows for VMPriceOSType. + */ public static final VMPriceOSType WINDOWS = fromString("Windows"); /** * Creates a new instance of VMPriceOSType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -31,7 +35,7 @@ public VMPriceOSType() { /** * Creates or finds a VMPriceOSType from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMPriceOSType. */ @@ -42,7 +46,7 @@ public static VMPriceOSType fromString(String name) { /** * Gets known VMPriceOSType values. - * + * * @return known VMPriceOSType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java index d7b857e72c846..a4332e0e90c7f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java @@ -10,22 +10,28 @@ /** * VM tier - * - *

The type of the VM. + * + * The type of the VM. */ public final class VMTier extends ExpandableStringEnum { - /** Static value Standard for VMTier. */ + /** + * Static value Standard for VMTier. + */ public static final VMTier STANDARD = fromString("Standard"); - /** Static value LowPriority for VMTier. */ + /** + * Static value LowPriority for VMTier. + */ public static final VMTier LOW_PRIORITY = fromString("LowPriority"); - /** Static value Spot for VMTier. */ + /** + * Static value Spot for VMTier. + */ public static final VMTier SPOT = fromString("Spot"); /** * Creates a new instance of VMTier value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +40,7 @@ public VMTier() { /** * Creates or finds a VMTier from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMTier. */ @@ -45,7 +51,7 @@ public static VMTier fromString(String name) { /** * Gets known VMTier values. - * + * * @return known VMTier values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java index d7c8e2c6bc5df..534dad5bc3a64 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Metric computation method to use for validation metrics in image tasks. */ +/** + * Metric computation method to use for validation metrics in image tasks. + */ public final class ValidationMetricType extends ExpandableStringEnum { - /** Static value None for ValidationMetricType. */ + /** + * Static value None for ValidationMetricType. + */ public static final ValidationMetricType NONE = fromString("None"); - /** Static value Coco for ValidationMetricType. */ + /** + * Static value Coco for ValidationMetricType. + */ public static final ValidationMetricType COCO = fromString("Coco"); - /** Static value Voc for ValidationMetricType. */ + /** + * Static value Voc for ValidationMetricType. + */ public static final ValidationMetricType VOC = fromString("Voc"); - /** Static value CocoVoc for ValidationMetricType. */ + /** + * Static value CocoVoc for ValidationMetricType. + */ public static final ValidationMetricType COCO_VOC = fromString("CocoVoc"); /** * Creates a new instance of ValidationMetricType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ValidationMetricType() { /** * Creates or finds a ValidationMetricType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ValidationMetricType. */ @@ -44,7 +54,7 @@ public static ValidationMetricType fromString(String name) { /** * Gets known ValidationMetricType values. - * + * * @return known ValidationMetricType values. */ public static Collection values() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java deleted file mode 100644 index 336be0e494447..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** format for the workspace connection value. */ -public final class ValueFormat extends ExpandableStringEnum { - /** Static value JSON for ValueFormat. */ - public static final ValueFormat JSON = fromString("JSON"); - - /** - * Creates a new instance of ValueFormat value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ValueFormat() { - } - - /** - * Creates or finds a ValueFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ValueFormat. - */ - @JsonCreator - public static ValueFormat fromString(String name) { - return fromString(name, ValueFormat.class); - } - - /** - * Gets known ValueFormat values. - * - * @return known ValueFormat values. - */ - public static Collection values() { - return values(ValueFormat.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java index ace46f7abc11d..70b5d60ac4fc8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** A Machine Learning compute based on Azure Virtual Machines. */ +/** + * A Machine Learning compute based on Azure Virtual Machines. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("VirtualMachine") @Fluent @@ -20,13 +22,15 @@ public final class VirtualMachine extends Compute { @JsonProperty(value = "properties") private VirtualMachineSchemaProperties properties; - /** Creates an instance of VirtualMachine class. */ + /** + * Creates an instance of VirtualMachine class. + */ public VirtualMachine() { } /** * Get the properties property: The properties property. - * + * * @return the properties value. */ public VirtualMachineSchemaProperties properties() { @@ -35,7 +39,7 @@ public VirtualMachineSchemaProperties properties() { /** * Set the properties property: The properties property. - * + * * @param properties the properties value to set. * @return the VirtualMachine object itself. */ @@ -44,28 +48,36 @@ public VirtualMachine withProperties(VirtualMachineSchemaProperties properties) return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VirtualMachine withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VirtualMachine withDescription(String description) { super.withDescription(description); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VirtualMachine withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public VirtualMachine withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); @@ -74,7 +86,7 @@ public VirtualMachine withDisableLocalAuth(Boolean disableLocalAuth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java index bbbf91671967d..49be28a9b9a05 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Virtual Machine image for Windows AML Compute. */ +/** + * Virtual Machine image for Windows AML Compute. + */ @Fluent public final class VirtualMachineImage { /* @@ -17,13 +19,15 @@ public final class VirtualMachineImage { @JsonProperty(value = "id", required = true) private String id; - /** Creates an instance of VirtualMachineImage class. */ + /** + * Creates an instance of VirtualMachineImage class. + */ public VirtualMachineImage() { } /** * Get the id property: Virtual Machine image path. - * + * * @return the id value. */ public String id() { @@ -32,7 +36,7 @@ public String id() { /** * Set the id property: Virtual Machine image path. - * + * * @param id the id value to set. * @return the VirtualMachineImage object itself. */ @@ -43,14 +47,13 @@ public VirtualMachineImage withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (id() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property id in model VirtualMachineImage")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property id in model VirtualMachineImage")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java index b519477bcd6ec..e17f20b789400 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The VirtualMachineSchema model. */ +/** + * The VirtualMachineSchema model. + */ @Fluent public class VirtualMachineSchema { /* @@ -16,13 +18,15 @@ public class VirtualMachineSchema { @JsonProperty(value = "properties") private VirtualMachineSchemaProperties properties; - /** Creates an instance of VirtualMachineSchema class. */ + /** + * Creates an instance of VirtualMachineSchema class. + */ public VirtualMachineSchema() { } /** * Get the properties property: The properties property. - * + * * @return the properties value. */ public VirtualMachineSchemaProperties properties() { @@ -31,7 +35,7 @@ public VirtualMachineSchemaProperties properties() { /** * Set the properties property: The properties property. - * + * * @param properties the properties value to set. * @return the VirtualMachineSchema object itself. */ @@ -42,7 +46,7 @@ public VirtualMachineSchema withProperties(VirtualMachineSchemaProperties proper /** * 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/VirtualMachineSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java index 2b5d333a7a08e..35ced48dea86c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The VirtualMachineSchemaProperties model. */ +/** + * The VirtualMachineSchemaProperties model. + */ @Fluent public final class VirtualMachineSchemaProperties { /* @@ -46,13 +48,15 @@ public final class VirtualMachineSchemaProperties { @JsonProperty(value = "isNotebookInstanceCompute") private Boolean isNotebookInstanceCompute; - /** Creates an instance of VirtualMachineSchemaProperties class. */ + /** + * Creates an instance of VirtualMachineSchemaProperties class. + */ public VirtualMachineSchemaProperties() { } /** * Get the virtualMachineSize property: Virtual Machine size. - * + * * @return the virtualMachineSize value. */ public String virtualMachineSize() { @@ -61,7 +65,7 @@ public String virtualMachineSize() { /** * Set the virtualMachineSize property: Virtual Machine size. - * + * * @param virtualMachineSize the virtualMachineSize value to set. * @return the VirtualMachineSchemaProperties object itself. */ @@ -72,7 +76,7 @@ public VirtualMachineSchemaProperties withVirtualMachineSize(String virtualMachi /** * Get the sshPort property: Port open for ssh connections. - * + * * @return the sshPort value. */ public Integer sshPort() { @@ -81,7 +85,7 @@ public Integer sshPort() { /** * Set the sshPort property: Port open for ssh connections. - * + * * @param sshPort the sshPort value to set. * @return the VirtualMachineSchemaProperties object itself. */ @@ -92,7 +96,7 @@ public VirtualMachineSchemaProperties withSshPort(Integer sshPort) { /** * Get the notebookServerPort property: Notebook server port open for ssh connections. - * + * * @return the notebookServerPort value. */ public Integer notebookServerPort() { @@ -101,7 +105,7 @@ public Integer notebookServerPort() { /** * Set the notebookServerPort property: Notebook server port open for ssh connections. - * + * * @param notebookServerPort the notebookServerPort value to set. * @return the VirtualMachineSchemaProperties object itself. */ @@ -112,7 +116,7 @@ public VirtualMachineSchemaProperties withNotebookServerPort(Integer notebookSer /** * Get the address property: Public IP address of the virtual machine. - * + * * @return the address value. */ public String address() { @@ -121,7 +125,7 @@ public String address() { /** * Set the address property: Public IP address of the virtual machine. - * + * * @param address the address value to set. * @return the VirtualMachineSchemaProperties object itself. */ @@ -132,7 +136,7 @@ public VirtualMachineSchemaProperties withAddress(String address) { /** * Get the administratorAccount property: Admin credentials for virtual machine. - * + * * @return the administratorAccount value. */ public VirtualMachineSshCredentials administratorAccount() { @@ -141,7 +145,7 @@ public VirtualMachineSshCredentials administratorAccount() { /** * Set the administratorAccount property: Admin credentials for virtual machine. - * + * * @param administratorAccount the administratorAccount value to set. * @return the VirtualMachineSchemaProperties object itself. */ @@ -152,7 +156,7 @@ public VirtualMachineSchemaProperties withAdministratorAccount(VirtualMachineSsh /** * Get the isNotebookInstanceCompute property: Indicates whether this compute will be used for running notebooks. - * + * * @return the isNotebookInstanceCompute value. */ public Boolean isNotebookInstanceCompute() { @@ -161,7 +165,7 @@ public Boolean isNotebookInstanceCompute() { /** * Set the isNotebookInstanceCompute property: Indicates whether this compute will be used for running notebooks. - * + * * @param isNotebookInstanceCompute the isNotebookInstanceCompute value to set. * @return the VirtualMachineSchemaProperties object itself. */ @@ -172,7 +176,7 @@ public VirtualMachineSchemaProperties withIsNotebookInstanceCompute(Boolean isNo /** * 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/VirtualMachineSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java index 3d8b393e3060e..d99c815aafe04 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Secrets related to a Machine Learning compute based on AKS. */ +/** + * Secrets related to a Machine Learning compute based on AKS. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") @JsonTypeName("VirtualMachine") @Fluent @@ -21,13 +23,15 @@ public final class VirtualMachineSecrets extends ComputeSecretsInner { @JsonProperty(value = "administratorAccount") private VirtualMachineSshCredentials administratorAccount; - /** Creates an instance of VirtualMachineSecrets class. */ + /** + * Creates an instance of VirtualMachineSecrets class. + */ public VirtualMachineSecrets() { } /** * Get the administratorAccount property: Admin credentials for virtual machine. - * + * * @return the administratorAccount value. */ public VirtualMachineSshCredentials administratorAccount() { @@ -36,7 +40,7 @@ public VirtualMachineSshCredentials administratorAccount() { /** * Set the administratorAccount property: Admin credentials for virtual machine. - * + * * @param administratorAccount the administratorAccount value to set. * @return the VirtualMachineSecrets object itself. */ @@ -47,7 +51,7 @@ public VirtualMachineSecrets withAdministratorAccount(VirtualMachineSshCredentia /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java index f4554787497ef..7454c721a9c39 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The VirtualMachineSecretsSchema model. */ +/** + * The VirtualMachineSecretsSchema model. + */ @Fluent public class VirtualMachineSecretsSchema { /* @@ -16,13 +18,15 @@ public class VirtualMachineSecretsSchema { @JsonProperty(value = "administratorAccount") private VirtualMachineSshCredentials administratorAccount; - /** Creates an instance of VirtualMachineSecretsSchema class. */ + /** + * Creates an instance of VirtualMachineSecretsSchema class. + */ public VirtualMachineSecretsSchema() { } /** * Get the administratorAccount property: Admin credentials for virtual machine. - * + * * @return the administratorAccount value. */ public VirtualMachineSshCredentials administratorAccount() { @@ -31,7 +35,7 @@ public VirtualMachineSshCredentials administratorAccount() { /** * Set the administratorAccount property: Admin credentials for virtual machine. - * + * * @param administratorAccount the administratorAccount value to set. * @return the VirtualMachineSecretsSchema object itself. */ @@ -42,7 +46,7 @@ public VirtualMachineSecretsSchema withAdministratorAccount(VirtualMachineSshCre /** * 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/VirtualMachineSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java index bc6f900306324..8c1fecce189d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java @@ -8,12 +8,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the properties of a VM size. */ +/** + * Describes the properties of a VM size. + */ @Fluent public final class VirtualMachineSize { /* * Virtual Machine size name - * + * * The name of the virtual machine size. */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) @@ -21,7 +23,7 @@ public final class VirtualMachineSize { /* * Virtual Machine family name - * + * * The family name of the virtual machine size. */ @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY) @@ -29,7 +31,7 @@ public final class VirtualMachineSize { /* * Number of vPUs - * + * * The number of vCPUs supported by the virtual machine size. */ @JsonProperty(value = "vCPUs", access = JsonProperty.Access.WRITE_ONLY) @@ -37,7 +39,7 @@ public final class VirtualMachineSize { /* * Number of gPUs - * + * * The number of gPUs supported by the virtual machine size. */ @JsonProperty(value = "gpus", access = JsonProperty.Access.WRITE_ONLY) @@ -45,7 +47,7 @@ public final class VirtualMachineSize { /* * OS VHD Disk size - * + * * The OS VHD disk size, in MB, allowed by the virtual machine size. */ @JsonProperty(value = "osVhdSizeMB", access = JsonProperty.Access.WRITE_ONLY) @@ -53,7 +55,7 @@ public final class VirtualMachineSize { /* * Resource volume size - * + * * The resource volume size, in MB, allowed by the virtual machine size. */ @JsonProperty(value = "maxResourceVolumeMB", access = JsonProperty.Access.WRITE_ONLY) @@ -61,7 +63,7 @@ public final class VirtualMachineSize { /* * Memory size - * + * * The amount of memory, in GB, supported by the virtual machine size. */ @JsonProperty(value = "memoryGB", access = JsonProperty.Access.WRITE_ONLY) @@ -69,7 +71,7 @@ public final class VirtualMachineSize { /* * Low priority capable - * + * * Specifies if the virtual machine size supports low priority VMs. */ @JsonProperty(value = "lowPriorityCapable", access = JsonProperty.Access.WRITE_ONLY) @@ -77,7 +79,7 @@ public final class VirtualMachineSize { /* * Premium IO supported - * + * * Specifies if the virtual machine size supports premium IO. */ @JsonProperty(value = "premiumIO", access = JsonProperty.Access.WRITE_ONLY) @@ -91,21 +93,23 @@ public final class VirtualMachineSize { /* * Supported Compute Types - * + * * Specifies the compute types supported by the virtual machine size. */ @JsonProperty(value = "supportedComputeTypes") private List supportedComputeTypes; - /** Creates an instance of VirtualMachineSize class. */ + /** + * Creates an instance of VirtualMachineSize class. + */ public VirtualMachineSize() { } /** * Get the name property: Virtual Machine size name - * - *

The name of the virtual machine size. - * + * + * The name of the virtual machine size. + * * @return the name value. */ public String name() { @@ -114,9 +118,9 @@ public String name() { /** * Get the family property: Virtual Machine family name - * - *

The family name of the virtual machine size. - * + * + * The family name of the virtual machine size. + * * @return the family value. */ public String family() { @@ -125,9 +129,9 @@ public String family() { /** * Get the vCPUs property: Number of vPUs - * - *

The number of vCPUs supported by the virtual machine size. - * + * + * The number of vCPUs supported by the virtual machine size. + * * @return the vCPUs value. */ public Integer vCPUs() { @@ -136,9 +140,9 @@ public Integer vCPUs() { /** * Get the gpus property: Number of gPUs - * - *

The number of gPUs supported by the virtual machine size. - * + * + * The number of gPUs supported by the virtual machine size. + * * @return the gpus value. */ public Integer gpus() { @@ -147,9 +151,9 @@ public Integer gpus() { /** * Get the osVhdSizeMB property: OS VHD Disk size - * - *

The OS VHD disk size, in MB, allowed by the virtual machine size. - * + * + * The OS VHD disk size, in MB, allowed by the virtual machine size. + * * @return the osVhdSizeMB value. */ public Integer osVhdSizeMB() { @@ -158,9 +162,9 @@ public Integer osVhdSizeMB() { /** * Get the maxResourceVolumeMB property: Resource volume size - * - *

The resource volume size, in MB, allowed by the virtual machine size. - * + * + * The resource volume size, in MB, allowed by the virtual machine size. + * * @return the maxResourceVolumeMB value. */ public Integer maxResourceVolumeMB() { @@ -169,9 +173,9 @@ public Integer maxResourceVolumeMB() { /** * Get the memoryGB property: Memory size - * - *

The amount of memory, in GB, supported by the virtual machine size. - * + * + * The amount of memory, in GB, supported by the virtual machine size. + * * @return the memoryGB value. */ public Double memoryGB() { @@ -180,9 +184,9 @@ public Double memoryGB() { /** * Get the lowPriorityCapable property: Low priority capable - * - *

Specifies if the virtual machine size supports low priority VMs. - * + * + * Specifies if the virtual machine size supports low priority VMs. + * * @return the lowPriorityCapable value. */ public Boolean lowPriorityCapable() { @@ -191,9 +195,9 @@ public Boolean lowPriorityCapable() { /** * Get the premiumIO property: Premium IO supported - * - *

Specifies if the virtual machine size supports premium IO. - * + * + * Specifies if the virtual machine size supports premium IO. + * * @return the premiumIO value. */ public Boolean premiumIO() { @@ -202,7 +206,7 @@ public Boolean premiumIO() { /** * Get the estimatedVMPrices property: The estimated price information for using a VM. - * + * * @return the estimatedVMPrices value. */ public EstimatedVMPrices estimatedVMPrices() { @@ -211,7 +215,7 @@ public EstimatedVMPrices estimatedVMPrices() { /** * Set the estimatedVMPrices property: The estimated price information for using a VM. - * + * * @param estimatedVMPrices the estimatedVMPrices value to set. * @return the VirtualMachineSize object itself. */ @@ -222,9 +226,9 @@ public VirtualMachineSize withEstimatedVMPrices(EstimatedVMPrices estimatedVMPri /** * Get the supportedComputeTypes property: Supported Compute Types - * - *

Specifies the compute types supported by the virtual machine size. - * + * + * Specifies the compute types supported by the virtual machine size. + * * @return the supportedComputeTypes value. */ public List supportedComputeTypes() { @@ -233,9 +237,9 @@ public List supportedComputeTypes() { /** * Set the supportedComputeTypes property: Supported Compute Types - * - *

Specifies the compute types supported by the virtual machine size. - * + * + * Specifies the compute types supported by the virtual machine size. + * * @param supportedComputeTypes the supportedComputeTypes value to set. * @return the VirtualMachineSize object itself. */ @@ -246,7 +250,7 @@ public VirtualMachineSize withSupportedComputeTypes(List supportedComput /** * 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/VirtualMachineSizeListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java index ea06dd868660a..12fcd41fc97ab 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; import java.util.List; -/** An immutable client-side representation of VirtualMachineSizeListResult. */ +/** + * An immutable client-side representation of VirtualMachineSizeListResult. + */ public interface VirtualMachineSizeListResult { /** * Gets the value property: The list of virtual machine sizes supported by AmlCompute. - * + * * @return the value value. */ List value(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner object. - * + * * @return the inner object. */ VirtualMachineSizeListResultInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java index e1c429840f0fd..64fff606cc2ce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of VirtualMachineSizes. */ +/** + * Resource collection API of VirtualMachineSizes. + */ public interface VirtualMachineSizes { /** * Returns supported VM Sizes in a location. - * + * * @param location The location upon which virtual-machine-sizes is queried. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -23,7 +25,7 @@ public interface VirtualMachineSizes { /** * Returns supported VM Sizes in a location. - * + * * @param location The location upon which virtual-machine-sizes is queried. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java index a29f0542a20b1..b7cbb5888f2dc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Admin credentials for virtual machine. */ +/** + * Admin credentials for virtual machine. + */ @Fluent public final class VirtualMachineSshCredentials { /* @@ -34,13 +36,15 @@ public final class VirtualMachineSshCredentials { @JsonProperty(value = "privateKeyData") private String privateKeyData; - /** Creates an instance of VirtualMachineSshCredentials class. */ + /** + * Creates an instance of VirtualMachineSshCredentials class. + */ public VirtualMachineSshCredentials() { } /** * Get the username property: Username of admin account. - * + * * @return the username value. */ public String username() { @@ -49,7 +53,7 @@ public String username() { /** * Set the username property: Username of admin account. - * + * * @param username the username value to set. * @return the VirtualMachineSshCredentials object itself. */ @@ -60,7 +64,7 @@ public VirtualMachineSshCredentials withUsername(String username) { /** * Get the password property: Password of admin account. - * + * * @return the password value. */ public String password() { @@ -69,7 +73,7 @@ public String password() { /** * Set the password property: Password of admin account. - * + * * @param password the password value to set. * @return the VirtualMachineSshCredentials object itself. */ @@ -80,7 +84,7 @@ public VirtualMachineSshCredentials withPassword(String password) { /** * Get the publicKeyData property: Public key data. - * + * * @return the publicKeyData value. */ public String publicKeyData() { @@ -89,7 +93,7 @@ public String publicKeyData() { /** * Set the publicKeyData property: Public key data. - * + * * @param publicKeyData the publicKeyData value to set. * @return the VirtualMachineSshCredentials object itself. */ @@ -100,7 +104,7 @@ public VirtualMachineSshCredentials withPublicKeyData(String publicKeyData) { /** * Get the privateKeyData property: Private key data. - * + * * @return the privateKeyData value. */ public String privateKeyData() { @@ -109,7 +113,7 @@ public String privateKeyData() { /** * Set the privateKeyData property: Private key data. - * + * * @param privateKeyData the privateKeyData value to set. * @return the VirtualMachineSshCredentials object itself. */ @@ -120,7 +124,7 @@ public VirtualMachineSshCredentials withPrivateKeyData(String privateKeyData) { /** * 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/VmPriority.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java index 4b5823d0d7423..0a0210937f499 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Virtual Machine priority. */ +/** + * Virtual Machine priority. + */ public final class VmPriority extends ExpandableStringEnum { - /** Static value Dedicated for VmPriority. */ + /** + * Static value Dedicated for VmPriority. + */ public static final VmPriority DEDICATED = fromString("Dedicated"); - /** Static value LowPriority for VmPriority. */ + /** + * Static value LowPriority for VmPriority. + */ public static final VmPriority LOW_PRIORITY = fromString("LowPriority"); /** * Creates a new instance of VmPriority value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public VmPriority() { /** * Creates or finds a VmPriority from its string representation. - * + * * @param name a name to look for. * @return the corresponding VmPriority. */ @@ -38,7 +44,7 @@ public static VmPriority fromString(String name) { /** * Gets known VmPriority values. - * + * * @return known VmPriority values. */ public static Collection values() { 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..d34b8409f9f3a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java @@ -0,0 +1,251 @@ +// Copyright (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 VolumeDefinition model. + */ +@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..c86b87794b01f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.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; + +/** + * 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..9c308b33d45b3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.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 VolumeOptions model. + */ +@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..57cba55239e83 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java @@ -0,0 +1,64 @@ +// Copyright (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..2cd84871d7b1d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.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; + +/** + * 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/WeekDay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java index 20afef84d8eab..b5e17d4314aa8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum of weekday. */ +/** + * Enum of weekday. + */ public final class WeekDay extends ExpandableStringEnum { - /** Static value Monday for WeekDay. */ + /** + * Static value Monday for WeekDay. + */ public static final WeekDay MONDAY = fromString("Monday"); - /** Static value Tuesday for WeekDay. */ + /** + * Static value Tuesday for WeekDay. + */ public static final WeekDay TUESDAY = fromString("Tuesday"); - /** Static value Wednesday for WeekDay. */ + /** + * Static value Wednesday for WeekDay. + */ public static final WeekDay WEDNESDAY = fromString("Wednesday"); - /** Static value Thursday for WeekDay. */ + /** + * Static value Thursday for WeekDay. + */ public static final WeekDay THURSDAY = fromString("Thursday"); - /** Static value Friday for WeekDay. */ + /** + * Static value Friday for WeekDay. + */ public static final WeekDay FRIDAY = fromString("Friday"); - /** Static value Saturday for WeekDay. */ + /** + * Static value Saturday for WeekDay. + */ public static final WeekDay SATURDAY = fromString("Saturday"); - /** Static value Sunday for WeekDay. */ + /** + * Static value Sunday for WeekDay. + */ public static final WeekDay SUNDAY = fromString("Sunday"); /** * Creates a new instance of WeekDay value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public WeekDay() { /** * Creates or finds a WeekDay from its string representation. - * + * * @param name a name to look for. * @return the corresponding WeekDay. */ @@ -53,7 +69,7 @@ public static WeekDay fromString(String name) { /** * Gets known WeekDay values. - * + * * @return known WeekDay values. */ public static Collection values() { 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..7a72463bfd185 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,729 +8,1288 @@ 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; -/** An immutable client-side representation of Workspace. */ +/** + * An immutable client-side representation of Workspace. + */ public interface Workspace { /** * 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 identity property: The identity of the resource. - * + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * * @return the identity value. */ ManagedServiceIdentity identity(); /** - * Gets the location property: Specifies the location of the resource. - * - * @return the location value. + * Gets the kind property: The kind property. + * + * @return the kind value. */ - String location(); + String kind(); /** - * Gets the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. + * Gets the location property: The location property. + * + * @return the location value. */ - Map tags(); + String location(); /** - * Gets the sku property: The sku of the workspace. - * + * Gets the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * * @return the sku value. */ Sku sku(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. + * Gets the tags property: Dictionary of <string>. + * + * @return the tags value. */ - SystemData systemData(); + Map tags(); /** - * Gets the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. */ - String workspaceId(); + SystemData systemData(); /** - * Gets the description property: The description of this workspace. - * - * @return the description value. + * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. + * + * @return the allowPublicAccessWhenBehindVnet value. */ - String description(); + Boolean allowPublicAccessWhenBehindVnet(); /** - * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. */ - String friendlyName(); + String applicationInsights(); /** - * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. + * Gets the associatedWorkspaces property: The associatedWorkspaces property. + * + * @return the associatedWorkspaces value. */ - String keyVault(); + List associatedWorkspaces(); /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. + * Gets the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. */ - String applicationInsights(); + List containerRegistries(); /** * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. - * + * * @return the containerRegistry value. */ String containerRegistry(); /** - * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. + * Gets the description property: The description of this workspace. + * + * @return the description value. */ - String storageAccount(); + String description(); /** * Gets the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning * experimentation services. - * + * * @return the discoveryUrl value. */ String discoveryUrl(); /** - * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. + * Gets the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. */ - ProvisioningState provisioningState(); + Boolean enableDataIsolation(); + + /** + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + Boolean enableSoftwareBillOfMaterials(); /** - * Gets the encryption property: The encryption settings of Azure ML workspace. - * + * Gets the encryption property: The encryption property. + * * @return the encryption value. */ EncryptionProperty encryption(); + /** + * Gets the existingWorkspaces property: The existingWorkspaces property. + * + * @return the existingWorkspaces value. + */ + List existingWorkspaces(); + + /** + * Gets the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + FeatureStoreSettings featureStoreSettings(); + + /** + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @return the friendlyName value. + */ + String friendlyName(); + /** * Gets the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected * by the service. - * + * * @return the hbiWorkspace value. */ Boolean hbiWorkspace(); /** - * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. + * Gets the hubResourceId property: The hubResourceId property. + * + * @return the hubResourceId value. */ - String serviceProvisionedResourceGroup(); - - /** - * Gets the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. - */ - Integer privateLinkCount(); + String hubResourceId(); /** * Gets the imageBuildCompute property: The compute name for image build. - * + * * @return the imageBuildCompute value. */ String imageBuildCompute(); /** - * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when - * behind VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. */ - Boolean allowPublicAccessWhenBehindVnet(); + List ipAllowlist(); /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. + * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. + * + * @return the keyVault value. */ - PublicNetworkAccess publicNetworkAccess(); + String keyVault(); /** - * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. + * Gets the keyVaults property: The keyVaults property. + * + * @return the keyVaults value. */ - List privateEndpointConnections(); + List keyVaults(); /** - * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. + * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. */ - List sharedPrivateLinkResources(); + ManagedNetworkSettings managedNetwork(); + + /** + * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. + * + * @return the mlFlowTrackingUri value. + */ + String mlFlowTrackingUri(); /** * Gets the notebookInfo property: The notebook info of Azure ML workspace. - * + * * @return the notebookInfo value. */ NotebookResourceInfo notebookInfo(); + /** + * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @return the primaryUserAssignedIdentity value. + */ + String primaryUserAssignedIdentity(); + + /** + * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + + /** + * Gets the privateLinkCount property: Count of private connections in the workspace. + * + * @return the privateLinkCount value. + */ + Integer privateLinkCount(); + + /** + * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + PublicNetworkAccessType publicNetworkAccess(); + + /** + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. + */ + ServerlessComputeSettings serverlessComputeSettings(); + /** * Gets the serviceManagedResourcesSettings property: The service managed resource settings. - * + * * @return the serviceManagedResourcesSettings value. */ ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. + * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP + * in customer subscription if the workspace is CMK workspace. + * + * @return the serviceProvisionedResourceGroup value. */ - String primaryUserAssignedIdentity(); + String serviceProvisionedResourceGroup(); /** - * Gets the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. + * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * + * @return the sharedPrivateLinkResources value. */ - String tenantId(); + List sharedPrivateLinkResources(); + + /** + * Gets the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + Integer softDeleteRetentionInDays(); + + /** + * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @return the storageAccount value. + */ + String storageAccount(); + + /** + * Gets the storageAccounts property: The storageAccounts property. + * + * @return the storageAccounts value. + */ + List storageAccounts(); /** * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) * enabled. - * + * * @return the storageHnsEnabled value. */ Boolean storageHnsEnabled(); /** - * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. - * - * @return the mlFlowTrackingUri value. + * Gets the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. */ - String mlFlowTrackingUri(); + String systemDatastoresAuthMode(); + + /** + * Gets the tenantId property: The tenant id associated with this workspace. + * + * @return the tenantId value. + */ + String tenantId(); /** * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 * API. - * + * * @return the v1LegacyMode value. */ Boolean v1LegacyMode(); + /** + * Gets the workspaceHubConfig property: WorkspaceHub's configuration object. + * + * @return the workspaceHubConfig value. + */ + WorkspaceHubConfig workspaceHubConfig(); + + /** + * Gets the workspaceId property: The immutable id associated with this workspace. + * + * @return the workspaceId value. + */ + String workspaceId(); + /** * 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.WorkspaceInner object. - * + * * @return the inner object. */ WorkspaceInner innerModel(); - /** The entirety of the Workspace definition. */ + /** + * The entirety of the Workspace definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The Workspace definition stages. */ + + /** + * The Workspace definition stages. + */ interface DefinitionStages { - /** The first stage of the Workspace definition. */ + /** + * The first stage of the Workspace definition. + */ interface Blank extends WithResourceGroup { } - /** The stage of the Workspace definition allowing to specify parent resource. */ + + /** + * The stage of the Workspace 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 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. */ - interface WithCreate - extends DefinitionStages.WithLocation, - DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithSku, - DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName, - DefinitionStages.WithKeyVault, - DefinitionStages.WithApplicationInsights, - DefinitionStages.WithContainerRegistry, - DefinitionStages.WithStorageAccount, - DefinitionStages.WithDiscoveryUrl, - DefinitionStages.WithEncryption, - DefinitionStages.WithHbiWorkspace, - DefinitionStages.WithImageBuildCompute, - DefinitionStages.WithAllowPublicAccessWhenBehindVnet, - DefinitionStages.WithPublicNetworkAccess, - DefinitionStages.WithSharedPrivateLinkResources, - DefinitionStages.WithServiceManagedResourcesSettings, - DefinitionStages.WithPrimaryUserAssignedIdentity, - DefinitionStages.WithV1LegacyMode { + interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, + DefinitionStages.WithIdentity, DefinitionStages.WithKind, DefinitionStages.WithSku, + DefinitionStages.WithAllowPublicAccessWhenBehindVnet, DefinitionStages.WithApplicationInsights, + DefinitionStages.WithAssociatedWorkspaces, DefinitionStages.WithContainerRegistries, + DefinitionStages.WithContainerRegistry, DefinitionStages.WithDescription, DefinitionStages.WithDiscoveryUrl, + DefinitionStages.WithEnableDataIsolation, DefinitionStages.WithEnableSoftwareBillOfMaterials, + DefinitionStages.WithEncryption, DefinitionStages.WithExistingWorkspaces, + DefinitionStages.WithFeatureStoreSettings, DefinitionStages.WithFriendlyName, + DefinitionStages.WithHbiWorkspace, DefinitionStages.WithHubResourceId, + DefinitionStages.WithImageBuildCompute, DefinitionStages.WithIpAllowlist, DefinitionStages.WithKeyVault, + DefinitionStages.WithKeyVaults, DefinitionStages.WithManagedNetwork, + DefinitionStages.WithPrimaryUserAssignedIdentity, DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithServerlessComputeSettings, DefinitionStages.WithServiceManagedResourcesSettings, + DefinitionStages.WithSharedPrivateLinkResources, DefinitionStages.WithSoftDeleteRetentionInDays, + DefinitionStages.WithStorageAccount, DefinitionStages.WithStorageAccounts, + DefinitionStages.WithSystemDatastoresAuthMode, DefinitionStages.WithV1LegacyMode, + DefinitionStages.WithWorkspaceHubConfig { /** * Executes the create request. - * + * * @return the created resource. */ Workspace create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Workspace create(Context context); } - /** The stage of the Workspace definition allowing to specify location. */ + + /** + * The stage of the Workspace definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. + * + * @param location The location property. * @return the next definition stage. */ WithCreate withRegion(Region location); /** * Specifies the region for the resource. - * - * @param location Specifies the location of the resource. + * + * @param location The location property. * @return the next definition stage. */ WithCreate withRegion(String location); } - /** The stage of the Workspace definition allowing to specify tags. */ + + /** + * The stage of the Workspace definition allowing to specify tags. + */ interface WithTags { /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. - * - * @param tags Contains resource tags defined as key/value pairs. + * Specifies the tags property: Dictionary of <string>. + * + * @param tags Dictionary of <string>. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Workspace definition allowing to specify identity. */ + + /** + * The stage of the Workspace definition allowing to specify identity. + */ interface WithIdentity { /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. + * 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 Workspace definition allowing to specify sku. */ + + /** + * The stage of the Workspace definition allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: The kind property.. + * + * @param kind The kind property. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the Workspace definition allowing to specify sku. + */ interface WithSku { /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. + * Specifies the sku property: Optional. This field is required to be implemented by the RP because AML is + * supporting more than one tier. + * + * @param sku Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * @return the next definition stage. */ WithCreate withSku(Sku sku); } - /** The stage of the Workspace definition allowing to specify description. */ - interface WithDescription { + + /** + * The stage of the Workspace definition allowing to specify allowPublicAccessWhenBehindVnet. + */ + interface WithAllowPublicAccessWhenBehindVnet { /** - * Specifies the description property: The description of this workspace.. - * - * @param description The description of this workspace. + * Specifies the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public + * access when behind VNet.. + * + * @param allowPublicAccessWhenBehindVnet The flag to indicate whether to allow public access when behind + * VNet. * @return the next definition stage. */ - WithCreate withDescription(String description); + WithCreate withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet); } - /** The stage of the Workspace definition allowing to specify friendlyName. */ - interface WithFriendlyName { + + /** + * The stage of the Workspace definition allowing to specify applicationInsights. + */ + interface WithApplicationInsights { /** - * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @param friendlyName The friendly name for this workspace. This name in mutable. + * Specifies the applicationInsights property: ARM id of the application insights associated with this + * workspace.. + * + * @param applicationInsights ARM id of the application insights associated with this workspace. * @return the next definition stage. */ - WithCreate withFriendlyName(String friendlyName); + WithCreate withApplicationInsights(String applicationInsights); } - /** The stage of the Workspace definition allowing to specify keyVault. */ - interface WithKeyVault { + + /** + * The stage of the Workspace definition allowing to specify associatedWorkspaces. + */ + interface WithAssociatedWorkspaces { /** - * Specifies the keyVault property: ARM id of the key vault associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @param keyVault ARM id of the key vault associated with this workspace. This cannot be changed once the - * workspace has been created. + * Specifies the associatedWorkspaces property: The associatedWorkspaces property.. + * + * @param associatedWorkspaces The associatedWorkspaces property. * @return the next definition stage. */ - WithCreate withKeyVault(String keyVault); + WithCreate withAssociatedWorkspaces(List associatedWorkspaces); } - /** The stage of the Workspace definition allowing to specify applicationInsights. */ - interface WithApplicationInsights { + + /** + * The stage of the Workspace definition allowing to specify containerRegistries. + */ + interface WithContainerRegistries { /** - * Specifies the applicationInsights property: ARM id of the application insights associated with this - * workspace.. - * - * @param applicationInsights ARM id of the application insights associated with this workspace. + * Specifies the containerRegistries property: The containerRegistries property.. + * + * @param containerRegistries The containerRegistries property. * @return the next definition stage. */ - WithCreate withApplicationInsights(String applicationInsights); + WithCreate withContainerRegistries(List containerRegistries); } - /** The stage of the Workspace definition allowing to specify containerRegistry. */ + + /** + * The stage of the Workspace definition allowing to specify containerRegistry. + */ interface WithContainerRegistry { /** * Specifies the containerRegistry property: ARM id of the container registry associated with this * workspace.. - * + * * @param containerRegistry ARM id of the container registry associated with this workspace. * @return the next definition stage. */ WithCreate withContainerRegistry(String containerRegistry); } - /** The stage of the Workspace definition allowing to specify storageAccount. */ - interface WithStorageAccount { + + /** + * The stage of the Workspace definition allowing to specify description. + */ + interface WithDescription { /** - * Specifies the storageAccount property: ARM id of the storage account associated with this workspace. This - * cannot be changed once the workspace has been created. - * - * @param storageAccount ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. + * Specifies the description property: The description of this workspace.. + * + * @param description The description of this workspace. * @return the next definition stage. */ - WithCreate withStorageAccount(String storageAccount); + WithCreate withDescription(String description); } - /** The stage of the Workspace definition allowing to specify discoveryUrl. */ + + /** + * The stage of the Workspace definition allowing to specify discoveryUrl. + */ interface WithDiscoveryUrl { /** * Specifies the discoveryUrl property: Url for the discovery service to identify regional endpoints for * machine learning experimentation services. - * + * * @param discoveryUrl Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. + * experimentation services. * @return the next definition stage. */ WithCreate withDiscoveryUrl(String discoveryUrl); } - /** The stage of the Workspace definition allowing to specify encryption. */ + + /** + * The stage of the Workspace definition allowing to specify enableDataIsolation. + */ + interface WithEnableDataIsolation { + /** + * Specifies the enableDataIsolation property: The enableDataIsolation property.. + * + * @param enableDataIsolation The enableDataIsolation property. + * @return the next definition stage. + */ + WithCreate withEnableDataIsolation(Boolean enableDataIsolation); + } + + /** + * The stage of the Workspace definition allowing to specify enableSoftwareBillOfMaterials. + */ + interface WithEnableSoftwareBillOfMaterials { + /** + * Specifies the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be + * enabled for this workspace. + * + * @param enableSoftwareBillOfMaterials Flag to tell if SoftwareBillOfMaterial should be enabled for this + * workspace. + * @return the next definition stage. + */ + WithCreate withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials); + } + + /** + * The stage of the Workspace definition allowing to specify encryption. + */ interface WithEncryption { /** - * Specifies the encryption property: The encryption settings of Azure ML workspace.. - * - * @param encryption The encryption settings of Azure ML workspace. + * Specifies the encryption property: The encryption property.. + * + * @param encryption The encryption property. * @return the next definition stage. */ WithCreate withEncryption(EncryptionProperty encryption); } - /** The stage of the Workspace definition allowing to specify hbiWorkspace. */ + + /** + * The stage of the Workspace definition allowing to specify existingWorkspaces. + */ + interface WithExistingWorkspaces { + /** + * Specifies the existingWorkspaces property: The existingWorkspaces property.. + * + * @param existingWorkspaces The existingWorkspaces property. + * @return the next definition stage. + */ + WithCreate withExistingWorkspaces(List existingWorkspaces); + } + + /** + * The stage of the Workspace definition allowing to specify featureStoreSettings. + */ + interface WithFeatureStoreSettings { + /** + * Specifies the featureStoreSettings property: Settings for feature store type workspace.. + * + * @param featureStoreSettings Settings for feature store type workspace. + * @return the next definition stage. + */ + WithCreate withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); + } + + /** + * The stage of the Workspace definition allowing to specify friendlyName. + */ + interface WithFriendlyName { + /** + * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @param friendlyName The friendly name for this workspace. This name in mutable. + * @return the next definition stage. + */ + WithCreate withFriendlyName(String friendlyName); + } + + /** + * The stage of the Workspace definition allowing to specify hbiWorkspace. + */ interface WithHbiWorkspace { /** * Specifies the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic * data collected by the service. - * + * * @param hbiWorkspace The flag to signal HBI data in the workspace and reduce diagnostic data collected by - * the service. + * the service. * @return the next definition stage. */ WithCreate withHbiWorkspace(Boolean hbiWorkspace); } - /** The stage of the Workspace definition allowing to specify imageBuildCompute. */ + + /** + * The stage of the Workspace definition allowing to specify hubResourceId. + */ + interface WithHubResourceId { + /** + * Specifies the hubResourceId property: The hubResourceId property.. + * + * @param hubResourceId The hubResourceId property. + * @return the next definition stage. + */ + WithCreate withHubResourceId(String hubResourceId); + } + + /** + * The stage of the Workspace definition allowing to specify imageBuildCompute. + */ interface WithImageBuildCompute { /** - * Specifies the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute The compute name for image build. + * Specifies the imageBuildCompute property: The compute name for image build. + * + * @param imageBuildCompute The compute name for image build. + * @return the next definition stage. + */ + WithCreate withImageBuildCompute(String imageBuildCompute); + } + + /** + * The stage of the Workspace definition allowing to specify ipAllowlist. + */ + interface WithIpAllowlist { + /** + * Specifies the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace.. + * + * @param ipAllowlist The list of IPv4 addresses that are allowed to access the workspace. + * @return the next definition stage. + */ + WithCreate withIpAllowlist(List ipAllowlist); + } + + /** + * The stage of the Workspace definition allowing to specify keyVault. + */ + interface WithKeyVault { + /** + * Specifies the keyVault property: ARM id of the key vault associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @param keyVault ARM id of the key vault associated with this workspace. This cannot be changed once the + * workspace has been created. + * @return the next definition stage. + */ + WithCreate withKeyVault(String keyVault); + } + + /** + * The stage of the Workspace definition allowing to specify keyVaults. + */ + interface WithKeyVaults { + /** + * Specifies the keyVaults property: The keyVaults property.. + * + * @param keyVaults The keyVaults property. + * @return the next definition stage. + */ + WithCreate withKeyVaults(List keyVaults); + } + + /** + * 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); + } + + /** + * The stage of the Workspace definition allowing to specify primaryUserAssignedIdentity. + */ + interface WithPrimaryUserAssignedIdentity { + /** + * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that + * represents the workspace identity.. + * + * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace + * identity. + * @return the next definition stage. + */ + WithCreate withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); + } + + /** + * The stage of the Workspace definition allowing to specify publicNetworkAccess. + */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. + * + * @param publicNetworkAccess Whether requests from Public Network are allowed. * @return the next definition stage. */ - WithCreate withImageBuildCompute(String imageBuildCompute); + WithCreate withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess); } - /** The stage of the Workspace definition allowing to specify allowPublicAccessWhenBehindVnet. */ - interface WithAllowPublicAccessWhenBehindVnet { + + /** + * The stage of the Workspace definition allowing to specify serverlessComputeSettings. + */ + interface WithServerlessComputeSettings { /** - * Specifies the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public - * access when behind VNet.. - * - * @param allowPublicAccessWhenBehindVnet The flag to indicate whether to allow public access when behind - * VNet. + * Specifies the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @param serverlessComputeSettings Settings for serverless compute in a workspace. * @return the next definition stage. */ - WithCreate withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet); + WithCreate withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); } - /** The stage of the Workspace definition allowing to specify publicNetworkAccess. */ - interface WithPublicNetworkAccess { + + /** + * The stage of the Workspace definition allowing to specify serviceManagedResourcesSettings. + */ + interface WithServiceManagedResourcesSettings { /** - * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. - * - * @param publicNetworkAccess Whether requests from Public Network are allowed. + * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. + * + * @param serviceManagedResourcesSettings The service managed resource settings. * @return the next definition stage. */ - WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + WithCreate + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); } - /** The stage of the Workspace definition allowing to specify sharedPrivateLinkResources. */ + + /** + * The stage of the Workspace definition allowing to specify sharedPrivateLinkResources. + */ interface WithSharedPrivateLinkResources { /** * Specifies the sharedPrivateLinkResources property: The list of shared private link resources in this * workspace.. - * + * * @param sharedPrivateLinkResources The list of shared private link resources in this workspace. * @return the next definition stage. */ WithCreate withSharedPrivateLinkResources(List sharedPrivateLinkResources); } - /** The stage of the Workspace definition allowing to specify serviceManagedResourcesSettings. */ - interface WithServiceManagedResourcesSettings { + + /** + * The stage of the Workspace definition allowing to specify softDeleteRetentionInDays. + */ + interface WithSoftDeleteRetentionInDays { /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. - * - * @param serviceManagedResourcesSettings The service managed resource settings. + * Specifies the softDeleteRetentionInDays property: Retention time in days after workspace get soft + * deleted.. + * + * @param softDeleteRetentionInDays Retention time in days after workspace get soft deleted. * @return the next definition stage. */ - WithCreate withServiceManagedResourcesSettings( - ServiceManagedResourcesSettings serviceManagedResourcesSettings); + WithCreate withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays); } - /** The stage of the Workspace definition allowing to specify primaryUserAssignedIdentity. */ - interface WithPrimaryUserAssignedIdentity { + + /** + * The stage of the Workspace definition allowing to specify storageAccount. + */ + interface WithStorageAccount { /** - * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that - * represents the workspace identity.. - * - * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace - * identity. + * Specifies the storageAccount property: ARM id of the storage account associated with this workspace. This + * cannot be changed once the workspace has been created. + * + * @param storageAccount ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. * @return the next definition stage. */ - WithCreate withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); + WithCreate withStorageAccount(String storageAccount); + } + + /** + * The stage of the Workspace definition allowing to specify storageAccounts. + */ + interface WithStorageAccounts { + /** + * Specifies the storageAccounts property: The storageAccounts property.. + * + * @param storageAccounts The storageAccounts property. + * @return the next definition stage. + */ + WithCreate withStorageAccounts(List storageAccounts); + } + + /** + * The stage of the Workspace definition allowing to specify systemDatastoresAuthMode. + */ + interface WithSystemDatastoresAuthMode { + /** + * Specifies the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores + * of the workspace.. + * + * @param systemDatastoresAuthMode The auth mode used for accessing the system datastores of the workspace. + * @return the next definition stage. + */ + WithCreate withSystemDatastoresAuthMode(String systemDatastoresAuthMode); } - /** The stage of the Workspace definition allowing to specify v1LegacyMode. */ + + /** + * The stage of the Workspace definition allowing to specify v1LegacyMode. + */ interface WithV1LegacyMode { /** * Specifies the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided * by the v2 API.. - * + * * @param v1LegacyMode Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. * @return the next definition stage. */ WithCreate withV1LegacyMode(Boolean v1LegacyMode); } + + /** + * The stage of the Workspace definition allowing to specify workspaceHubConfig. + */ + interface WithWorkspaceHubConfig { + /** + * Specifies the workspaceHubConfig property: WorkspaceHub's configuration object.. + * + * @param workspaceHubConfig WorkspaceHub's configuration object. + * @return the next definition stage. + */ + WithCreate withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig); + } } + /** * Begins update for the Workspace resource. - * + * * @return the stage of resource update. */ Workspace.Update update(); - /** The template for Workspace update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithSku, - UpdateStages.WithIdentity, - UpdateStages.WithDescription, - UpdateStages.WithFriendlyName, - UpdateStages.WithImageBuildCompute, - UpdateStages.WithServiceManagedResourcesSettings, - UpdateStages.WithPrimaryUserAssignedIdentity, - UpdateStages.WithPublicNetworkAccess, - UpdateStages.WithApplicationInsights, - UpdateStages.WithContainerRegistry { + /** + * The template for Workspace update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, + UpdateStages.WithApplicationInsights, UpdateStages.WithContainerRegistry, UpdateStages.WithDescription, + UpdateStages.WithEnableDataIsolation, UpdateStages.WithEnableSoftwareBillOfMaterials, + UpdateStages.WithEncryption, UpdateStages.WithFeatureStoreSettings, UpdateStages.WithFriendlyName, + UpdateStages.WithImageBuildCompute, UpdateStages.WithIpAllowlist, UpdateStages.WithManagedNetwork, + UpdateStages.WithPrimaryUserAssignedIdentity, UpdateStages.WithPublicNetworkAccess, + UpdateStages.WithServerlessComputeSettings, UpdateStages.WithServiceManagedResourcesSettings, + UpdateStages.WithSoftDeleteRetentionInDays, UpdateStages.WithV1LegacyMode { /** * Executes the update request. - * + * * @return the updated resource. */ Workspace apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Workspace apply(Context context); } - /** The Workspace update stages. */ + + /** + * The Workspace update stages. + */ interface UpdateStages { - /** The stage of the Workspace update allowing to specify tags. */ + /** + * The stage of the Workspace update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: The resource tags for the machine learning workspace.. - * + * * @param tags The resource tags for the machine learning workspace. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the Workspace update allowing to specify sku. */ + + /** + * The stage of the Workspace 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(ManagedServiceIdentity identity); + } + + /** + * The stage of the Workspace update allowing to specify sku. + */ interface WithSku { /** - * Specifies the sku property: The sku of the workspace.. - * - * @param sku The sku of the workspace. + * Specifies the sku property: Optional. This field is required to be implemented by the RP because AML is + * supporting more than one tier. + * + * @param sku Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * @return the next definition stage. */ Update withSku(Sku sku); } - /** The stage of the Workspace update allowing to specify identity. */ - interface WithIdentity { + + /** + * The stage of the Workspace update allowing to specify applicationInsights. + */ + interface WithApplicationInsights { + /** + * Specifies the applicationInsights property: ARM id of the application insights associated with this + * workspace.. + * + * @param applicationInsights ARM id of the application insights associated with this workspace. + * @return the next definition stage. + */ + Update withApplicationInsights(String applicationInsights); + } + + /** + * The stage of the Workspace update allowing to specify containerRegistry. + */ + interface WithContainerRegistry { /** - * Specifies the identity property: The identity of the resource.. - * - * @param identity The identity of the resource. + * Specifies the containerRegistry property: ARM id of the container registry associated with this + * workspace.. + * + * @param containerRegistry ARM id of the container registry associated with this workspace. * @return the next definition stage. */ - Update withIdentity(ManagedServiceIdentity identity); + Update withContainerRegistry(String containerRegistry); } - /** The stage of the Workspace update allowing to specify description. */ + + /** + * The stage of the Workspace update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: The description of this workspace.. - * + * * @param description The description of this workspace. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the Workspace update allowing to specify friendlyName. */ + + /** + * The stage of the Workspace update allowing to specify enableDataIsolation. + */ + interface WithEnableDataIsolation { + /** + * Specifies the enableDataIsolation property: The enableDataIsolation property.. + * + * @param enableDataIsolation The enableDataIsolation property. + * @return the next definition stage. + */ + Update withEnableDataIsolation(Boolean enableDataIsolation); + } + + /** + * The stage of the Workspace update allowing to specify enableSoftwareBillOfMaterials. + */ + interface WithEnableSoftwareBillOfMaterials { + /** + * Specifies the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be + * enabled for this workspace. + * + * @param enableSoftwareBillOfMaterials Flag to tell if SoftwareBillOfMaterial should be enabled for this + * workspace. + * @return the next definition stage. + */ + Update withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials); + } + + /** + * The stage of the Workspace update allowing to specify encryption. + */ + interface WithEncryption { + /** + * Specifies the encryption property: The encryption property.. + * + * @param encryption The encryption property. + * @return the next definition stage. + */ + Update withEncryption(EncryptionUpdateProperties encryption); + } + + /** + * The stage of the Workspace update allowing to specify featureStoreSettings. + */ + interface WithFeatureStoreSettings { + /** + * Specifies the featureStoreSettings property: Settings for feature store type workspace.. + * + * @param featureStoreSettings Settings for feature store type workspace. + * @return the next definition stage. + */ + Update withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); + } + + /** + * The stage of the Workspace update allowing to specify friendlyName. + */ interface WithFriendlyName { /** - * Specifies the friendlyName property: The friendly name for this workspace.. - * - * @param friendlyName The friendly name for this workspace. + * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @param friendlyName The friendly name for this workspace. This name in mutable. * @return the next definition stage. */ Update withFriendlyName(String friendlyName); } - /** The stage of the Workspace update allowing to specify imageBuildCompute. */ + + /** + * The stage of the Workspace update allowing to specify imageBuildCompute. + */ interface WithImageBuildCompute { /** * Specifies the imageBuildCompute property: The compute name for image build. - * + * * @param imageBuildCompute The compute name for image build. * @return the next definition stage. */ Update withImageBuildCompute(String imageBuildCompute); } - /** The stage of the Workspace update allowing to specify serviceManagedResourcesSettings. */ - interface WithServiceManagedResourcesSettings { + + /** + * The stage of the Workspace update allowing to specify ipAllowlist. + */ + interface WithIpAllowlist { /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. - * - * @param serviceManagedResourcesSettings The service managed resource settings. + * Specifies the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace.. + * + * @param ipAllowlist The list of IPv4 addresses that are allowed to access the workspace. * @return the next definition stage. */ - Update withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); + Update withIpAllowlist(List ipAllowlist); + } + + /** + * The stage of the Workspace update 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. + */ + Update withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); } - /** The stage of the Workspace update allowing to specify primaryUserAssignedIdentity. */ + + /** + * The stage of the Workspace update allowing to specify primaryUserAssignedIdentity. + */ interface WithPrimaryUserAssignedIdentity { /** * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that * represents the workspace identity.. - * + * * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace - * identity. + * identity. * @return the next definition stage. */ Update withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); } - /** The stage of the Workspace update allowing to specify publicNetworkAccess. */ + + /** + * The stage of the Workspace update allowing to specify publicNetworkAccess. + */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. - * + * * @param publicNetworkAccess Whether requests from Public Network are allowed. * @return the next definition stage. */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + Update withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess); } - /** The stage of the Workspace update allowing to specify applicationInsights. */ - interface WithApplicationInsights { + + /** + * The stage of the Workspace update allowing to specify serverlessComputeSettings. + */ + interface WithServerlessComputeSettings { /** - * Specifies the applicationInsights property: ARM id of the application insights associated with this - * workspace.. - * - * @param applicationInsights ARM id of the application insights associated with this workspace. + * Specifies the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @param serverlessComputeSettings Settings for serverless compute in a workspace. * @return the next definition stage. */ - Update withApplicationInsights(String applicationInsights); + Update withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); } - /** The stage of the Workspace update allowing to specify containerRegistry. */ - interface WithContainerRegistry { + + /** + * The stage of the Workspace update allowing to specify serviceManagedResourcesSettings. + */ + interface WithServiceManagedResourcesSettings { /** - * Specifies the containerRegistry property: ARM id of the container registry associated with this - * workspace.. - * - * @param containerRegistry ARM id of the container registry associated with this workspace. + * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. + * + * @param serviceManagedResourcesSettings The service managed resource settings. * @return the next definition stage. */ - Update withContainerRegistry(String containerRegistry); + Update withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); + } + + /** + * The stage of the Workspace update allowing to specify softDeleteRetentionInDays. + */ + interface WithSoftDeleteRetentionInDays { + /** + * Specifies the softDeleteRetentionInDays property: Retention time in days after workspace get soft + * deleted.. + * + * @param softDeleteRetentionInDays Retention time in days after workspace get soft deleted. + * @return the next definition stage. + */ + Update withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays); + } + + /** + * The stage of the Workspace update allowing to specify v1LegacyMode. + */ + interface WithV1LegacyMode { + /** + * Specifies the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided + * by the v2 API.. + * + * @param v1LegacyMode Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + * @return the next definition stage. + */ + Update withV1LegacyMode(Boolean v1LegacyMode); } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Workspace refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -738,7 +1297,7 @@ interface WithContainerRegistry { /** * Diagnose workspace setup issue. - * + * * @throws com.azure.core.management.exception.ManagementException 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. @@ -747,20 +1306,20 @@ interface WithContainerRegistry { /** * Diagnose workspace setup issue. - * - * @param parameters The parameter of diagnosing workspace health. + * + * @param body The parameter of diagnosing workspace health. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters, Context context); + DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters body, Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container 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. @@ -772,7 +1331,7 @@ interface WithContainerRegistry { /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @throws com.azure.core.management.exception.ManagementException 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. @@ -780,102 +1339,102 @@ interface WithContainerRegistry { ListWorkspaceKeysResult listKeys(); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Get Azure Machine Learning Workspace notebook access token. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 Machine Learning Workspace notebook access token along with {@link Response}. */ - void resyncKeys(); + Response listNotebookAccessTokenWithResponse(Context context); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Get Azure Machine Learning Workspace notebook access token. + * * @throws com.azure.core.management.exception.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 Machine Learning Workspace notebook access token. */ - void resyncKeys(Context context); + NotebookAccessTokenResult listNotebookAccessToken(); /** - * return notebook access token and refresh token. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 listNotebookAccessTokenWithResponse(Context context); + Response listNotebookKeysWithResponse(Context context); /** - * return notebook access token and refresh token. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @throws com.azure.core.management.exception.ManagementException 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. */ - NotebookAccessTokenResult listNotebookAccessToken(); + ListNotebookKeysResult listNotebookKeys(); /** - * Prepare a notebook. - * + * Lists keys of Azure Machine Learning Workspace's storage account. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ - NotebookResourceInfo prepareNotebook(); + Response listStorageAccountKeysWithResponse(Context context); /** - * Prepare a notebook. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Lists keys of Azure Machine Learning Workspace's storage account. + * * @throws com.azure.core.management.exception.ManagementException 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. */ - NotebookResourceInfo prepareNotebook(Context context); + ListStorageAccountKeysResult listStorageAccountKeys(); /** - * List storage account keys of a workspace. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ - Response listStorageAccountKeysWithResponse(Context context); + NotebookResourceInfo prepareNotebook(); /** - * List storage account keys of a workspace. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - ListStorageAccountKeysResult listStorageAccountKeys(); + NotebookResourceInfo prepareNotebook(Context context); /** - * List keys of a notebook. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @throws com.azure.core.management.exception.ManagementException 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 listNotebookKeysWithResponse(Context context); + void resyncKeys(); /** - * List keys of a notebook. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container 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. */ - ListNotebookKeysResult listNotebookKeys(); + void resyncKeys(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java new file mode 100644 index 0000000000000..c94feb6d50fd4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The WorkspaceConnectionAccessKey model. + */ +@Fluent +public final class WorkspaceConnectionAccessKey { + /* + * The accessKeyId property. + */ + @JsonProperty(value = "accessKeyId") + private String accessKeyId; + + /* + * The secretAccessKey property. + */ + @JsonProperty(value = "secretAccessKey") + private String secretAccessKey; + + /** + * Creates an instance of WorkspaceConnectionAccessKey class. + */ + public WorkspaceConnectionAccessKey() { + } + + /** + * Get the accessKeyId property: The accessKeyId property. + * + * @return the accessKeyId value. + */ + public String accessKeyId() { + return this.accessKeyId; + } + + /** + * Set the accessKeyId property: The accessKeyId property. + * + * @param accessKeyId the accessKeyId value to set. + * @return the WorkspaceConnectionAccessKey object itself. + */ + public WorkspaceConnectionAccessKey withAccessKeyId(String accessKeyId) { + this.accessKeyId = accessKeyId; + return this; + } + + /** + * Get the secretAccessKey property: The secretAccessKey property. + * + * @return the secretAccessKey value. + */ + public String secretAccessKey() { + return this.secretAccessKey; + } + + /** + * Set the secretAccessKey property: The secretAccessKey property. + * + * @param secretAccessKey the secretAccessKey value to set. + * @return the WorkspaceConnectionAccessKey object itself. + */ + public WorkspaceConnectionAccessKey withSecretAccessKey(String secretAccessKey) { + this.secretAccessKey = secretAccessKey; + 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/WorkspaceConnectionApiKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java new file mode 100644 index 0000000000000..03147924a7822 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.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; + +/** + * Api key object for workspace connection credential. + */ +@Fluent +public final class WorkspaceConnectionApiKey { + /* + * The key property. + */ + @JsonProperty(value = "key") + private String key; + + /** + * Creates an instance of WorkspaceConnectionApiKey class. + */ + public WorkspaceConnectionApiKey() { + } + + /** + * Get the key property: The key property. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The key property. + * + * @param key the key value to set. + * @return the WorkspaceConnectionApiKey object itself. + */ + public WorkspaceConnectionApiKey withKey(String key) { + this.key = key; + 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/WorkspaceConnectionManagedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java index 8f7d813b83b87..b12c40483c11f 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 @@ -7,48 +7,32 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The WorkspaceConnectionManagedIdentity model. */ +/** + * The WorkspaceConnectionManagedIdentity model. + */ @Fluent -public class WorkspaceConnectionManagedIdentity { - /* - * The resourceId property. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - +public final class WorkspaceConnectionManagedIdentity { /* * The clientId property. */ @JsonProperty(value = "clientId") private String clientId; - /** Creates an instance of WorkspaceConnectionManagedIdentity class. */ - public WorkspaceConnectionManagedIdentity() { - } - - /** - * Get the resourceId property: The resourceId property. - * - * @return the resourceId value. + /* + * The resourceId property. */ - public String resourceId() { - return this.resourceId; - } + @JsonProperty(value = "resourceId") + private String resourceId; /** - * Set the resourceId property: The resourceId property. - * - * @param resourceId the resourceId value to set. - * @return the WorkspaceConnectionManagedIdentity object itself. + * Creates an instance of WorkspaceConnectionManagedIdentity class. */ - public WorkspaceConnectionManagedIdentity withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; + public WorkspaceConnectionManagedIdentity() { } /** * Get the clientId property: The clientId property. - * + * * @return the clientId value. */ public String clientId() { @@ -57,7 +41,7 @@ public String clientId() { /** * Set the clientId property: The clientId property. - * + * * @param clientId the clientId value to set. * @return the WorkspaceConnectionManagedIdentity object itself. */ @@ -66,9 +50,29 @@ public WorkspaceConnectionManagedIdentity withClientId(String clientId) { return this; } + /** + * Get the resourceId property: The resourceId property. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resourceId property. + * + * @param resourceId the resourceId value to set. + * @return the WorkspaceConnectionManagedIdentity object itself. + */ + public WorkspaceConnectionManagedIdentity 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/WorkspaceConnectionOAuth2.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java new file mode 100644 index 0000000000000..64cdd62a9f231 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java @@ -0,0 +1,246 @@ +// Copyright (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.UUID; + +/** + * ClientId and ClientSecret are required. Other properties are optional + * depending on each OAuth2 provider's implementation. + */ +@Fluent +public final class WorkspaceConnectionOAuth2 { + /* + * Required by Concur connection category + */ + @JsonProperty(value = "authUrl") + private String authUrl; + + /* + * Client id in the format of UUID + */ + @JsonProperty(value = "clientId") + private UUID clientId; + + /* + * The clientSecret property. + */ + @JsonProperty(value = "clientSecret") + private String clientSecret; + + /* + * Required by GoogleAdWords connection category + */ + @JsonProperty(value = "developerToken") + private String developerToken; + + /* + * The password property. + */ + @JsonProperty(value = "password") + private String password; + + /* + * Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho + * where user needs to get RefreshToken offline + */ + @JsonProperty(value = "refreshToken") + private String refreshToken; + + /* + * Required by QuickBooks and Xero connection categories + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * Concur, ServiceNow auth server AccessToken grant type is 'Password' + * which requires UsernamePassword + */ + @JsonProperty(value = "username") + private String username; + + /** + * Creates an instance of WorkspaceConnectionOAuth2 class. + */ + public WorkspaceConnectionOAuth2() { + } + + /** + * Get the authUrl property: Required by Concur connection category. + * + * @return the authUrl value. + */ + public String authUrl() { + return this.authUrl; + } + + /** + * Set the authUrl property: Required by Concur connection category. + * + * @param authUrl the authUrl value to set. + * @return the WorkspaceConnectionOAuth2 object itself. + */ + public WorkspaceConnectionOAuth2 withAuthUrl(String authUrl) { + this.authUrl = authUrl; + return this; + } + + /** + * Get the clientId property: Client id in the format of UUID. + * + * @return the clientId value. + */ + public UUID clientId() { + return this.clientId; + } + + /** + * Set the clientId property: Client id in the format of UUID. + * + * @param clientId the clientId value to set. + * @return the WorkspaceConnectionOAuth2 object itself. + */ + public WorkspaceConnectionOAuth2 withClientId(UUID clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientSecret property: The clientSecret property. + * + * @return the clientSecret value. + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set the clientSecret property: The clientSecret property. + * + * @param clientSecret the clientSecret value to set. + * @return the WorkspaceConnectionOAuth2 object itself. + */ + public WorkspaceConnectionOAuth2 withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Get the developerToken property: Required by GoogleAdWords connection category. + * + * @return the developerToken value. + */ + public String developerToken() { + return this.developerToken; + } + + /** + * Set the developerToken property: Required by GoogleAdWords connection category. + * + * @param developerToken the developerToken value to set. + * @return the WorkspaceConnectionOAuth2 object itself. + */ + public WorkspaceConnectionOAuth2 withDeveloperToken(String developerToken) { + this.developerToken = developerToken; + return this; + } + + /** + * Get the password property: The password property. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: The password property. + * + * @param password the password value to set. + * @return the WorkspaceConnectionOAuth2 object itself. + */ + public WorkspaceConnectionOAuth2 withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the refreshToken property: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, + * Zoho + * where user needs to get RefreshToken offline. + * + * @return the refreshToken value. + */ + public String refreshToken() { + return this.refreshToken; + } + + /** + * Set the refreshToken property: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, + * Zoho + * where user needs to get RefreshToken offline. + * + * @param refreshToken the refreshToken value to set. + * @return the WorkspaceConnectionOAuth2 object itself. + */ + public WorkspaceConnectionOAuth2 withRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + return this; + } + + /** + * Get the tenantId property: Required by QuickBooks and Xero connection categories. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: Required by QuickBooks and Xero connection categories. + * + * @param tenantId the tenantId value to set. + * @return the WorkspaceConnectionOAuth2 object itself. + */ + public WorkspaceConnectionOAuth2 withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the username property: Concur, ServiceNow auth server AccessToken grant type is 'Password' + * which requires UsernamePassword. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Concur, ServiceNow auth server AccessToken grant type is 'Password' + * which requires UsernamePassword. + * + * @param username the username value to set. + * @return the WorkspaceConnectionOAuth2 object itself. + */ + public WorkspaceConnectionOAuth2 withUsername(String username) { + this.username = username; + 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/WorkspaceConnectionPersonalAccessToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java index 67e3cac9d34e8..81840eee50617 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The WorkspaceConnectionPersonalAccessToken model. */ +/** + * The WorkspaceConnectionPersonalAccessToken model. + */ @Fluent public final class WorkspaceConnectionPersonalAccessToken { /* @@ -16,13 +18,15 @@ public final class WorkspaceConnectionPersonalAccessToken { @JsonProperty(value = "pat") private String pat; - /** Creates an instance of WorkspaceConnectionPersonalAccessToken class. */ + /** + * Creates an instance of WorkspaceConnectionPersonalAccessToken class. + */ public WorkspaceConnectionPersonalAccessToken() { } /** * Get the pat property: The pat property. - * + * * @return the pat value. */ public String pat() { @@ -31,7 +35,7 @@ public String pat() { /** * Set the pat property: The pat property. - * + * * @param pat the pat value to set. * @return the WorkspaceConnectionPersonalAccessToken object itself. */ @@ -42,7 +46,7 @@ public WorkspaceConnectionPersonalAccessToken withPat(String pat) { /** * 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/WorkspaceConnectionPropertiesV2.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java index a0a871c9c248b..2a368b5b5d2e5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java @@ -9,8 +9,12 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; -/** The WorkspaceConnectionPropertiesV2 model. */ +/** + * The WorkspaceConnectionPropertiesV2 model. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -18,12 +22,20 @@ defaultImpl = WorkspaceConnectionPropertiesV2.class) @JsonTypeName("WorkspaceConnectionPropertiesV2") @JsonSubTypes({ + @JsonSubTypes.Type(name = "AAD", value = AadAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "AccessKey", value = AccessKeyAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "AccountKey", value = AccountKeyAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "ApiKey", value = ApiKeyAuthWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "CustomKeys", value = CustomKeysWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "ManagedIdentity", value = ManagedIdentityAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "None", value = NoneAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type(name = "OAuth2", value = OAuth2AuthTypeWorkspaceConnectionProperties.class), @JsonSubTypes.Type(name = "PAT", value = PatAuthTypeWorkspaceConnectionProperties.class), @JsonSubTypes.Type(name = "SAS", value = SasAuthTypeWorkspaceConnectionProperties.class), - @JsonSubTypes.Type(name = "UsernamePassword", value = UsernamePasswordAuthTypeWorkspaceConnectionProperties.class), - @JsonSubTypes.Type(name = "None", value = NoneAuthTypeWorkspaceConnectionProperties.class), - @JsonSubTypes.Type(name = "ManagedIdentity", value = ManagedIdentityAuthTypeWorkspaceConnectionProperties.class) -}) + @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalAuthTypeWorkspaceConnectionProperties.class), + @JsonSubTypes.Type( + name = "UsernamePassword", + value = UsernamePasswordAuthTypeWorkspaceConnectionProperties.class) }) @Fluent public class WorkspaceConnectionPropertiesV2 { /* @@ -33,30 +45,56 @@ public class WorkspaceConnectionPropertiesV2 { private ConnectionCategory category; /* - * The target property. + * The createdByWorkspaceArmId property. */ - @JsonProperty(value = "target") - private String target; + @JsonProperty(value = "createdByWorkspaceArmId", access = JsonProperty.Access.WRITE_ONLY) + private String createdByWorkspaceArmId; /* - * Value details of the workspace connection. + * The expiryTime property. */ - @JsonProperty(value = "value") - private String value; + @JsonProperty(value = "expiryTime") + private OffsetDateTime expiryTime; /* - * format for the workspace connection value + * Group based on connection category */ - @JsonProperty(value = "valueFormat") - private ValueFormat valueFormat; + @JsonProperty(value = "group", access = JsonProperty.Access.WRITE_ONLY) + private ConnectionGroup group; - /** Creates an instance of WorkspaceConnectionPropertiesV2 class. */ + /* + * The isSharedToAll property. + */ + @JsonProperty(value = "isSharedToAll") + private Boolean isSharedToAll; + + /* + * Any object + */ + @JsonProperty(value = "metadata") + private Object metadata; + + /* + * The sharedUserList property. + */ + @JsonProperty(value = "sharedUserList") + private List sharedUserList; + + /* + * The target property. + */ + @JsonProperty(value = "target") + private String target; + + /** + * Creates an instance of WorkspaceConnectionPropertiesV2 class. + */ public WorkspaceConnectionPropertiesV2() { } /** * Get the category property: Category of the connection. - * + * * @return the category value. */ public ConnectionCategory category() { @@ -65,7 +103,7 @@ public ConnectionCategory category() { /** * Set the category property: Category of the connection. - * + * * @param category the category value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ @@ -75,68 +113,126 @@ public WorkspaceConnectionPropertiesV2 withCategory(ConnectionCategory category) } /** - * Get the target property: The target property. - * - * @return the target value. + * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. + * + * @return the createdByWorkspaceArmId value. */ - public String target() { - return this.target; + public String createdByWorkspaceArmId() { + return this.createdByWorkspaceArmId; } /** - * Set the target property: The target property. - * - * @param target the target value to set. + * Get the expiryTime property: The expiryTime property. + * + * @return the expiryTime value. + */ + public OffsetDateTime expiryTime() { + return this.expiryTime; + } + + /** + * Set the expiryTime property: The expiryTime property. + * + * @param expiryTime the expiryTime value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withTarget(String target) { - this.target = target; + public WorkspaceConnectionPropertiesV2 withExpiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; return this; } /** - * Get the value property: Value details of the workspace connection. - * - * @return the value value. + * Get the group property: Group based on connection category. + * + * @return the group value. + */ + public ConnectionGroup group() { + return this.group; + } + + /** + * Get the isSharedToAll property: The isSharedToAll property. + * + * @return the isSharedToAll value. */ - public String value() { - return this.value; + public Boolean isSharedToAll() { + return this.isSharedToAll; } /** - * Set the value property: Value details of the workspace connection. - * - * @param value the value value to set. + * Set the isSharedToAll property: The isSharedToAll property. + * + * @param isSharedToAll the isSharedToAll value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withValue(String value) { - this.value = value; + public WorkspaceConnectionPropertiesV2 withIsSharedToAll(Boolean isSharedToAll) { + this.isSharedToAll = isSharedToAll; return this; } /** - * Get the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. + * Get the metadata property: Any object. + * + * @return the metadata value. */ - public ValueFormat valueFormat() { - return this.valueFormat; + public Object metadata() { + return this.metadata; } /** - * Set the valueFormat property: format for the workspace connection value. - * - * @param valueFormat the valueFormat value to set. + * Set the metadata property: Any object. + * + * @param metadata the metadata value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; + public WorkspaceConnectionPropertiesV2 withMetadata(Object metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the sharedUserList property: The sharedUserList property. + * + * @return the sharedUserList value. + */ + public List sharedUserList() { + return this.sharedUserList; + } + + /** + * Set the sharedUserList property: The sharedUserList property. + * + * @param sharedUserList the sharedUserList value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withSharedUserList(List sharedUserList) { + this.sharedUserList = sharedUserList; + return this; + } + + /** + * Get the target property: The target property. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: The target property. + * + * @param target the target value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withTarget(String target) { + this.target = target; 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/WorkspaceConnectionPropertiesV2BasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java index 22ef3cb48926e..5856df06d397a 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 @@ -4,90 +4,109 @@ 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.WorkspaceConnectionPropertiesV2BasicResourceInner; -/** An immutable client-side representation of WorkspaceConnectionPropertiesV2BasicResource. */ +/** + * An immutable client-side representation of WorkspaceConnectionPropertiesV2BasicResource. + */ public interface WorkspaceConnectionPropertiesV2BasicResource { /** * 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: The properties property. - * + * * @return the properties value. */ WorkspaceConnectionPropertiesV2 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.WorkspaceConnectionPropertiesV2BasicResourceInner object. - * + * * @return the inner object. */ WorkspaceConnectionPropertiesV2BasicResourceInner innerModel(); - /** The entirety of the WorkspaceConnectionPropertiesV2BasicResource definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { + /** + * The entirety of the WorkspaceConnectionPropertiesV2BasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { } - /** The WorkspaceConnectionPropertiesV2BasicResource definition stages. */ + + /** + * The WorkspaceConnectionPropertiesV2BasicResource definition stages. + */ interface DefinitionStages { - /** The first stage of the WorkspaceConnectionPropertiesV2BasicResource definition. */ + /** + * The first stage of the WorkspaceConnectionPropertiesV2BasicResource definition. + */ interface Blank extends WithParentResource { } + /** * The stage of the WorkspaceConnectionPropertiesV2BasicResource 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. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); } - /** The stage of the WorkspaceConnectionPropertiesV2BasicResource definition allowing to specify properties. */ + + /** + * The stage of the WorkspaceConnectionPropertiesV2BasicResource definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: The properties property.. - * + * * @param properties The properties property. * @return the next definition stage. */ 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 @@ -96,32 +115,120 @@ interface WithProperties { interface WithCreate { /** * Executes the create request. - * + * * @return the created resource. */ WorkspaceConnectionPropertiesV2BasicResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ WorkspaceConnectionPropertiesV2BasicResource create(Context context); } } + + /** + * Begins update for the WorkspaceConnectionPropertiesV2BasicResource resource. + * + * @return the stage of resource update. + */ + WorkspaceConnectionPropertiesV2BasicResource.Update update(); + + /** + * The template for WorkspaceConnectionPropertiesV2BasicResource update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + WorkspaceConnectionPropertiesV2BasicResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + WorkspaceConnectionPropertiesV2BasicResource apply(Context context); + } + + /** + * The WorkspaceConnectionPropertiesV2BasicResource update stages. + */ + interface UpdateStages { + /** + * The stage of the WorkspaceConnectionPropertiesV2BasicResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties that the machine learning workspace connection will be + * updated with.. + * + * @param properties The properties that the machine learning workspace connection will be updated with. + * @return the next definition stage. + */ + Update withProperties(WorkspaceConnectionPropertiesV2 properties); + } + } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ WorkspaceConnectionPropertiesV2BasicResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ WorkspaceConnectionPropertiesV2BasicResource refresh(Context context); + + /** + * List all the secrets of a machine learning workspaces connections. + * + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 listSecretsWithResponse(String aoaiModelsToDeploy, + Context context); + + /** + * List all the secrets of a machine learning workspaces connections. + * + * @throws com.azure.core.management.exception.ManagementException 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. + */ + WorkspaceConnectionPropertiesV2BasicResource listSecrets(); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @throws com.azure.core.management.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 testConnection(); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param body Workspace Connection 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. + */ + void testConnection(WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java index 96ab1a4a1025f..bf5e9fa90176c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java @@ -9,28 +9,52 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model. */ +/** + * The WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model. + */ @Fluent public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult { + /* + * The nextLink property. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + /* * The value property. */ @JsonProperty(value = "value") private List value; - /* - * The nextLink property. + /** + * Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult class. */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult class. */ public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() { } + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The nextLink property. + * + * @param nextLink the nextLink value to set. + * @return the WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult object itself. + */ + public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + /** * Get the value property: The value property. - * + * * @return the value value. */ public List value() { @@ -39,28 +63,19 @@ public List value() { /** * Set the value property: The value property. - * + * * @param value the value value to set. * @return the WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult object itself. */ - public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult withValue( - List value) { + public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult + withValue(List value) { this.value = value; return this; } - /** - * Get the nextLink property: The nextLink property. - * - * @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() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java new file mode 100644 index 0000000000000..6115c04cf49e4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.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; + +/** + * The WorkspaceConnectionServicePrincipal model. + */ +@Fluent +public final class WorkspaceConnectionServicePrincipal { + /* + * The clientId property. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The clientSecret property. + */ + @JsonProperty(value = "clientSecret") + private String clientSecret; + + /* + * The tenantId property. + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /** + * Creates an instance of WorkspaceConnectionServicePrincipal class. + */ + public WorkspaceConnectionServicePrincipal() { + } + + /** + * Get the clientId property: The clientId property. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The clientId property. + * + * @param clientId the clientId value to set. + * @return the WorkspaceConnectionServicePrincipal object itself. + */ + public WorkspaceConnectionServicePrincipal withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientSecret property: The clientSecret property. + * + * @return the clientSecret value. + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set the clientSecret property: The clientSecret property. + * + * @param clientSecret the clientSecret value to set. + * @return the WorkspaceConnectionServicePrincipal object itself. + */ + public WorkspaceConnectionServicePrincipal withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Get the tenantId property: The tenantId property. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenantId property. + * + * @param tenantId the tenantId value to set. + * @return the WorkspaceConnectionServicePrincipal object itself. + */ + public WorkspaceConnectionServicePrincipal withTenantId(String tenantId) { + this.tenantId = tenantId; + 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/WorkspaceConnectionSharedAccessSignature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java index 2bbccdb326645..7b60228571842 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The WorkspaceConnectionSharedAccessSignature model. */ +/** + * The WorkspaceConnectionSharedAccessSignature model. + */ @Fluent public final class WorkspaceConnectionSharedAccessSignature { /* @@ -16,13 +18,15 @@ public final class WorkspaceConnectionSharedAccessSignature { @JsonProperty(value = "sas") private String sas; - /** Creates an instance of WorkspaceConnectionSharedAccessSignature class. */ + /** + * Creates an instance of WorkspaceConnectionSharedAccessSignature class. + */ public WorkspaceConnectionSharedAccessSignature() { } /** * Get the sas property: The sas property. - * + * * @return the sas value. */ public String sas() { @@ -31,7 +35,7 @@ public String sas() { /** * Set the sas property: The sas property. - * + * * @param sas the sas value to set. * @return the WorkspaceConnectionSharedAccessSignature object itself. */ @@ -42,7 +46,7 @@ public WorkspaceConnectionSharedAccessSignature withSas(String sas) { /** * 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/WorkspaceConnectionUpdateParameter.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.java new file mode 100644 index 0000000000000..b54422a3376cd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The properties that the machine learning workspace connection will be updated with. + */ +@Fluent +public final class WorkspaceConnectionUpdateParameter { + /* + * The properties that the machine learning workspace connection will be updated with. + */ + @JsonProperty(value = "properties") + private WorkspaceConnectionPropertiesV2 properties; + + /** + * Creates an instance of WorkspaceConnectionUpdateParameter class. + */ + public WorkspaceConnectionUpdateParameter() { + } + + /** + * Get the properties property: The properties that the machine learning workspace connection will be updated with. + * + * @return the properties value. + */ + public WorkspaceConnectionPropertiesV2 properties() { + return this.properties; + } + + /** + * Set the properties property: The properties that the machine learning workspace connection will be updated with. + * + * @param properties the properties value to set. + * @return the WorkspaceConnectionUpdateParameter object itself. + */ + public WorkspaceConnectionUpdateParameter withProperties(WorkspaceConnectionPropertiesV2 properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java index 3f8e8255feba9..da208acd7e285 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java @@ -7,48 +7,38 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The WorkspaceConnectionUsernamePassword model. */ +/** + * The WorkspaceConnectionUsernamePassword model. + */ @Fluent public final class WorkspaceConnectionUsernamePassword { - /* - * The username property. - */ - @JsonProperty(value = "username") - private String username; - /* * The password property. */ @JsonProperty(value = "password") private String password; - /** Creates an instance of WorkspaceConnectionUsernamePassword class. */ - public WorkspaceConnectionUsernamePassword() { - } + /* + * Optional, required by connections like SalesForce for extra security in addition to UsernamePassword + */ + @JsonProperty(value = "securityToken") + private String securityToken; - /** - * Get the username property: The username property. - * - * @return the username value. + /* + * The username property. */ - public String username() { - return this.username; - } + @JsonProperty(value = "username") + private String username; /** - * Set the username property: The username property. - * - * @param username the username value to set. - * @return the WorkspaceConnectionUsernamePassword object itself. + * Creates an instance of WorkspaceConnectionUsernamePassword class. */ - public WorkspaceConnectionUsernamePassword withUsername(String username) { - this.username = username; - return this; + public WorkspaceConnectionUsernamePassword() { } /** * Get the password property: The password property. - * + * * @return the password value. */ public String password() { @@ -57,7 +47,7 @@ public String password() { /** * Set the password property: The password property. - * + * * @param password the password value to set. * @return the WorkspaceConnectionUsernamePassword object itself. */ @@ -66,9 +56,51 @@ public WorkspaceConnectionUsernamePassword withPassword(String password) { return this; } + /** + * Get the securityToken property: Optional, required by connections like SalesForce for extra security in addition + * to UsernamePassword. + * + * @return the securityToken value. + */ + public String securityToken() { + return this.securityToken; + } + + /** + * Set the securityToken property: Optional, required by connections like SalesForce for extra security in addition + * to UsernamePassword. + * + * @param securityToken the securityToken value to set. + * @return the WorkspaceConnectionUsernamePassword object itself. + */ + public WorkspaceConnectionUsernamePassword withSecurityToken(String securityToken) { + this.securityToken = securityToken; + return this; + } + + /** + * Get the username property: The username property. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The username property. + * + * @param username the username value to set. + * @return the WorkspaceConnectionUsernamePassword object itself. + */ + public WorkspaceConnectionUsernamePassword withUsername(String username) { + this.username = username; + 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/WorkspaceConnections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java index 2f00285075d10..6e89d11091b57 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java @@ -7,96 +7,159 @@ 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.WorkspaceConnectionPropertiesV2BasicResourceInner; -/** Resource collection API of WorkspaceConnections. */ +/** + * Resource collection API of WorkspaceConnections. + */ public interface WorkspaceConnections { /** - * The get operation. - * + * Lists all the available machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists all the available machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param target Target of the workspace connection. + * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String target, String category, Boolean includeAll, Context context); + + /** + * Delete machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, + Context context); + + /** + * Delete machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 connectionName); + + /** + * Lists machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); + Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String aoaiModelsToDeploy, Context context); /** - * The get operation. - * + * Lists machine learning workspaces connections by name. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - WorkspaceConnectionPropertiesV2BasicResource get( - String resourceGroupName, String workspaceName, String connectionName); + WorkspaceConnectionPropertiesV2BasicResource get(String resourceGroupName, String workspaceName, + String connectionName); /** - * The delete operation. - * + * List all the secrets of a machine learning workspaces connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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}. + * @return the response body along with {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); + Response listSecretsWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String aoaiModelsToDeploy, Context context); /** - * The delete operation. - * + * List all the secrets of a machine learning workspaces connections. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - void delete(String resourceGroupName, String workspaceName, String connectionName); + WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupName, String workspaceName, + String connectionName); /** - * The list operation. - * + * Test machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + void testConnection(String resourceGroupName, String workspaceName, String connectionName); /** - * The list operation. - * + * Test machine learning workspaces connections under the specified workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection 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 paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context); + void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); /** - * The get operation. - * + * Lists machine learning workspaces connections by name. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -106,20 +169,22 @@ PagedIterable list( WorkspaceConnectionPropertiesV2BasicResource getById(String id); /** - * The get operation. - * + * Lists machine learning workspaces connections by name. + * * @param id the resource ID. + * @param aoaiModelsToDeploy query parameter for which AOAI mode should be deployed. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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 getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, String aoaiModelsToDeploy, + Context context); /** - * The delete operation. - * + * Delete machine learning workspaces connections by name. + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -128,8 +193,8 @@ PagedIterable list( void deleteById(String id); /** - * The delete operation. - * + * Delete machine learning workspaces connections by name. + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -141,7 +206,7 @@ PagedIterable list( /** * Begins definition for a new WorkspaceConnectionPropertiesV2BasicResource resource. - * + * * @param name resource name. * @return the first stage of the new WorkspaceConnectionPropertiesV2BasicResource definition. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java index cbbbae1274d2c..3e150cf9c9655 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of WorkspaceFeatures. */ +/** + * Resource collection API of WorkspaceFeatures. + */ public interface WorkspaceFeatures { /** * Lists all enabled features for a 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. @@ -23,7 +25,7 @@ public interface WorkspaceFeatures { /** * Lists all enabled features for a 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java new file mode 100644 index 0000000000000..de63e4aff5b58 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * WorkspaceHub's configuration object. + */ +@Fluent +public final class WorkspaceHubConfig { + /* + * The additionalWorkspaceStorageAccounts property. + */ + @JsonProperty(value = "additionalWorkspaceStorageAccounts") + private List additionalWorkspaceStorageAccounts; + + /* + * The defaultWorkspaceResourceGroup property. + */ + @JsonProperty(value = "defaultWorkspaceResourceGroup") + private String defaultWorkspaceResourceGroup; + + /** + * Creates an instance of WorkspaceHubConfig class. + */ + public WorkspaceHubConfig() { + } + + /** + * Get the additionalWorkspaceStorageAccounts property: The additionalWorkspaceStorageAccounts property. + * + * @return the additionalWorkspaceStorageAccounts value. + */ + public List additionalWorkspaceStorageAccounts() { + return this.additionalWorkspaceStorageAccounts; + } + + /** + * Set the additionalWorkspaceStorageAccounts property: The additionalWorkspaceStorageAccounts property. + * + * @param additionalWorkspaceStorageAccounts the additionalWorkspaceStorageAccounts value to set. + * @return the WorkspaceHubConfig object itself. + */ + public WorkspaceHubConfig withAdditionalWorkspaceStorageAccounts(List additionalWorkspaceStorageAccounts) { + this.additionalWorkspaceStorageAccounts = additionalWorkspaceStorageAccounts; + return this; + } + + /** + * Get the defaultWorkspaceResourceGroup property: The defaultWorkspaceResourceGroup property. + * + * @return the defaultWorkspaceResourceGroup value. + */ + public String defaultWorkspaceResourceGroup() { + return this.defaultWorkspaceResourceGroup; + } + + /** + * Set the defaultWorkspaceResourceGroup property: The defaultWorkspaceResourceGroup property. + * + * @param defaultWorkspaceResourceGroup the defaultWorkspaceResourceGroup value to set. + * @return the WorkspaceHubConfig object itself. + */ + public WorkspaceHubConfig withDefaultWorkspaceResourceGroup(String defaultWorkspaceResourceGroup) { + this.defaultWorkspaceResourceGroup = defaultWorkspaceResourceGroup; + 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/WorkspaceListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java index 074c218cf7c56..51e9274db3f29 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java @@ -9,9 +9,17 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The result of a request to list machine learning workspaces. */ +/** + * The result of a request to list machine learning workspaces. + */ @Fluent public final class WorkspaceListResult { + /* + * 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. @@ -19,61 +27,59 @@ public final class WorkspaceListResult { @JsonProperty(value = "value") private List value; - /* - * The URI that can be used to request the next list of machine learning workspaces. + /** + * Creates an instance of WorkspaceListResult class. */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** Creates an instance of WorkspaceListResult class. */ public WorkspaceListResult() { } /** - * 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. + * 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 List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * 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. + * 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 WorkspaceListResult object itself. */ - public WorkspaceListResult withValue(List value) { - this.value = value; + public WorkspaceListResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The URI that can be used to request the next list of machine learning workspaces. - * - * @return the nextLink value. + * 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 String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The URI that can be used to request the next list of machine learning workspaces. - * - * @param nextLink the nextLink value to set. + * 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 WorkspaceListResult object itself. */ - public WorkspaceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public WorkspaceListResult withValue(List 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/WorkspacePrivateEndpointResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java new file mode 100644 index 0000000000000..6b0f5cb9d7b6c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.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.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Private Endpoint resource. + */ +@Immutable +public final class WorkspacePrivateEndpointResource { + /* + * e.g. + * /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{ + * privateEndpointName} + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * The subnetId that the private endpoint is connected to. + */ + @JsonProperty(value = "subnetArmId", access = JsonProperty.Access.WRITE_ONLY) + private String subnetArmId; + + /** + * Creates an instance of WorkspacePrivateEndpointResource class. + */ + public WorkspacePrivateEndpointResource() { + } + + /** + * Get the id property: e.g. + * /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the subnetArmId property: The subnetId that the private endpoint is connected to. + * + * @return the subnetArmId value. + */ + public String subnetArmId() { + return this.subnetArmId; + } + + /** + * 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/WorkspaceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java index 41e6d8c3f5a00..20db1c980a2dc 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 @@ -7,197 +7,306 @@ import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner; import java.util.List; -/** An immutable client-side representation of WorkspaceProperties. */ +/** + * An immutable client-side representation of WorkspaceProperties. + */ public interface WorkspaceProperties { /** - * Gets the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. - */ - String workspaceId(); - - /** - * Gets the description property: The description of this workspace. - * - * @return the description value. + * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. + * + * @return the allowPublicAccessWhenBehindVnet value. */ - String description(); + Boolean allowPublicAccessWhenBehindVnet(); /** - * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. */ - String friendlyName(); + String applicationInsights(); /** - * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. + * Gets the associatedWorkspaces property: The associatedWorkspaces property. + * + * @return the associatedWorkspaces value. */ - String keyVault(); + List associatedWorkspaces(); /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. + * Gets the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. */ - String applicationInsights(); + List containerRegistries(); /** * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. - * + * * @return the containerRegistry value. */ String containerRegistry(); /** - * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. + * Gets the description property: The description of this workspace. + * + * @return the description value. */ - String storageAccount(); + String description(); /** * Gets the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning * experimentation services. - * + * * @return the discoveryUrl value. */ String discoveryUrl(); /** - * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. + * Gets the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. */ - ProvisioningState provisioningState(); + Boolean enableDataIsolation(); /** - * Gets the encryption property: The encryption settings of Azure ML workspace. - * + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + Boolean enableSoftwareBillOfMaterials(); + + /** + * Gets the encryption property: The encryption property. + * * @return the encryption value. */ EncryptionProperty encryption(); + /** + * Gets the existingWorkspaces property: The existingWorkspaces property. + * + * @return the existingWorkspaces value. + */ + List existingWorkspaces(); + + /** + * Gets the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + FeatureStoreSettings featureStoreSettings(); + + /** + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @return the friendlyName value. + */ + String friendlyName(); + /** * Gets the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected * by the service. - * + * * @return the hbiWorkspace value. */ Boolean hbiWorkspace(); /** - * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. - */ - String serviceProvisionedResourceGroup(); - - /** - * Gets the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. + * Gets the hubResourceId property: The hubResourceId property. + * + * @return the hubResourceId value. */ - Integer privateLinkCount(); + String hubResourceId(); /** * Gets the imageBuildCompute property: The compute name for image build. - * + * * @return the imageBuildCompute value. */ String imageBuildCompute(); /** - * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when - * behind VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. */ - Boolean allowPublicAccessWhenBehindVnet(); + List ipAllowlist(); /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. + * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. + * + * @return the keyVault value. */ - PublicNetworkAccess publicNetworkAccess(); + String keyVault(); /** - * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. + * Gets the keyVaults property: The keyVaults property. + * + * @return the keyVaults value. */ - List privateEndpointConnections(); + List keyVaults(); /** - * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. + * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. */ - List sharedPrivateLinkResources(); + ManagedNetworkSettings managedNetwork(); + + /** + * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. + * + * @return the mlFlowTrackingUri value. + */ + String mlFlowTrackingUri(); /** * Gets the notebookInfo property: The notebook info of Azure ML workspace. - * + * * @return the notebookInfo value. */ NotebookResourceInfo notebookInfo(); + /** + * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @return the primaryUserAssignedIdentity value. + */ + String primaryUserAssignedIdentity(); + + /** + * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + + /** + * Gets the privateLinkCount property: Count of private connections in the workspace. + * + * @return the privateLinkCount value. + */ + Integer privateLinkCount(); + + /** + * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + PublicNetworkAccessType publicNetworkAccess(); + + /** + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. + */ + ServerlessComputeSettings serverlessComputeSettings(); + /** * Gets the serviceManagedResourcesSettings property: The service managed resource settings. - * + * * @return the serviceManagedResourcesSettings value. */ ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. + * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP + * in customer subscription if the workspace is CMK workspace. + * + * @return the serviceProvisionedResourceGroup value. */ - String primaryUserAssignedIdentity(); + String serviceProvisionedResourceGroup(); /** - * Gets the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. + * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * + * @return the sharedPrivateLinkResources value. */ - String tenantId(); + List sharedPrivateLinkResources(); + + /** + * Gets the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + Integer softDeleteRetentionInDays(); + + /** + * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @return the storageAccount value. + */ + String storageAccount(); + + /** + * Gets the storageAccounts property: The storageAccounts property. + * + * @return the storageAccounts value. + */ + List storageAccounts(); /** * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) * enabled. - * + * * @return the storageHnsEnabled value. */ Boolean storageHnsEnabled(); /** - * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. - * - * @return the mlFlowTrackingUri value. + * Gets the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. */ - String mlFlowTrackingUri(); + String systemDatastoresAuthMode(); + + /** + * Gets the tenantId property: The tenant id associated with this workspace. + * + * @return the tenantId value. + */ + String tenantId(); /** * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 * API. - * + * * @return the v1LegacyMode value. */ Boolean v1LegacyMode(); + /** + * Gets the workspaceHubConfig property: WorkspaceHub's configuration object. + * + * @return the workspaceHubConfig value. + */ + WorkspaceHubConfig workspaceHubConfig(); + + /** + * Gets the workspaceId property: The immutable id associated with this workspace. + * + * @return the workspaceId value. + */ + String workspaceId(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner object. - * + * * @return the inner object. */ WorkspacePropertiesInner innerModel(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java new file mode 100644 index 0000000000000..975a35c5f62cd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.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.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner; +import java.util.List; + +/** + * An immutable client-side representation of WorkspacePropertiesUpdateParameters. + */ +public interface WorkspacePropertiesUpdateParameters { + /** + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. + */ + String applicationInsights(); + + /** + * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @return the containerRegistry value. + */ + String containerRegistry(); + + /** + * Gets the description property: The description of this workspace. + * + * @return the description value. + */ + String description(); + + /** + * Gets the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. + */ + Boolean enableDataIsolation(); + + /** + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + Boolean enableSoftwareBillOfMaterials(); + + /** + * Gets the encryption property: The encryption property. + * + * @return the encryption value. + */ + EncryptionUpdateProperties encryption(); + + /** + * Gets the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + FeatureStoreSettings featureStoreSettings(); + + /** + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @return the friendlyName value. + */ + String friendlyName(); + + /** + * Gets the imageBuildCompute property: The compute name for image build. + * + * @return the imageBuildCompute value. + */ + String imageBuildCompute(); + + /** + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. + */ + List ipAllowlist(); + + /** + * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. + */ + ManagedNetworkSettings managedNetwork(); + + /** + * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @return the primaryUserAssignedIdentity value. + */ + String primaryUserAssignedIdentity(); + + /** + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + PublicNetworkAccessType publicNetworkAccess(); + + /** + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. + */ + ServerlessComputeSettings serverlessComputeSettings(); + + /** + * Gets the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @return the serviceManagedResourcesSettings value. + */ + ServiceManagedResourcesSettings serviceManagedResourcesSettings(); + + /** + * Gets the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + Integer softDeleteRetentionInDays(); + + /** + * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + Boolean v1LegacyMode(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner + * object. + * + * @return the inner object. + */ + WorkspacePropertiesUpdateParametersInner innerModel(); +} 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..c9175c18dd11e 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 @@ -4,314 +4,162 @@ package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParameters; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; +import java.util.List; import java.util.Map; -/** The parameters for updating a machine learning workspace. */ -@Fluent -public final class WorkspaceUpdateParameters { - /* - * The resource tags for the machine learning workspace. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * The properties that the machine learning workspace will be updated with. - */ - @JsonProperty(value = "properties") - private WorkspacePropertiesUpdateParameters innerProperties; - - /** Creates an instance of WorkspaceUpdateParameters class. */ - public WorkspaceUpdateParameters() { - } - +/** + * An immutable client-side representation of WorkspaceUpdateParameters. + */ +public interface WorkspaceUpdateParameters { /** - * Get the tags property: The resource tags for the machine learning workspace. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The resource tags for the machine learning workspace. - * - * @param tags the tags value to set. - * @return the WorkspaceUpdateParameters object itself. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. */ - public WorkspaceUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } + ManagedServiceIdentity identity(); /** - * Get the sku property: The sku of the workspace. - * + * Gets the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. + * * @return the sku value. */ - public Sku sku() { - return this.sku; - } + Sku sku(); /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. + * Gets the tags property: The resource tags for the machine learning workspace. + * + * @return the tags value. */ - public ManagedServiceIdentity identity() { - return this.identity; - } + Map tags(); /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the WorkspaceUpdateParameters object itself. + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. */ - public WorkspaceUpdateParameters withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } + String applicationInsights(); /** - * Get the innerProperties property: The properties that the machine learning workspace will be updated with. - * - * @return the innerProperties value. + * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @return the containerRegistry value. */ - private WorkspacePropertiesUpdateParameters innerProperties() { - return this.innerProperties; - } + String containerRegistry(); /** - * Get the description property: The description of this workspace. - * + * Gets the description property: The description of this workspace. + * * @return the description value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } + String description(); /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspaceUpdateParameters object itself. + * Gets the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. */ - public WorkspaceUpdateParameters withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withDescription(description); - return this; - } + Boolean enableDataIsolation(); /** - * Get the friendlyName property: The friendly name for this workspace. - * - * @return the friendlyName value. + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterial should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } + Boolean enableSoftwareBillOfMaterials(); /** - * Set the friendlyName property: The friendly name for this workspace. - * - * @param friendlyName the friendlyName value to set. - * @return the WorkspaceUpdateParameters object itself. + * Gets the encryption property: The encryption property. + * + * @return the encryption value. */ - public WorkspaceUpdateParameters withFriendlyName(String friendlyName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withFriendlyName(friendlyName); - return this; - } + EncryptionUpdateProperties encryption(); /** - * Get the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. + * Gets the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. */ - public String imageBuildCompute() { - return this.innerProperties() == null ? null : this.innerProperties().imageBuildCompute(); - } + FeatureStoreSettings featureStoreSettings(); /** - * Set the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspaceUpdateParameters object itself. + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @return the friendlyName value. */ - public WorkspaceUpdateParameters withImageBuildCompute(String imageBuildCompute) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withImageBuildCompute(imageBuildCompute); - return this; - } + String friendlyName(); /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. + * Gets the imageBuildCompute property: The compute name for image build. + * + * @return the imageBuildCompute value. */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); - } + String imageBuildCompute(); /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspaceUpdateParameters object itself. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. */ - public WorkspaceUpdateParameters withServiceManagedResourcesSettings( - ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); - return this; - } + List ipAllowlist(); /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. + * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. */ - public String primaryUserAssignedIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); - } + ManagedNetworkSettings managedNetwork(); /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspaceUpdateParameters object itself. + * + * @return the primaryUserAssignedIdentity value. */ - public WorkspaceUpdateParameters withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); - return this; - } + String primaryUserAssignedIdentity(); /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. - * + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * * @return the publicNetworkAccess value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } + PublicNetworkAccessType publicNetworkAccess(); /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. */ - public String applicationInsights() { - return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); - } + ServerlessComputeSettings serverlessComputeSettings(); /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @param applicationInsights the applicationInsights value to set. - * @return the WorkspaceUpdateParameters object itself. + * Gets the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @return the serviceManagedResourcesSettings value. */ - public WorkspaceUpdateParameters withApplicationInsights(String applicationInsights) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withApplicationInsights(applicationInsights); - return this; - } + ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. + * Gets the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. */ - public String containerRegistry() { - return this.innerProperties() == null ? null : this.innerProperties().containerRegistry(); - } + Integer softDeleteRetentionInDays(); /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @param containerRegistry the containerRegistry value to set. - * @return the WorkspaceUpdateParameters object itself. + * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. */ - public WorkspaceUpdateParameters withContainerRegistry(String containerRegistry) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withContainerRegistry(containerRegistry); - return this; - } + Boolean v1LegacyMode(); /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner object. + * + * @return the inner object. */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } + WorkspaceUpdateParametersInner innerModel(); } 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..841a263569c87 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 @@ -8,87 +8,118 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Workspaces. */ +/** + * Resource collection API of Workspaces. + */ public interface Workspaces { /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * Lists all the available machine learning workspaces under the specified 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 the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); + PagedIterable list(String kind, String skip, String aiCapabilities, Context context); /** - * Gets the properties of the specified machine learning workspace. - * + * Lists all the available machine learning workspaces under the specified resource group. + * * @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 properties of the specified machine learning workspace. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. */ - Workspace getByResourceGroup(String resourceGroupName, String workspaceName); + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the available machine learning workspaces under the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list machine learning workspaces as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, String kind, String skip, + String aiCapabilities, Context 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 workspaceName Azure Machine Learning Workspace 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 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 workspaceName Azure Machine Learning Workspace Name. + * @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. - * + * Gets the properties of the specified machine learning workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return the properties of the specified machine learning workspace along with {@link Response}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); /** - * Lists all the available machine learning workspaces under the specified resource group. - * + * Gets the properties of the specified machine learning workspace. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return the properties of the specified machine learning workspace. */ - PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); + Workspace getByResourceGroup(String resourceGroupName, String workspaceName); /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -98,40 +129,40 @@ public interface Workspaces { /** * Diagnose workspace setup issue. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - DiagnoseResponseResult diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context); + DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body, + Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); + Response listKeysWithResponse(String resourceGroupName, String workspaceName, + Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -140,185 +171,162 @@ Response listKeysWithResponse( ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @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. - */ - void resyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * + * Get Azure Machine Learning Workspace notebook access token. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 azure Machine Learning Workspace notebook access token along with {@link Response}. */ - void resyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the available machine learning workspaces under the specified 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 the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. - */ - PagedIterable list(); + Response listNotebookAccessTokenWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * Get Azure Machine Learning Workspace notebook access token. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. + * @return azure Machine Learning Workspace notebook access token. */ - PagedIterable list(String skip, Context context); + NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName); /** - * return notebook access token and refresh token. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ - Response listNotebookAccessTokenWithResponse( - String resourceGroupName, String workspaceName, Context context); + Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, + Context context); /** - * return notebook access token and refresh token. - * + * Lists keys of Azure Machine Learning Workspaces notebook. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ - NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName); + ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName); /** - * Prepare a notebook. - * + * Lists keys of Azure Machine Learning Workspace's storage account. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. + * @return the response body along with {@link Response}. */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName); + Response listStorageAccountKeysWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * Prepare a notebook. - * + * Lists keys of Azure Machine Learning Workspace's storage account. + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context); + ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName); /** - * List storage account keys of a workspace. - * + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ - Response listStorageAccountKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); + Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * List storage account keys of a workspace. - * + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ - ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName); + ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); /** - * List keys of a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. + * @return the response. */ - Response listNotebookKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); + NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName); /** - * List keys of a notebook. - * + * Prepare Azure Machine Learning Workspace's notebook resource. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ - ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName); + NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context); /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @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. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ - Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context); + void resyncKeys(String resourceGroupName, String workspaceName); /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ - ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); + void resyncKeys(String resourceGroupName, String workspaceName, Context context); /** * Gets the properties of the specified 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. @@ -329,7 +337,7 @@ Response listOutboundNetworkDependenciesEndpointsWithRespo /** * Gets the properties of the specified 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. @@ -341,7 +349,7 @@ Response listOutboundNetworkDependenciesEndpointsWithRespo /** * Deletes 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. @@ -351,18 +359,19 @@ 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. - * + * * @param name resource name. * @return the first stage of the new Workspace definition. */ 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..6818156717e73 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 - * Machine Learning Workspace resources. + * 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..952b21346248a 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 - * Machine Learning Workspace resources. + * 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/main/java/module-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java index dd9aa25ecf834..b7b3738226fc3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java @@ -10,10 +10,6 @@ exports com.azure.resourcemanager.machinelearning.fluent.models; exports com.azure.resourcemanager.machinelearning.models; - opens com.azure.resourcemanager.machinelearning.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.machinelearning.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.machinelearning.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.machinelearning.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json new file mode 100644 index 0000000000000..a41f5140b2d34 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.machinelearning.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesClientImpl$VirtualMachineSizesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.QuotasClientImpl$QuotasService" ], [ "com.azure.resourcemanager.machinelearning.implementation.ComputesClientImpl$ComputesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.CapacityReservationGroupsClientImpl$CapacityReservationGroupsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryCodeContainersClientImpl$RegistryCodeContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryCodeVersionsClientImpl$RegistryCodeVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryComponentContainersClientImpl$RegistryComponentContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryComponentVersionsClientImpl$RegistryComponentVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryDataContainersClientImpl$RegistryDataContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryDataVersionsClientImpl$RegistryDataVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryDataReferencesClientImpl$RegistryDataReferencesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentContainersClientImpl$RegistryEnvironmentContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentVersionsClientImpl$RegistryEnvironmentVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.MarketplaceSubscriptionsClientImpl$MarketplaceSubscriptionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryModelContainersClientImpl$RegistryModelContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistryModelVersionsClientImpl$RegistryModelVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsClientImpl$BatchEndpointsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsClientImpl$BatchDeploymentsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.CodeContainersClientImpl$CodeContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.CodeVersionsClientImpl$CodeVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.ComponentContainersClientImpl$ComponentContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.ComponentVersionsClientImpl$ComponentVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.DataContainersClientImpl$DataContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.DataVersionsClientImpl$DataVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.DatastoresClientImpl$DatastoresService" ], [ "com.azure.resourcemanager.machinelearning.implementation.EnvironmentContainersClientImpl$EnvironmentContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.EnvironmentVersionsClientImpl$EnvironmentVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.FeaturesetContainersClientImpl$FeaturesetContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.FeaturesClientImpl$FeaturesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.FeaturesetVersionsClientImpl$FeaturesetVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityContainersClientImpl$FeaturestoreEntityContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityVersionsClientImpl$FeaturestoreEntityVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.InferencePoolsClientImpl$InferencePoolsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.InferenceEndpointsClientImpl$InferenceEndpointsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.InferenceGroupsClientImpl$InferenceGroupsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.JobsClientImpl$JobsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.LabelingJobsClientImpl$LabelingJobsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.ModelContainersClientImpl$ModelContainersService" ], [ "com.azure.resourcemanager.machinelearning.implementation.ModelVersionsClientImpl$ModelVersionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.OnlineEndpointsClientImpl$OnlineEndpointsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsClientImpl$OnlineDeploymentsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.SchedulesClientImpl$SchedulesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.ServerlessEndpointsClientImpl$ServerlessEndpointsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.RegistriesClientImpl$RegistriesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.WorkspaceFeaturesClientImpl$WorkspaceFeaturesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.WorkspacesClientImpl$WorkspacesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.WorkspaceConnectionsClientImpl$WorkspaceConnectionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.EndpointDeploymentsClientImpl$EndpointDeploymentsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.EndpointsClientImpl$EndpointsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesClientImpl$ManagedNetworkSettingsRulesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService" ], [ "com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsClientImpl$ManagedNetworkProvisionsService" ] ] \ No newline at end of file diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/reflect-config.json b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/reflect-config.json new file mode 100644 index 0000000000000..c6492247dc8b3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/reflect-config.json @@ -0,0 +1,4331 @@ +[ { + "name" : "com.azure.resourcemanager.machinelearning.models.ListUsagesResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.UsageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UsageName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VirtualMachineSize", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ListWorkspaceQuotas", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ResourceName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PaginatedComputeResourcesList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Sku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeResourceSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Compute", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScaleSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomService", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Image", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EnvironmentVariable", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Docker", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Endpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VolumeDefinition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BindOptions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VolumeOptions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TmpfsOptions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JupyterKernelConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AmlComputeNodesInformation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ResizeSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CapacityReservationGroupTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.CapacityReservationGroupInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CapacityReservationGroupProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServerlessOffer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CodeContainerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AssetContainer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ResourceBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CodeVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AssetBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoDeleteSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BlobReferenceForConsumptionDto", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PendingUploadCredentialDto", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataContainerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.IntellectualProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.GetBlobReferenceForConsumptionDto", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataReferenceCredential", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BuildContext", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Route", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MarketplacePlan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelContainerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FlavorData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PackageRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BaseEnvironmentSource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InferencingServer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelPackageInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PackageInputPathBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.PackageResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchEndpointTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchDeploymentTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchDeploymentConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AssetReferenceBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DeploymentResourceConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ResourceConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchRetrySettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointDeploymentPropertiesBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CodeConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DestinationAsset", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatastoreResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatastoreProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatastoreCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturesetContainerResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturesetVersionResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MaterializationSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NotificationSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Webhook", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TriggerBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureWindow", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.IndexColumn", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InferencePoolTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InferencePoolProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PoolEnvironmentConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ProbeSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PoolModelConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RequestConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PropertiesBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.PoolStatusInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SkuCapacity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SkuSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InferenceEndpointTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InferenceGroupTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobBaseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.IdentityConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SecretConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobService", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Nodes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialJobBasePartialResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialJobBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialNotificationSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LabelingJobResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LabelingDataConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LabelingJobInstructions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LabelCategory", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LabelClass", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LabelingJobMediaProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLAssistConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ProgressMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.StatusMessage", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ExportSummaryInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OnlineEndpointTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OnlineDeploymentTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataCollector", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Collection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RequestLogging", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OnlineScaleSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleActionBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TriggerOnceRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.TriggerRunSubmissionDtoInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServerlessEndpointTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServerlessEndpointCapacityReservation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointStatusInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegistryTrackedResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.RegistryProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ArmResourceId", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.RegistryPrivateEndpointConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PrivateEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AcrDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.StorageAccountDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ListAmlUserFeatureResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EncryptionProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.IdentityForCmk", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KeyVaultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeRuntimeDto", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OutboundRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NotebookPreparationError", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CosmosDbSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DiagnoseRequestProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResultValue", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DiagnoseResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointResourcePropertiesBasicResourceArmPaginatedResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointModels", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.AccountModelInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DeploymentModel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CallRateLimit", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ThrottlingRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RequestMatchPattern", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CapacityConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelDeprecationInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegistryListCredentialsResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Password", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FqdnEndpoints", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FqdnEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OutboundRuleListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ResourceId", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Aks", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AksSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AksSchemaProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SystemService", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SslConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AksNetworkingConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Kubernetes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KubernetesSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KubernetesProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AmlComputeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VirtualMachineImage", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UserAccountCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NodeStateCounts", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AmlCompute", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AmlComputeSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageMetadata", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OsPatchingStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceConnectivityEndpoints", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceApplication", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceCreatedBy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AssignedUser", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SetupScripts", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScriptsToExecute", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScriptReference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceLastOperation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeSchedules", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Recurrence", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Cron", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceContainer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataDisk", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceVersion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstance", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VirtualMachine", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VirtualMachineSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VirtualMachineSchemaProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VirtualMachineSshCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.HDInsightProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.HDInsight", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.HDInsightSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataFactory", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatabricksProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Databricks", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatabricksSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataLakeAnalytics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SynapseSpark", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SynapseSparkProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoScaleProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoPauseProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AksComputeSecretsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AksComputeSecrets", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VirtualMachineSecrets", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VirtualMachineSecretsSchema", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatabricksComputeSecretsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatabricksComputeSecrets", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AllFeatures", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AllNodes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AmlToken", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AmlTokenComputeIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AnonymousAccessCredential", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AssetJobInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AssetJobOutput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoForecastHorizon", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ForecastHorizon", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoMLJob", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobOutput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.QueueSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoMLVertical", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLTableJobInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoNCrossValidations", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NCrossValidations", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoSeasonality", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Seasonality", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoTargetLags", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TargetLags", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoTargetRollingWindowSize", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutologgerSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureDatastore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureDevOpsWebhook", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureFileDatastore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureMLBatchInferencingServer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureMLOnlineInferencingServer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureOpenAiFineTuning", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AzureOpenAiHyperParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FineTuningVertical", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BanditPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BaseEnvironmentId", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchPipelineComponentDeploymentConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.IdAssetReference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BayesianSamplingAlgorithm", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SamplingAlgorithm", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataDriftMetricThresholdBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataQualityMetricThresholdBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PredictionDriftMetricThresholdBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CertificateDatastoreCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CertificateDatastoreSecrets", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Classification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TrainingSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TableVertical", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ColumnTransformer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturizationSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TableFixedParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TableParameterSubspace", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TableSweepSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ClassificationModelPerformanceMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelPerformanceMetricThresholdBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CocoExportSummary", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CommandJob", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DistributionConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CommandJobLimits", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobLimits", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComponentConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CreateMonitorAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitorDefinition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringTarget", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CronTrigger", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CsvExportSummary", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomForecastHorizon", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomInferencingServer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OnlineInferenceConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomModelFineTuning", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomModelJobInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomModelJobOutput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomMonitoringSignal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringWorkspaceConnection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomNCrossValidations", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomSeasonality", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomTargetLags", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomTargetRollingWindowSize", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataDriftMonitoringSignal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringDataSegment", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataImport", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataImportSource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataPathAssetReference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataQualityMonitoringSignal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatabaseSource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatasetExportSummary", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DockerCredential", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointScheduleAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureAttributionDriftMonitoringSignal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureSubset", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FileSystemSource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FineTuningJob", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FixedInputData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Forecasting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ForecastingSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.GenerationSafetyQualityMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.GenerationSafetyQualityMonitoringSignal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.GenerationTokenUsageMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.GenerationTokenUsageSignal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.HdfsDatastore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageClassification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageClassificationBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageModelSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageVertical", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageLimitSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageSweepSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageClassificationMultilabel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageInstanceSegmentation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageObjectDetectionBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageObjectDetection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImportDataAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobScheduleAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KerberosCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KerberosKeytabCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KerberosKeytabSecrets", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KerberosPasswordCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KerberosPasswordSecrets", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KubernetesOnlineDeployment", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LabelingJobImageProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LabelingJobTextProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LakeHouseArtifact", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OneLakeArtifact", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LiteralJobInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLAssistConfigurationDisabled", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLAssistConfigurationEnabled", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLTableData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLTableJobOutput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedComputeIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedIdentityCredential", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedOnlineDeployment", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelPerformanceSignal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitorServerlessSparkCompute", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Mpi", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NlpFixedParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NlpParameterSubspace", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NlpSweepSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NlpVertical", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NoneDatastoreCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Objective", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OneLakeDatastore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OutputPathAssetReference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PackageInputPathId", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PackageInputPathUrl", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PackageInputPathVersion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PipelineJob", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PredictionDriftMonitoringSignal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PyTorch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithm", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Ray", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Regression", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegressionModelPerformanceMetricThreshold", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RollingInputData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SasCredential", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SasCredentialDto", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SasDatastoreCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SasDatastoreSecrets", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SparkJob", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SparkJobEntry", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SparkResourceConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SparkJobPythonEntry", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SparkJobScalaEntry", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.StaticInputData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SweepJob", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SweepJobLimits", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TrialComponent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TargetUtilizationScaleSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TensorFlow", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TextClassification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TextClassificationMultilabel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TextNer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TopNFeaturesByAttribution", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TritonInferencingServer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TritonModelJobInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TritonModelJobOutput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TruncationSelectionPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UriFileDataVersion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UriFileJobInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UriFileJobOutput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UriFolderDataVersion", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UriFolderJobInput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UriFolderJobOutput", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UserIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AadAuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AccessKeyAuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccessKey", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AccountKeyAuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionSharedAccessSignature", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ApiKeyAuthWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionApiKey", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CognitiveServiceEndpointDeploymentResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CognitiveServicesSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointDeploymentResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomKeys", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CustomKeysWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedIdentityAuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionManagedIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointDeploymentResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OAuth2AuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionOAuth2", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OpenAIEndpointResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PatAuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPersonalAccessToken", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PrivateEndpointDestination", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PrivateEndpointOutboundRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SasAuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServicePrincipalAuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionServicePrincipal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServiceTagDestination", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServiceTagOutboundRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SpeechEndpointDeploymentResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SpeechEndpointResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UsernamePasswordAuthTypeWorkspaceConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUsernamePassword", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UsageUnit", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BillingCurrency", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UnitOfMeasure", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VMPriceOSType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VMTier", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.QuotaUnit", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Status", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Protocol", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NodeState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SourceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MountAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MountMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MountState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AssetProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoDeleteCondition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PendingUploadType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PendingUploadCredentialType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ListViewType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ProtectionLevel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataReferenceCredentialType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EnvironmentType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OperatingSystemType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BaseEnvironmentSourceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InferencingServerType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PackageInputType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PackageInputDeliveryMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InputPathType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PackageBuildState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointAuthMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchDeploymentConfigurationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ReferenceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BatchOutputAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DeploymentProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CredentialsType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DatastoreType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SecretsType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureDataType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WebhookType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.WeekDay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TriggerType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MaterializationStoreType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OrderString", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PoolProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SkuScaleType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AuthMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.IdentityConfigurationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NodesValueType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.IncrementalDataRefresh", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MultiSelect", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MediaType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLAssistConfigurationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.StatusMessageLevel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ExportFormatType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointComputeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataCollectionMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RollingRateType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EgressPublicNetworkAccessType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScaleType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ContainerType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.KeyType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleListViewType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServerlessEndpointState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EncryptionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.IsolationMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RuleCategory", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RuleStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RuleType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ConnectionAuthType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ConnectionCategory", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ConnectionGroup", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EndpointType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DefaultResourceProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DiagnoseResultLevel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServiceAccountKeyName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ClusterPurpose", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SslConfigStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LoadBalancerType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OsType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.VmPriority", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RemoteLoginPortPublicAccess", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.AllocationState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MlflowAutologger", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SshPublicAccess", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.PatchStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OperationName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OperationStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OperationTrigger", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ProvisioningStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputePowerAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeTriggerType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceFrequency", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ComputeWeekDay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Autosave", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Network", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Caching", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.StorageAccountType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InputDeliveryMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ForecastHorizonMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobOutputType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobTier", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LogVerbosity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TaskType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobInputType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NCrossValidationsMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SeasonalityMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TargetLagsMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSizeMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MLFlowAutologgerState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ServiceDataAccessAuthIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelProvider", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FineTuningTaskType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicyType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ClassificationModels", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TrainingMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.BlockedTransformers", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeaturizationMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ClassificationModelPerformanceMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringModelType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DistributionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.JobLimitsType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitorComputeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelTaskType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringSignalType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.MonitoringInputDataType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DataImportSourceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.FeatureLags", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.UseStl", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ForecastingPrimaryMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ForecastingModels", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.GenerationSafetyQualityMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.GenerationTokenUsageMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LearningRateScheduler", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.StochasticOptimizer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ClassificationMultilabelPrimaryMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.InstanceSegmentationPrimaryMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LogTrainingMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.LogValidationLoss", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ModelSize", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ValidationMetricType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ObjectDetectionPrimaryMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.ImageAnnotationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.TextAnnotationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.OneLakeArtifactType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NlpLearningRateScheduler", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.Goal", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithmRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegressionPrimaryMetrics", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegressionModels", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RegressionModelPerformanceMetric", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SparkJobEntryType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.RuleAction", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.machinelearning.models.SkuTier", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file 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..b785e4096e27b 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 @@ -23,69 +23,47 @@ import java.util.HashMap; import java.util.Map; -/** Samples for BatchDeployments CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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() - .define("testDeploymentName") - .withRegion("string") + manager.batchDeployments().define("testDeploymentName").withRegion("string") .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties( - new BatchDeploymentProperties() - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) - .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withCompute("string") - .withErrorThreshold(1) - .withLoggingLevel(BatchLoggingLevel.INFO) - .withMaxConcurrencyPerInstance(1) - .withMiniBatchSize(1L) - .withModel(new IdAssetReference().withAssetId("string")) - .withOutputAction(BatchOutputAction.SUMMARY_ONLY) - .withOutputFileName("string") - .withResources( - new DeploymentResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", - Object.class, - SerializerEncoding.JSON)))) - .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) + .withProperties(new BatchDeploymentProperties() + .withCodeConfiguration( + new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string").withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")).withProperties(mapOf("string", "string")) + .withCompute("string").withErrorThreshold(1).withLoggingLevel(BatchLoggingLevel.INFO) + .withMaxConcurrencyPerInstance(1).withMiniBatchSize(1L) + .withModel(new IdAssetReference().withAssetId("string")) + .withOutputAction(BatchOutputAction.SUMMARY_ONLY).withOutputFileName("string") + .withResources(new DeploymentResourceConfiguration().withInstanceCount(1).withInstanceType("string") + .withProperties(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", Object.class, SerializerEncoding.JSON)))) + .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) .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)) + .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<>(); 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..a504721361f73 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 @@ -4,24 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for BatchDeployments Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .batchDeployments() - .delete( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE); + public static void + deleteWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.batchDeployments().delete("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", + com.azure.core.util.Context.NONE); } } 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..f4c90d500c837 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 @@ -4,24 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for BatchDeployments Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .batchDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE); + public static void + getWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.batchDeployments().getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", + "testDeploymentName", com.azure.core.util.Context.NONE); } } 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..9222eb0bf0ca1 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for BatchDeployments List. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .batchDeployments() - .list( - "test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, com.azure.core.util.Context.NONE); + public static void + listWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.batchDeployments().list("test-rg", "my-aml-workspace", "testEndpointName", "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/BatchDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java index 847ffdcac6c71..85515406958e3 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 @@ -9,34 +9,29 @@ import java.util.HashMap; import java.util.Map; -/** Samples for BatchDeployments Update. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - BatchDeployment resource = - manager - .batchDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withProperties(new PartialBatchDeployment().withDescription("string")) + public static void + updateWorkspaceBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + BatchDeployment resource = manager.batchDeployments().getWithResponse("test-rg", "my-aml-workspace", + "testEndpointName", "testDeploymentName", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf()).withProperties(new PartialBatchDeployment().withDescription("string")) .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..417d964c4f79b 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 @@ -15,45 +15,36 @@ import java.util.HashMap; import java.util.Map; -/** Samples for BatchEndpoints CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .batchEndpoints() - .define("testEndpointName") - .withRegion("string") + public static void + createOrUpdateWorkspaceBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.batchEndpoints().define("testEndpointName").withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new BatchEndpointProperties() - .withAuthMode(EndpointAuthMode.AMLTOKEN) - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) + .withProperties(new BatchEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string").withProperties(mapOf("string", "string")) + .withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) .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)) + .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<>(); 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..6b98c0c61af22 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for BatchEndpoints Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .batchEndpoints() - .delete("resourceGroup-1234", "testworkspace", "testBatchEndpoint", com.azure.core.util.Context.NONE); + 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..275de070bcc9b 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for BatchEndpoints Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .batchEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + 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..4edb23e8db71b 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for BatchEndpoints ListKeys. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .batchEndpoints() - .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + 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..d4af535599062 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 @@ -4,17 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for BatchEndpoints List. */ +/** + * 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/preview/2024-01-01- + * preview/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..6552701550b99 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 @@ -13,38 +13,33 @@ import java.util.HashMap; import java.util.Map; -/** Samples for BatchEndpoints Update. */ +/** + * 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/preview/2024-01-01- + * preview/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 { - BatchEndpoint resource = - manager - .batchEndpoints() - .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)))) + public static void updateWorkspaceBatchEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + BatchEndpoint resource = manager.batchEndpoints() + .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<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..6f588b69f4559 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.CapacityReservationGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.ServerlessOffer; +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 CapacityReservationGroups CreateOrUpdate. + */ +public final class CapacityReservationGroupsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/CapacityReservationGroup/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateCapacityReservationGroup( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().define("string").withRegion("string").withExistingResourceGroup("test-rg") + .withProperties(new CapacityReservationGroupProperties() + .withOffer(new ServerlessOffer().withOfferName("string").withPublisher("string")) + .withReservedCapacity(1)) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string").withSku(new Sku().withName("string").withTier(SkuTier.PREMIUM).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; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsDeleteSamples.java new file mode 100644 index 0000000000000..46b2b8b367c64 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsDeleteSamples.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.generated; + +/** + * Samples for CapacityReservationGroups Delete. + */ +public final class CapacityReservationGroupsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/CapacityReservationGroup/delete.json + */ + /** + * Sample code: Delete Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteCapacityReservationGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().deleteByResourceGroupWithResponse("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/CapacityReservationGroupsGetByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..c3c998111274f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsGetByResourceGroupSamples.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.generated; + +/** + * Samples for CapacityReservationGroups GetByResourceGroup. + */ +public final class CapacityReservationGroupsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/CapacityReservationGroup/get.json + */ + /** + * Sample code: Get Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getCapacityReservationGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().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/CapacityReservationGroupsListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..ac77b436d6540 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsListByResourceGroupSamples.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; + +/** + * Samples for CapacityReservationGroups ListByResourceGroup. + */ +public final class CapacityReservationGroupsListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/CapacityReservationGroup/list.json + */ + /** + * Sample code: List Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listCapacityReservationGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().listByResourceGroup("test-rg", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsListSamples.java new file mode 100644 index 0000000000000..48570f2a251fb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsListSamples.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; + +/** + * Samples for CapacityReservationGroups List. + */ +public final class CapacityReservationGroupsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/CapacityReservationGroup/listBySubscription.json + */ + /** + * Sample code: ListBySubscription Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listBySubscriptionCapacityReservationGroup( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capacityReservationGroups().list(null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsUpdateSamples.java new file mode 100644 index 0000000000000..57f214fbd45ce --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapacityReservationGroupsUpdateSamples.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.CapacityReservationGroup; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for CapacityReservationGroups Update. + */ +public final class CapacityReservationGroupsUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/CapacityReservationGroup/update.json + */ + /** + * Sample code: Update Capacity Reservation Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateCapacityReservationGroup( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + CapacityReservationGroup resource = manager.capacityReservationGroups() + .getByResourceGroupWithResponse("test-rg", "string", 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)))) + .withSku(new PartialSku().withCapacity(1).withFamily("string").withName("string").withSize("string") + .withTier(SkuTier.STANDARD)) + .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/CodeContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java index 99ad6bdb20be5..52b6a039b5b28 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,33 +4,34 @@ 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; -/** Samples for CodeContainers CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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( - 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(); + public static void + createOrUpdateWorkspaceCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.codeContainers().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..747c01d6c69ef 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for CodeContainers Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .codeContainers() - .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + 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..99bd1edca3bbc 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for CodeContainers Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .codeContainers() - .getWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + 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..0285272aa17ab 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 @@ -4,17 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for CodeContainers List. */ +/** + * 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/preview/2024-01-01- + * preview/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..2b98ca1644b8d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.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.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/preview/2024-01-01- + * preview/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.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/CodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java index 92534796defae..bf614065b9da5 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,36 +4,36 @@ 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; -/** Samples for CodeVersions CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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( - 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(); + public static void + createOrUpdateWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.codeVersions() + .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..71fb57bdff44b 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for CodeVersions Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .codeVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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..7327abd7d2f9b 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for CodeVersions Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .codeVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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..c0d2a7afe3633 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for CodeVersions List. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .codeVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, com.azure.core.util.Context.NONE); + 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); } } 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..cb06e16ba08c8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..2b61e8add4b06 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,34 +4,34 @@ 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; -/** Samples for ComponentContainers CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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(); + manager.componentContainers().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..ffb0feebecd45 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ComponentContainers Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .componentContainers() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void + deleteWorkspaceComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.componentContainers().deleteWithResponse("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/ComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java index a3370c8ca451a..5b7162182e4d8 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ComponentContainers Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .componentContainers() - .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + 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..8c734265f5f1e 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ComponentContainers List. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + 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..4788c3309fe8a 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,43 +6,37 @@ 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; import java.util.Map; -/** Samples for ComponentVersions CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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(); + manager.componentVersions().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..ae9a8417a889b 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ComponentVersions Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .componentVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void + deleteWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.componentVersions().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/ComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java index fde41af2e3051..756d3b015e61d 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ComponentVersions Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .componentVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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..328bce8cdb4fe 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ComponentVersions List. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .componentVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); + public static void + listWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.componentVersions().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/ComponentVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java new file mode 100644 index 0000000000000..f06e8ec29152f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..e086c01fe02b6 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 @@ -12,274 +12,255 @@ import com.azure.resourcemanager.machinelearning.models.AssignedUser; import com.azure.resourcemanager.machinelearning.models.ComputeInstance; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings; 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.JupyterKernelConfig; import com.azure.resourcemanager.machinelearning.models.Kubernetes; import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; +import com.azure.resourcemanager.machinelearning.models.MlflowAutologger; 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. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new Aks()) - .create(); + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus") + .withProperties(new Aks()).create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new Aks() - .withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties(new AksSchemaProperties().withAgentCount(4))) + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus") + .withProperties(new Aks().withDescription("some compute").withResourceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") + .withProperties(new AksSchemaProperties().withAgentCount(4))) .create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void attachAKubernetesCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new Kubernetes() - .withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties( - new KubernetesProperties() - .withNamespace("default") - .withDefaultInstanceType("defaultInstanceType") - .withInstanceTypes( - mapOf( - "defaultInstanceType", - new InstanceTypeSchema() - .withResources( - new InstanceTypeSchemaResources() - .withRequests( - mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null)) - .withLimits( - mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null))))))) + public static void + attachAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus") + .withProperties(new Kubernetes().withDescription("some compute").withResourceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") + .withProperties( + new KubernetesProperties().withNamespace("default").withDefaultInstanceType("defaultInstanceType") + .withInstanceTypes(mapOf("defaultInstanceType", + new InstanceTypeSchema().withResources(new InstanceTypeSchemaResources() + .withRequests(mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null)) + .withLimits(mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null))))))) .create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json */ /** * Sample code: Create an ComputeInstance Compute with Schedules. - * + * * @param manager Entry point to MachineLearningManager. */ public static void createAnComputeInstanceComputeWithSchedules( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance() - .withProperties( - new ComputeInstanceProperties() - .withVmSize("STANDARD_NC6") - .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) - .withSshSettings( - new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) - .withPersonalComputeInstanceSettings( - new PersonalComputeInstanceSettings() - .withAssignedUser( - new AssignedUser() - .withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))))) + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus") + .withProperties(new ComputeInstance().withProperties(new ComputeInstanceProperties() + .withVmSize("STANDARD_NC6").withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) + .withSshSettings(new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) + .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) + .withPersonalComputeInstanceSettings(new PersonalComputeInstanceSettings() + .withAssignedUser(new AssignedUser().withObjectId("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/preview/2024-01-01- + * preview/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new AmlCompute() - .withProperties( - new AmlComputeProperties() - .withOsType(OsType.WINDOWS) - .withVmSize("STANDARD_NC6") - .withVmPriority(VmPriority.DEDICATED) - .withVirtualMachineImage( - new VirtualMachineImage() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1")) - .withIsolatedNetwork(false) - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(1) - .withMinNodeCount(0) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))) - .withRemoteLoginPortPublicAccess(RemoteLoginPortPublicAccess.NOT_SPECIFIED) - .withEnableNodePublicIp(true))) + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus") + .withProperties(new AmlCompute().withProperties(new AmlComputeProperties().withOsType(OsType.WINDOWS) + .withVmSize("STANDARD_NC6").withVmPriority(VmPriority.DEDICATED) + .withVirtualMachineImage(new VirtualMachineImage().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1")) + .withIsolatedNetwork(false) + .withScaleSettings(new ScaleSettings().withMaxNodeCount(1).withMinNodeCount(0) + .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))) + .withRemoteLoginPortPublicAccess(RemoteLoginPortPublicAccess.NOT_SPECIFIED) + .withEnableNodePublicIp(true))) .create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void createAnComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance() - .withProperties( - new ComputeInstanceProperties() - .withVmSize("STANDARD_NC6") - .withSubnet(new ResourceId().withId("test-subnet-resource-id")) - .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) - .withSshSettings( - new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) - .withPersonalComputeInstanceSettings( - new PersonalComputeInstanceSettings() - .withAssignedUser( - new AssignedUser() - .withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))))) + public static void + createAnComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus") + .withProperties(new ComputeInstance().withProperties(new ComputeInstanceProperties() + .withVmSize("STANDARD_NC6").withSubnet(new ResourceId().withId("test-subnet-resource-id")) + .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) + .withAutologgerSettings( + new ComputeInstanceAutologgerSettings().withMlflowAutologger(MlflowAutologger.ENABLED)) + .withSshSettings(new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) + .withCustomServices(Arrays.asList(new CustomService().withName("rstudio-workbench") + .withImage(new Image().withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rstudio-workbench:latest").withAdditionalProperties(mapOf())) + .withEnvironmentVariables(mapOf("RSP_LICENSE", + new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX").withAdditionalProperties(mapOf()))) + .withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints(Arrays.asList(new Endpoint().withProtocol(Protocol.HTTP).withName("connect") + .withTarget(8787).withPublished(4444))) + .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND) + .withReadOnly(true).withSource("/mnt/azureuser/").withTarget("/home/testuser/"))) + .withKernel(new JupyterKernelConfig().withArgv(Arrays.asList("option1", "option2", "option3")) + .withDisplayName("TestKernel").withLanguage("python")) + .withAdditionalProperties(mapOf()))) + .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) + .withEnableOSPatching(true).withEnableRootAccess(true).withEnableSso(true).withReleaseQuotaOnStop(true) + .withPersonalComputeInstanceSettings(new PersonalComputeInstanceSettings() + .withAssignedUser(new AssignedUser().withObjectId("00000000-0000-0000-0000-000000000000") + .withTenantId("00000000-0000-0000-0000-000000000000"))))) .create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. - * + * * @param manager Entry point to MachineLearningManager. */ public static void createAnComputeInstanceComputeWithMinimalInputs( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus") .withProperties( new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6"))) .create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void updateAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new AmlCompute() - .withDescription("some compute") - .withProperties( - new AmlComputeProperties() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(4) - .withMinNodeCount(4) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))))) + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus") + .withProperties(new AmlCompute().withDescription("some compute") + .withProperties(new AmlComputeProperties().withScaleSettings(new ScaleSettings().withMaxNodeCount(4) + .withMinNodeCount(4).withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))))) .create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void createADataFactoryCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new DataFactory()) - .create(); + public static void + createADataFactoryCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().define("compute123").withExistingWorkspace("testrg123", "workspaces123").withRegion("eastus") + .withProperties(new DataFactory()).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..283a8fb6b2a2d 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 @@ -6,24 +6,22 @@ import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; -/** Samples for Compute Delete. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/delete.json */ /** * Sample code: Delete Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void deleteCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .delete( - "testrg123", - "workspaces123", - "compute123", - UnderlyingResourceAction.DELETE, - com.azure.core.util.Context.NONE); + manager.computes().delete("testrg123", "workspaces123", "compute123", UnderlyingResourceAction.DELETE, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetAllowedResizeSizesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetAllowedResizeSizesSamples.java new file mode 100644 index 0000000000000..3df03b6436f38 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetAllowedResizeSizesSamples.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; + +/** + * Samples for Compute GetAllowedResizeSizes. + */ +public final class ComputeGetAllowedResizeSizesSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Compute/getAllowedVMSizesForResize.json + */ + /** + * Sample code: List VM Sizes. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().getAllowedResizeSizesWithResponse("testrg123", "workspaces123", "compute123", + com.azure.core.util.Context.NONE); + } +} 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..52988514b6f19 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 @@ -4,61 +4,67 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Compute Get. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getAAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().getWithResponse("testrg123", "workspaces123", "compute123", + com.azure.core.util.Context.NONE); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/get/KubernetesCompute.json */ /** * Sample code: Get a Kubernetes Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().getWithResponse("testrg123", "workspaces123", "compute123", + com.azure.core.util.Context.NONE); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/get/ComputeInstance.json */ /** * Sample code: Get an ComputeInstance. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getAnComputeInstance(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().getWithResponse("testrg123", "workspaces123", "compute123", + com.azure.core.util.Context.NONE); } /* - * 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/preview/2024-01-01- + * preview/examples/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().getWithResponse("testrg123", "workspaces123", "compute123", + com.azure.core.util.Context.NONE); } } 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..4264c2ed34eec 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Compute ListKeys. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listAKSComputeKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .listKeysWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); + manager.computes().listKeysWithResponse("testrg123", "workspaces123", "compute123", + com.azure.core.util.Context.NONE); } } 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..3dbfc0b9ad93b 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Compute ListNodes. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getComputeNodesInformationForACompute( 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..0bcbed62b7a64 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Compute List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/list.json */ /** * Sample code: Get Computes. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getComputes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeResizeSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeResizeSamples.java new file mode 100644 index 0000000000000..e7271bbbc9c90 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeResizeSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; + +/** + * Samples for Compute Resize. + */ +public final class ComputeResizeSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Compute/resize.json + */ + /** + * Sample code: List VM Sizes. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().resize("testrg123", "workspaces123", "compute123", + new ResizeSchema().withTargetVMSize("Standard_DS11_v2"), com.azure.core.util.Context.NONE); + } +} 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..27641267ac4d1 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Compute Restart. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void restartComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void + restartComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes().restart("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } } 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..2c52411e3fe4e 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Compute Start. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void startComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void + startComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes().start("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } } 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..680c1c7413323 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Compute Stop. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void stopComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void + stopComputeInstanceCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes().stop("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java new file mode 100644 index 0000000000000..2e41d84350b25 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.CustomService; +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.Protocol; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Compute UpdateCustomServices. + */ +public final class ComputeUpdateCustomServicesSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Compute/updateCustomServices.json + */ + /** + * Sample code: Update Custom Services. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateCustomServices(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().updateCustomServicesWithResponse("testrg123", "workspaces123", "compute123", + Arrays.asList(new CustomService().withName("rstudio-workbench") + .withImage(new Image().withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rstudio-workbench:latest").withAdditionalProperties(mapOf())) + .withEnvironmentVariables(mapOf("RSP_LICENSE", + new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX").withAdditionalProperties(mapOf()))) + .withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints(Arrays.asList(new Endpoint().withProtocol(Protocol.HTTP).withName("connect") + .withTarget(8787).withPublished(4444))) + .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND).withReadOnly(true) + .withSource("/mnt/azureuser/").withTarget("/home/testuser/"))) + .withAdditionalProperties(mapOf())), + 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/ComputeUpdateDataMountsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateDataMountsSamples.java new file mode 100644 index 0000000000000..4de6fdc09c131 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateDataMountsSamples.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.ComputeInstanceDataMount; +import com.azure.resourcemanager.machinelearning.models.MountAction; +import com.azure.resourcemanager.machinelearning.models.MountMode; +import com.azure.resourcemanager.machinelearning.models.SourceType; +import java.util.Arrays; + +/** + * Samples for Compute UpdateDataMounts. + */ +public final class ComputeUpdateDataMountsSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Compute/updateDataMounts.json + */ + /** + * Sample code: Update Data Mounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateDataMounts(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().updateDataMountsWithResponse("testrg123", "workspaces123", "compute123", + Arrays.asList(new ComputeInstanceDataMount().withSource( + "azureml://subscriptions/some-sub/resourcegroups/some-rg/workspaces/some-ws/data/some-data-asset-name/versions/some-data-asset-version") + .withSourceType(SourceType.URI).withMountName("hello").withMountAction(MountAction.MOUNT) + .withMountMode(MountMode.READ_ONLY).withMountPath("/some/random/path/on/host")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java new file mode 100644 index 0000000000000..d7c02a3777345 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; + +/** + * Samples for Compute UpdateIdleShutdownSetting. + */ +public final class ComputeUpdateIdleShutdownSettingSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Compute/updateIdleShutdownSetting.json + */ + /** + * Sample code: Update idle shutdown setting of ComputeInstance. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateIdleShutdownSettingOfComputeInstance( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes().updateIdleShutdownSettingWithResponse("testrg123", "workspaces123", "compute123", + new IdleShutdownSetting().withIdleTimeBeforeShutdown("PT120M"), com.azure.core.util.Context.NONE); + } +} 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..b68cdee74837d 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 @@ -9,32 +9,27 @@ import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; import java.time.Duration; -/** Samples for Compute Update. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void updateAAmlComputeCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - ComputeResource resource = - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE) - .getValue(); + public static void + updateAAmlComputeCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + ComputeResource resource = manager.computes() + .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE).getValue(); resource - .update() - .withProperties( - new ScaleSettingsInformation() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(4) - .withMinNodeCount(4) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M")))) + .update().withProperties(new ScaleSettingsInformation().withScaleSettings(new ScaleSettings() + .withMaxNodeCount(4).withMinNodeCount(4).withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M")))) .apply(); } } 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..4b36fd9558baa 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,36 +4,36 @@ 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; import java.util.Map; -/** Samples for DataContainers CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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( - 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(); + public static void + createOrUpdateWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers().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..1065758ee67ef 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for DataContainers Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .dataContainers() - .deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + 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..5cf0f3cd25844 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for DataContainers Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .dataContainers() - .getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + 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..5ae28936f4515 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 @@ -4,17 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for DataContainers List. */ +/** + * 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/preview/2024-01-01- + * preview/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..6fe4d3145c07a 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,36 +4,35 @@ 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; -/** Samples for DataVersions CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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(); + manager.dataVersions().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..540a0c1badf7b 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for DataVersions Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .dataVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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..84173357cb6fc 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for DataVersions Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .dataVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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..081bc41f315e8 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 @@ -4,28 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for DataVersions List. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .dataVersions() - .list( - "test-rg", - "my-aml-workspace", - "string", - "string", - 1, - null, - "string", - null, - com.azure.core.util.Context.NONE); + public static void + listWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions().list("test-rg", "my-aml-workspace", "string", "string", 1, null, "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/DataVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java new file mode 100644 index 0000000000000..7c612262137f6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..bc75a11ef116e 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 @@ -16,131 +16,98 @@ import java.util.Map; import java.util.UUID; -/** Samples for Datastores CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). - * + * * @param manager Entry point to MachineLearningManager. */ public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") + manager.datastores().define("string").withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties( - new AzureDataLakeGen1Datastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new ServicePrincipalDatastoreCredentials() - .withAuthorityUrl("string") - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withResourceUrl("string") - .withSecrets( - new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) + new AzureDataLakeGen1Datastore().withDescription("string").withTags(mapOf("string", "string")) + .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") + .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")).withResourceUrl("string") + .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) + .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) .withStoreName("string")) - .withSkipValidation(false) - .create(); + .withSkipValidation(false).create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). - * + * * @param manager Entry point to MachineLearningManager. */ public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") + manager.datastores().define("string").withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties( - new AzureDataLakeGen2Datastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new ServicePrincipalDatastoreCredentials() - .withAuthorityUrl("string") - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withResourceUrl("string") - .withSecrets( - new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) - .withAccountName("string") - .withEndpoint("string") - .withFilesystem("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); + new AzureDataLakeGen2Datastore().withDescription("string").withTags(mapOf("string", "string")) + .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") + .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")).withResourceUrl("string") + .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) + .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) + .withAccountName("string").withEndpoint("string").withFilesystem("string").withProtocol("string")) + .withSkipValidation(false).create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). - * + * * @param manager Entry point to MachineLearningManager. */ public static void createOrUpdateDatastoreAzureBlobWAccountKey( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureBlobDatastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .withContainerName("string") - .withEndpoint("core.windows.net") - .withProtocol("https")) - .withSkipValidation(false) - .create(); + manager.datastores().define("string").withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new AzureBlobDatastore().withDescription("string").withTags(mapOf("string", "string")) + .withCredentials(new AccountKeyDatastoreCredentials() + .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) + .withAccountName("string").withContainerName("string").withEndpoint("core.windows.net") + .withProtocol("https")) + .withSkipValidation(false).create(); } /* - * 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/preview/2024-01-01- + * preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). - * + * * @param manager Entry point to MachineLearningManager. */ public static void createOrUpdateDatastoreAzureFileStoreWAccountKey( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureFileDatastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .withEndpoint("string") - .withFileShareName("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); + manager.datastores().define("string").withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new AzureFileDatastore().withDescription("string").withTags(mapOf("string", "string")) + .withCredentials(new AccountKeyDatastoreCredentials() + .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) + .withAccountName("string").withEndpoint("string").withFileShareName("string").withProtocol("string")) + .withSkipValidation(false).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..ff9e0f1e29f6e 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Datastores Delete. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Datastore/delete.json */ /** * Sample code: Delete datastore. - * + * * @param manager Entry point to MachineLearningManager. */ public static void deleteDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + manager.datastores().deleteWithResponse("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/DatastoresGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java index 8bd81700eff59..3b564e4c73972 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Datastores Get. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Datastore/get.json */ /** * Sample code: Get datastore. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..c0a469e093590 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 @@ -6,29 +6,22 @@ import java.util.Arrays; -/** Samples for Datastores List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Datastore/list.json */ /** * Sample code: List datastores. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listDatastores(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .list( - "test-rg", - "my-aml-workspace", - null, - 1, - false, - Arrays.asList("string"), - "string", - "string", - false, - com.azure.core.util.Context.NONE); + manager.datastores().list("test-rg", "my-aml-workspace", null, 1, false, Arrays.asList("string"), "string", + "string", false, com.azure.core.util.Context.NONE); } } 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..9d10a41729d04 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Datastores ListSecrets. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Datastore/listSecrets.json */ /** * Sample code: Get datastore secrets. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getDatastoreSecrets(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .listSecretsWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + manager.datastores().listSecretsWithResponse("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/EndpointCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..93000256d662d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointResourceProperties; + +/** + * Samples for Endpoint CreateOrUpdate. + */ +public final class EndpointCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/create.json + */ + /** + * Sample code: Create Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().define("Azure.OpenAI").withExistingWorkspace("test-rg", "aml-workspace-name") + .withProperties(new OpenAIEndpointResourceProperties().withAssociatedResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.CognitiveService/account/account-1") + .withName("Azure.OpenAI")) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..2ec1d70dcf167 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentCreateOrUpdateSamples.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.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties; + +/** + * Samples for EndpointDeployment CreateOrUpdate. + */ +public final class EndpointDeploymentCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/Deployment/create.json + */ + /** + * Sample code: Create Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().define("text-davinci-003") + .withExistingEndpoint("resourceGroup-1", "testworkspace", "Azure.OpenAI") + .withProperties(new OpenAIEndpointDeploymentResourceProperties() + .withModel( + new EndpointDeploymentModel().withFormat("OpenAI").withName("text-davinci-003").withVersion("1")) + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentDeleteSamples.java new file mode 100644 index 0000000000000..45893bd545381 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentDeleteSamples.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.generated; + +/** + * Samples for EndpointDeployment Delete. + */ +public final class EndpointDeploymentDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/Deployment/delete.json + */ + /** + * Sample code: Delete Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().delete("test-rg", "aml-workspace-name", "Azure.OpenAI", "testDeploymentName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetInWorkspaceSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetInWorkspaceSamples.java new file mode 100644 index 0000000000000..d7d2b6d1c8e1f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetInWorkspaceSamples.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.generated; + +/** + * Samples for EndpointDeployment GetInWorkspace. + */ +public final class EndpointDeploymentGetInWorkspaceSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/Deployment/getInWorkspace.json + */ + /** + * Sample code: Get Endpoint Deployments In Workspace. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getEndpointDeploymentsInWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().getInWorkspace("resourceGroup-1", "testworkspace", null, null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetSamples.java new file mode 100644 index 0000000000000..7ef96a412be35 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetSamples.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; + +/** + * Samples for EndpointDeployment Get. + */ +public final class EndpointDeploymentGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/Deployment/get.json + */ + /** + * Sample code: Get Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().getWithResponse("resourceGroup-1", "testworkspace", "Azure.OpenAI", + "text-davinci-003", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentListSamples.java new file mode 100644 index 0000000000000..db9e7c3c82a42 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentListSamples.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.generated; + +/** + * Samples for EndpointDeployment List. + */ +public final class EndpointDeploymentListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/Deployment/getDeployments.json + */ + /** + * Sample code: Get Endpoint Deployments. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getEndpointDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments().list("resourceGroup-1", "testworkspace", "Azure.OpenAI", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetModelsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetModelsSamples.java new file mode 100644 index 0000000000000..cb3e8bea4c77a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetModelsSamples.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; + +/** + * Samples for Endpoint GetModels. + */ +public final class EndpointGetModelsSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/getModels.json + */ + /** + * Sample code: Get Endpoint Models. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpointModels(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().getModels("test-rg", "aml-workspace-name", "Azure.OpenAI", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetSamples.java new file mode 100644 index 0000000000000..2e907aeb3fd40 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetSamples.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; + +/** + * Samples for Endpoint Get. + */ +public final class EndpointGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/get.json + */ + /** + * Sample code: Get Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().getWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListKeysSamples.java new file mode 100644 index 0000000000000..4dbb6af7eb464 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListKeysSamples.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; + +/** + * Samples for Endpoint ListKeys. + */ +public final class EndpointListKeysSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/listKeys.json + */ + /** + * Sample code: List Endpoint Keys. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listEndpointKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().listKeysWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListSamples.java new file mode 100644 index 0000000000000..9f355ebace7f5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.EndpointType; + +/** + * Samples for Endpoint List. + */ +public final class EndpointListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/list.json + */ + /** + * Sample code: List Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().list("test-rg", "aml-workspace-name", EndpointType.AZURE_OPEN_AI, "skip_string", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointRegenerateKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointRegenerateKeysSamples.java new file mode 100644 index 0000000000000..e0ddc1b7701ad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointRegenerateKeysSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; +import com.azure.resourcemanager.machinelearning.models.ServiceAccountKeyName; + +/** + * Samples for Endpoint RegenerateKeys. + */ +public final class EndpointRegenerateKeysSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Endpoint/regenerateKey.json + */ + /** + * Sample code: Regenerate Endpoint Keys. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + regenerateEndpointKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints().regenerateKeysWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", + new RegenerateServiceAccountKeyContent().withKeyName(ServiceAccountKeyName.KEY1), + com.azure.core.util.Context.NONE); + } +} 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..8a47b8ce7ecd1 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,36 +4,38 @@ 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; -/** Samples for EnvironmentContainers CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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") + manager.environmentContainers().createOrUpdateWithResponse("testrg123", "testworkspace", "testEnvironment", + new EnvironmentContainerInner() + .withProperties(new EnvironmentContainerProperties().withDescription("string") .withProperties( mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .create(); + 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..9fa4f3b559de5 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for EnvironmentContainers Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentContainers() - .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + public static void + deleteWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers().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/EnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java index 4fa48edf026f5..7e10481bbc7f1 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for EnvironmentContainers Get. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentContainers() - .getWithResponse("testrg123", "testworkspace", "testEnvironment", com.azure.core.util.Context.NONE); + public static void + getWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers().getWithResponse("testrg123", "testworkspace", "testEnvironment", + com.azure.core.util.Context.NONE); } } 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..b06cba926bf61 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for EnvironmentContainers List. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentContainers() - .list("testrg123", "testworkspace", null, null, com.azure.core.util.Context.NONE); + public static void + listWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers().list("testrg123", "testworkspace", null, null, + com.azure.core.util.Context.NONE); } } 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..57175861cedd9 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; @@ -11,43 +12,36 @@ import java.util.HashMap; import java.util.Map; -/** Samples for EnvironmentVersions CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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(); + manager.environmentVersions().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..c6eb44bfe962e 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for EnvironmentVersions Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void + deleteWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions().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/EnvironmentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java index 04673d4e041d6..a0ae98160c0cb 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for EnvironmentVersions Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .environmentVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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..25659aea2bd8e 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for EnvironmentVersions List. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); + public static void + listWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions().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/EnvironmentVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java new file mode 100644 index 0000000000000..4139b72e032ee --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..a6dc3453d7fe5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.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; + +/** + * Samples for Features Get. + */ +public final class FeaturesGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..e4c6bb066ba94 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.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; + +/** + * Samples for Features List. + */ +public final class FeaturesListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..4f3902c48ca54 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..668f3403a1c24 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.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.generated; + +/** + * Samples for FeaturesetContainers Delete. + */ +public final class FeaturesetContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..71449cbded295 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.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.generated; + +/** + * Samples for FeaturesetContainers GetEntity. + */ +public final class FeaturesetContainersGetEntitySamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..6ae92765a38e1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..cb81d928b15ff --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.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.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/preview/2024-01-01- + * preview/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..30a966a5e7961 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All 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/preview/2024-01-01- + * preview/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..bae2559d87312 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.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.generated; + +/** + * Samples for FeaturesetVersions Delete. + */ +public final class FeaturesetVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..ceb720288b9ee --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.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.generated; + +/** + * Samples for FeaturesetVersions Get. + */ +public final class FeaturesetVersionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..c155ad488495f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..97feef711b0b5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..b906823d0bf4f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.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.generated; + +/** + * Samples for FeaturestoreEntityContainers Delete. + */ +public final class FeaturestoreEntityContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..b6b0f9efdbb13 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.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.generated; + +/** + * Samples for FeaturestoreEntityContainers GetEntity. + */ +public final class FeaturestoreEntityContainersGetEntitySamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..092724ffd9eda --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..d4ea45b187406 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..1b218ff5d1866 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.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.generated; + +/** + * Samples for FeaturestoreEntityVersions Delete. + */ +public final class FeaturestoreEntityVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..3329562405e42 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.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.generated; + +/** + * Samples for FeaturestoreEntityVersions Get. + */ +public final class FeaturestoreEntityVersionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..6cef0dae688ad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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/InferenceEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..f986d2f059226 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.AuthMode; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties; +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; + +/** + * Samples for InferenceEndpoints CreateOrUpdate. + */ +public final class InferenceEndpointsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceEndpoint/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceInferenceEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints().define("testEndpointName").withRegion("string") + .withExistingInferencePool("test-rg1", "my-aml-workspace", "string") + .withProperties(new InferenceEndpointProperties().withDescription("string") + .withProperties(mapOf("string", "string")).withAuthMode(AuthMode.AAD).withGroupId("string")) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string").withSku(new Sku().withName("string").withTier(SkuTier.STANDARD).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; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteSamples.java new file mode 100644 index 0000000000000..d545f26e2a7f0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteSamples.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.generated; + +/** + * Samples for InferenceEndpoints Delete. + */ +public final class InferenceEndpointsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceEndpoint/delete.json + */ + /** + * Sample code: Delete Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints().delete("test-rg", "my-aml-workspace", "string", "testEndpointName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsGetSamples.java new file mode 100644 index 0000000000000..ddb4f072d947c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsGetSamples.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.generated; + +/** + * Samples for InferenceEndpoints Get. + */ +public final class InferenceEndpointsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceEndpoint/get.json + */ + /** + * Sample code: Get Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints().getWithResponse("test-rg", "my-aml-workspace", "string", "testEndpointName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsListSamples.java new file mode 100644 index 0000000000000..1db2a61a203c3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.OrderString; + +/** + * Samples for InferenceEndpoints List. + */ +public final class InferenceEndpointsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceEndpoint/list.json + */ + /** + * Sample code: List Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints().list("test-rg", "my-aml-workspace", "string", 1, null, "string", "string", + OrderString.CREATED_AT_ASC, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsUpdateSamples.java new file mode 100644 index 0000000000000..5b7c270b1d7ab --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsUpdateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights 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 java.io.IOException; + +/** + * Samples for InferenceEndpoints Update. + */ +public final class InferenceEndpointsUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceEndpoint/update.json + */ + /** + * Sample code: Update Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceInferenceEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager.inferenceEndpoints().update("test-rg", "my-aml-workspace", "string", "testEndpointName", + SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{\"tags\":{}}", Object.class, + SerializerEncoding.JSON), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..09508ccfb318e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties; +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; + +/** + * Samples for InferenceGroups CreateOrUpdate. + */ +public final class InferenceGroupsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceGroup/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceInferenceGroup( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().define("string").withRegion("string") + .withExistingInferencePool("test-rg", "my-aml-workspace", "string") + .withProperties( + new InferenceGroupProperties().withDescription("string").withProperties(mapOf("string", "string")) + .withBonusExtraCapacity(1).withMetadata("string").withPriority(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; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteSamples.java new file mode 100644 index 0000000000000..5f4fb6358699b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteSamples.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.generated; + +/** + * Samples for InferenceGroups Delete. + */ +public final class InferenceGroupsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceGroup/delete.json + */ + /** + * Sample code: Delete Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().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/InferenceGroupsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetSamples.java new file mode 100644 index 0000000000000..d5bd9f5028b94 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetSamples.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.generated; + +/** + * Samples for InferenceGroups Get. + */ +public final class InferenceGroupsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceGroup/get.json + */ + /** + * Sample code: Get Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().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/InferenceGroupsGetStatusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusSamples.java new file mode 100644 index 0000000000000..00aba64bbdddc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusSamples.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.generated; + +/** + * Samples for InferenceGroups GetStatus. + */ +public final class InferenceGroupsGetStatusSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceGroup/getStatus.json + */ + /** + * Sample code: GetStatus Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getStatusWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().getStatusWithResponse("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/InferenceGroupsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSamples.java new file mode 100644 index 0000000000000..79571e54ed8a7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.OrderString; + +/** + * Samples for InferenceGroups List. + */ +public final class InferenceGroupsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceGroup/list.json + */ + /** + * Sample code: List Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().list("test-rg", "my-aml-workspace", "string", 1, null, "string", "string", + OrderString.CREATED_AT_DESC, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusSamples.java new file mode 100644 index 0000000000000..5f18cef4825b6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusSamples.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.generated; + +/** + * Samples for InferenceGroups ListSkus. + */ +public final class InferenceGroupsListSkusSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceGroup/listSkus.json + */ + /** + * Sample code: ListSkus Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listSkusWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups().listSkus("test-rg", "my-aml-workspace", "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/InferenceGroupsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsUpdateSamples.java new file mode 100644 index 0000000000000..c8734a52fbc17 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsUpdateSamples.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.InferenceGroup; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for InferenceGroups Update. + */ +public final class InferenceGroupsUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferenceGroup/update.json + */ + /** + * Sample code: Update Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + updateWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + InferenceGroup resource = manager.inferenceGroups() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf()).withSku(new PartialSku().withCapacity(1).withFamily("string") + .withName("string").withSize("string").withTier(SkuTier.STANDARD)).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/InferencePoolsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..697d30e32f63c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; +import com.azure.resourcemanager.machinelearning.models.InferencePoolProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PoolEnvironmentConfiguration; +import com.azure.resourcemanager.machinelearning.models.PoolModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.ProbeSettings; +import com.azure.resourcemanager.machinelearning.models.RequestConfiguration; +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 InferencePools CreateOrUpdate. + */ +public final class InferencePoolsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferencePool/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().define("string").withRegion("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new InferencePoolProperties().withDescription("string") + .withProperties(mapOf("string", "string")) + .withCodeConfiguration( + new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withEnvironmentConfiguration(new PoolEnvironmentConfiguration().withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")).withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1).withTimeout(Duration.parse("PT5M"))) + .withReadinessProbe(new ProbeSettings().withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")).withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1).withTimeout(Duration.parse("PT5M"))) + .withStartupProbe(new ProbeSettings().withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")).withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1).withTimeout(Duration.parse("PT5M")))) + .withModelConfiguration(new PoolModelConfiguration().withModelId("string")).withNodeSkuType("string") + .withRequestConfiguration(new RequestConfiguration() + .withMaxConcurrentRequestsPerInstance(1).withRequestTimeout(Duration.parse("PT5M")))) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_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; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteSamples.java new file mode 100644 index 0000000000000..68694ceaab8c4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteSamples.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; + +/** + * Samples for InferencePools Delete. + */ +public final class InferencePoolsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferencePool/delete.json + */ + /** + * Sample code: Delete Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().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/InferencePoolsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetSamples.java new file mode 100644 index 0000000000000..72afc8d602891 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetSamples.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.generated; + +/** + * Samples for InferencePools Get. + */ +public final class InferencePoolsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferencePool/get.json + */ + /** + * Sample code: Get Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().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/InferencePoolsGetStatusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetStatusSamples.java new file mode 100644 index 0000000000000..37d0061ac8ea9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetStatusSamples.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.generated; + +/** + * Samples for InferencePools GetStatus. + */ +public final class InferencePoolsGetStatusSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferencePool/getStatus.json + */ + /** + * Sample code: GetStatus Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getStatusWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().getStatusWithResponse("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/InferencePoolsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSamples.java new file mode 100644 index 0000000000000..b5b331cd93d1f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.OrderString; + +/** + * Samples for InferencePools List. + */ +public final class InferencePoolsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferencePool/list.json + */ + /** + * Sample code: List Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().list("test-rg", "my-aml-workspace", 1, null, "string", "string", + OrderString.UPDATED_AT_ASC, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSkusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSkusSamples.java new file mode 100644 index 0000000000000..4d3527d352aed --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSkusSamples.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.generated; + +/** + * Samples for InferencePools ListSkus. + */ +public final class InferencePoolsListSkusSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferencePool/listSkus.json + */ + /** + * Sample code: ListSkus Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listSkusWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().listSkus("test-rg", "my-aml-workspace", "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/InferencePoolsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsUpdateSamples.java new file mode 100644 index 0000000000000..831587f9f4946 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsUpdateSamples.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.InferencePool; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for InferencePools Update. + */ +public final class InferencePoolsUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/InferencePool/update.json + */ + /** + * Sample code: Update Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceInferencePool( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + InferencePool resource = manager.inferencePools() + .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf()) + .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, + SerializerEncoding.JSON)))) + .withSku(new PartialSku().withCapacity(1).withFamily("string").withName("string").withSize("string") + .withTier(SkuTier.STANDARD)) + .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/JobsCancelSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java index 3022117eaeaa9..46273b6ac5e42 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Jobs Cancel. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Job/cancel.json */ /** * Sample code: Cancel Job. - * + * * @param manager Entry point to MachineLearningManager. */ public static void cancelJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..4c633c97f9ea1 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 @@ -6,29 +6,29 @@ import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.AllNodes; import com.azure.resourcemanager.machinelearning.models.AmlToken; -import com.azure.resourcemanager.machinelearning.models.AutoMLJob; +import com.azure.resourcemanager.machinelearning.models.AutologgerSettings; 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.CustomModelFineTuning; +import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; +import com.azure.resourcemanager.machinelearning.models.FineTuningJob; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; +import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; import com.azure.resourcemanager.machinelearning.models.JobService; +import com.azure.resourcemanager.machinelearning.models.JobTier; 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.MLFlowAutologgerState; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; 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.QueueSettings; import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import com.azure.resourcemanager.machinelearning.models.TrialComponent; +import com.azure.resourcemanager.machinelearning.models.UriFileJobInput; import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; import java.io.IOException; import java.time.Duration; @@ -36,247 +36,197 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Jobs CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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)))) + .jobs().define("string").withExistingWorkspace("test-rg", + "my-aml-workspace") + .withProperties(new CommandJob().withDescription("string").withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")).withComponentId("string").withComputeId("string") + .withDisplayName("string").withExperimentName("string").withIdentity(new AmlToken()) + .withIsArchived(false) + .withNotificationSetting( + new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED)) + .withEmails(Arrays.asList("string"))) + .withServices(mapOf("string", + new JobService().withEndpoint("string").withJobServiceType("string").withNodes(new AllNodes()) + .withPort(1).withProperties(mapOf("string", "string")))) + .withAutologgerSettings(new AutologgerSettings().withMlflowAutologger(MLFlowAutologgerState.DISABLED)) + .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").withAssetName("string").withAssetVersion("string") + .withMode(OutputDeliveryMode.DIRECT).withUri("string"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.PREMIUM).withPriority(1)) + .withResources(new JobResourceConfiguration().withInstanceCount(1).withInstanceType("string") + .withLocations(Arrays.asList("string")) + .withProperties(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"f69c8d5a-9b39-4183-92d3-a2b18944cf95\":null}", Object.class, SerializerEncoding.JSON))) + .withDockerArgs("string").withShmSize("2g"))) .create(); } /* - * 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/preview/2024-01-01- + * preview/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)))))) + .jobs().define("string").withExistingWorkspace("test-rg", + "my-aml-workspace") + .withProperties(new CommandJob().withDescription("string").withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")).withComponentId("string").withComputeId("string") + .withDisplayName("string").withExperimentName("string").withIdentity(new AmlToken()) + .withIsArchived(false) + .withNotificationSetting( + new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED)) + .withEmails(Arrays.asList("string"))) + .withServices(mapOf("string", + new JobService().withEndpoint("string").withJobServiceType("string").withNodes(new AllNodes()) + .withPort(1).withProperties(mapOf("string", "string")))) + .withAutologgerSettings(new AutologgerSettings().withMlflowAutologger(MLFlowAutologgerState.DISABLED)) + .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").withAssetName("string").withAssetVersion("string") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT).withUri("string"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.BASIC).withPriority(1)) + .withResources(new JobResourceConfiguration().withInstanceCount(1).withInstanceType("string") + .withLocations(Arrays.asList("string")) + .withProperties(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"5fc1f627-491e-45a0-a6a2-f5b4be884911\":null}", Object.class, SerializerEncoding.JSON))) + .withDockerArgs("string").withShmSize("2g"))) .create(); } /* - * 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/preview/2024-01-01- + * preview/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))) + 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/preview/2024-01-01- + * preview/examples/Job/FineTuningJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().define("string").withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new FineTuningJob().withExperimentName("llm-finetuning") + .withFineTuningDetails(new CustomModelFineTuning() + .withModel(new MLFlowModelJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11")) + .withTaskType(FineTuningTaskType.TEXT_COMPLETION) + .withTrainingData(new UriFileJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11"))) + .withOutputs(mapOf("string", + new MLFlowModelJobOutput().withDescription("string").withAssetName("string") + .withAssetVersion("string").withMode(OutputDeliveryMode.READ_WRITE_MOUNT).withUri("string")))) .create(); } /* - * 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/preview/2024-01-01- + * preview/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))))) + .jobs().define("string").withExistingWorkspace("test-rg", + "my-aml-workspace") + .withProperties(new CommandJob().withDescription("string").withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")).withComponentId("string").withComputeId("string") + .withDisplayName("string").withExperimentName("string").withIdentity(new AmlToken()) + .withIsArchived(false) + .withNotificationSetting( + new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED)) + .withEmails(Arrays.asList("string"))) + .withServices(mapOf("string", + new JobService().withEndpoint("string").withJobServiceType("string").withNodes(new AllNodes()) + .withPort(1).withProperties(mapOf("string", "string")))) + .withAutologgerSettings(new AutologgerSettings().withMlflowAutologger(MLFlowAutologgerState.DISABLED)) + .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").withAssetName("string").withAssetVersion("string") + .withMode(OutputDeliveryMode.UPLOAD).withUri("string"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.BASIC).withPriority(1)) + .withResources(new JobResourceConfiguration().withInstanceCount(1).withInstanceType("string") + .withLocations(Arrays.asList("string")) + .withProperties(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"c9ac10d0-915b-4de5-afe8-a4c78a37a558\":null}", Object.class, SerializerEncoding.JSON))) + .withDockerArgs("string").withShmSize("2g"))) .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..3dd1cfab8a1d7 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Jobs Delete. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Job/delete.json */ /** * Sample code: Delete Job. - * + * * @param manager Entry point to MachineLearningManager. */ public static void deleteJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..28dfa7f79bcce 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Jobs Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { @@ -19,11 +23,13 @@ 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/preview/2024-01-01- + * preview/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) { @@ -31,11 +37,13 @@ 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/preview/2024-01-01- + * preview/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) { @@ -43,14 +51,30 @@ 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/preview/2024-01-01- + * preview/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); } + + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Job/FineTuningJob/get.json + */ + /** + * Sample code: Get FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().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/JobsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java index a5e1fdc1b6c31..24e6447eae053 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 @@ -4,59 +4,84 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Jobs List. */ +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** + * 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/preview/2024-01-01- + * preview/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, com.azure.core.util.Context.NONE); + manager.jobs().list("test-rg", "my-aml-workspace", null, "string", "string", ListViewType.ACTIVE_ONLY, null, + "string", false, "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 + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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); + manager.jobs().list("test-rg", "my-aml-workspace", null, "string", "string", null, null, null, null, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Job/FineTuningJob/list.json + */ + /** + * Sample code: List FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().list("test-rg", "my-aml-workspace", null, "string", "string", ListViewType.ALL, null, "string", + false, "string", 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/preview/2024-01-01- + * preview/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, com.azure.core.util.Context.NONE); + manager.jobs().list("test-rg", "my-aml-workspace", null, "string", "string", ListViewType.ACTIVE_ONLY, null, + "string", false, "string", 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/preview/2024-01-01- + * preview/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, com.azure.core.util.Context.NONE); + manager.jobs().list("test-rg", "my-aml-workspace", null, "string", "string", ListViewType.ALL, null, "string", + false, "string", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsUpdateSamples.java new file mode 100644 index 0000000000000..c106bfb3c8372 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsUpdateSamples.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.AzureDevOpsWebhook; +import com.azure.resourcemanager.machinelearning.models.JobBase; +import com.azure.resourcemanager.machinelearning.models.PartialJobBase; +import com.azure.resourcemanager.machinelearning.models.PartialNotificationSetting; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Jobs Update. + */ +public final class JobsUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Job/update.json + */ + /** + * Sample code: Update Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + JobBase resource = manager.jobs() + .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE).getValue(); + resource.update().withProperties(new PartialJobBase().withNotificationSetting(new PartialNotificationSetting() + .withWebhooks(mapOf("string", new AzureDevOpsWebhook().withEventType("string"))))).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/LabelingJobsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..af6fad88812f6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.fluent.models.LabelingJobPropertiesInner; +import com.azure.resourcemanager.machinelearning.models.LabelCategory; +import com.azure.resourcemanager.machinelearning.models.LabelClass; +import com.azure.resourcemanager.machinelearning.models.LabelingJobImageProperties; +import com.azure.resourcemanager.machinelearning.models.LabelingJobInstructions; +import com.azure.resourcemanager.machinelearning.models.MLAssistConfigurationEnabled; +import com.azure.resourcemanager.machinelearning.models.MultiSelect; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for LabelingJobs CreateOrUpdate. + */ +public final class LabelingJobsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/LabelingJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().define("testLabelingJob").withExistingWorkspace("workspace-1234", "testworkspace") + .withProperties(new LabelingJobPropertiesInner().withDescription("string") + .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withJobInstructions(new LabelingJobInstructions().withUri("link/to/instructions")) + .withLabelCategories(mapOf("myCategory1", new LabelCategory() + .withClasses(mapOf( + "myLabelClass1", new LabelClass().withDisplayName("myLabelClass1").withSubclasses(mapOf()), + "myLabelClass2", new LabelClass().withDisplayName("myLabelClass2").withSubclasses(mapOf()))) + .withDisplayName("myCategory1Title").withMultiSelect(MultiSelect.DISABLED), "myCategory2", + new LabelCategory() + .withClasses(mapOf("myLabelClass1", + new LabelClass().withDisplayName("myLabelClass1").withSubclasses(mapOf()), "myLabelClass2", + new LabelClass().withDisplayName("myLabelClass2").withSubclasses(mapOf()))) + .withDisplayName("myCategory2Title").withMultiSelect(MultiSelect.DISABLED))) + .withLabelingJobMediaProperties(new LabelingJobImageProperties()) + .withMlAssistConfiguration(new MLAssistConfigurationEnabled().withInferencingComputeBinding( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute") + .withTrainingComputeBinding( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute"))) + .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/LabelingJobsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsDeleteSamples.java new file mode 100644 index 0000000000000..c86dcb60ce607 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsDeleteSamples.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; + +/** + * Samples for LabelingJobs Delete. + */ +public final class LabelingJobsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/LabelingJob/delete.json + */ + /** + * Sample code: Delete Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().deleteWithResponse("workspace-1234", "testworkspace", "testLabelingJob", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsExportLabelsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsExportLabelsSamples.java new file mode 100644 index 0000000000000..4184dabb7378b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsExportLabelsSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DatasetExportSummary; + +/** + * Samples for LabelingJobs ExportLabels. + */ +public final class LabelingJobsExportLabelsSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/LabelingJob/exportLabels.json + */ + /** + * Sample code: ExportLabels Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + exportLabelsLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().exportLabels("workspace-1234", "testworkspace", "testLabelingJob", + new DatasetExportSummary(), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsGetSamples.java new file mode 100644 index 0000000000000..02f1ff53f68ff --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsGetSamples.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; + +/** + * Samples for LabelingJobs Get. + */ +public final class LabelingJobsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/LabelingJob/get.json + */ + /** + * Sample code: Get Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().getWithResponse("workspace-1234", "testworkspace", "testLabelingJob", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsListSamples.java new file mode 100644 index 0000000000000..c941039f55fbe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsListSamples.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 LabelingJobs List. + */ +public final class LabelingJobsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/LabelingJob/list.json + */ + /** + * Sample code: List Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().list("workspace-1234", "testworkspace", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsPauseSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsPauseSamples.java new file mode 100644 index 0000000000000..849221fecc62b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsPauseSamples.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; + +/** + * Samples for LabelingJobs Pause. + */ +public final class LabelingJobsPauseSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/LabelingJob/pause.json + */ + /** + * Sample code: Pause Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void pauseLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().pauseWithResponse("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/LabelingJobsResumeSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsResumeSamples.java new file mode 100644 index 0000000000000..593ce8b70b4c2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/LabelingJobsResumeSamples.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 LabelingJobs Resume. + */ +public final class LabelingJobsResumeSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/LabelingJob/resume.json + */ + /** + * Sample code: Resume Labeling Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void resumeLabelingJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.labelingJobs().resume("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/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java new file mode 100644 index 0000000000000..5ceb7d92313bd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..54a59cb7ed7ad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All 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/preview/2024-01-01- + * preview/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-1").withExistingWorkspace("test-rg", "aml-workspace-name") + .withProperties(new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.ACTIVE) + .withDestination("some_string")) + .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..8d853eb6710e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.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.generated; + +/** + * Samples for ManagedNetworkSettingsRule Delete. + */ +public final class ManagedNetworkSettingsRuleDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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", "some_string", + 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..d2eb97b5448ee --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.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.generated; + +/** + * Samples for ManagedNetworkSettingsRule Get. + */ +public final class ManagedNetworkSettingsRuleGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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", "rule-1", + 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..ffbc9e60b6321 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.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; + +/** + * Samples for ManagedNetworkSettingsRule List. + */ +public final class ManagedNetworkSettingsRuleListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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/MarketplaceSubscriptionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..97e6b7e0b7bf1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; + +/** + * Samples for MarketplaceSubscriptions CreateOrUpdate. + */ +public final class MarketplaceSubscriptionsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/MarketplaceSubscription/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Marketplace Subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceMarketplaceSubscription( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.marketplaceSubscriptions().define("string").withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new MarketplaceSubscriptionProperties().withModelId("string")).create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.java new file mode 100644 index 0000000000000..ca2da3b586adf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.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.generated; + +/** + * Samples for MarketplaceSubscriptions Delete. + */ +public final class MarketplaceSubscriptionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/MarketplaceSubscription/delete.json + */ + /** + * Sample code: Delete Workspace Marketplace Subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteWorkspaceMarketplaceSubscription( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.marketplaceSubscriptions().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/MarketplaceSubscriptionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.java new file mode 100644 index 0000000000000..81ac712632423 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.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.generated; + +/** + * Samples for MarketplaceSubscriptions Get. + */ +public final class MarketplaceSubscriptionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/MarketplaceSubscription/get.json + */ + /** + * Sample code: Get Workspace Marketplace Subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceMarketplaceSubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.marketplaceSubscriptions().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/MarketplaceSubscriptionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.java new file mode 100644 index 0000000000000..bece6f25df308 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.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; + +/** + * Samples for MarketplaceSubscriptions List. + */ +public final class MarketplaceSubscriptionsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/MarketplaceSubscription/list.json + */ + /** + * Sample code: List Workspace Marketplace Subscription. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceMarketplaceSubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.marketplaceSubscriptions().list("test-rg", "my-aml-workspace", null, 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..b15df1e84409b 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,33 +4,34 @@ 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; -/** Samples for ModelContainers CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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(); + 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<>(); 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..7310b09ec1138 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ModelContainers Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .modelContainers() - .deleteWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); + 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..20706123518b2 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ModelContainers Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .modelContainers() - .getWithResponse("testrg123", "workspace123", "testContainer", com.azure.core.util.Context.NONE); + 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..209f5eecd3ab0 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 @@ -4,17 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ModelContainers List. */ +/** + * 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/preview/2024-01-01- + * preview/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..967c710128ef3 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,39 +4,37 @@ 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; import java.util.Map; -/** Samples for ModelVersions CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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( - 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(); + 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<>(); 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..512b0771f1aa7 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ModelVersions Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .modelVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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..b10caa7548209 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ModelVersions Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .modelVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + 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..e4fdbf6405dce 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 @@ -4,33 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for ModelVersions List. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - 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); + 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, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPackageMethodSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPackageMethodSamples.java new file mode 100644 index 0000000000000..0185f810b3b9b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPackageMethodSamples.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.AzureMLBatchInferencingServer; +import com.azure.resourcemanager.machinelearning.models.BaseEnvironmentId; +import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelPackageInput; +import com.azure.resourcemanager.machinelearning.models.PackageInputDeliveryMode; +import com.azure.resourcemanager.machinelearning.models.PackageInputPathUrl; +import com.azure.resourcemanager.machinelearning.models.PackageInputType; +import com.azure.resourcemanager.machinelearning.models.PackageRequest; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ModelVersions PackageMethod. + */ +public final class ModelVersionsPackageMethodSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/ModelVersion/package.json + */ + /** + * Sample code: Package Workspace Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + packageWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.modelVersions().packageMethod("test-rg", "my-aml-workspace", "string", "string", + new PackageRequest().withBaseEnvironmentSource(new BaseEnvironmentId().withResourceId("string")) + .withEnvironmentVariables(mapOf("string", "string")) + .withInferencingServer(new AzureMLBatchInferencingServer().withCodeConfiguration( + new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string"))) + .withInputs(Arrays.asList(new ModelPackageInput().withInputType(PackageInputType.URI_FILE) + .withMode(PackageInputDeliveryMode.DOWNLOAD).withMountPath("string") + .withPath(new PackageInputPathUrl().withUrl("string")))) + .withModelConfiguration(new ModelConfiguration() + .withMode(PackageInputDeliveryMode.fromString("ReadOnlyMount")).withMountPath("string")) + .withTags(mapOf("string", "string")).withTargetEnvironmentId("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/ModelVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java new file mode 100644 index 0000000000000..55c6e62ea67ba --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..bd9de638a9c8c 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 @@ -21,136 +21,87 @@ import java.util.HashMap; import java.util.Map; -/** Samples for OnlineDeployments CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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") + 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\"")))) + .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)) + .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/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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") + 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())) + .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)) + .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<>(); 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..d21bd5fb09abd 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for OnlineDeployments Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .delete("testrg123", "workspace123", "testEndpoint", "testDeployment", com.azure.core.util.Context.NONE); + public static void + deleteWorkspaceOnlineDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.onlineDeployments().delete("testrg123", "workspace123", "testEndpoint", "testDeployment", + com.azure.core.util.Context.NONE); } } 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..e07b669dbc05a 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 @@ -7,26 +7,24 @@ import com.azure.resourcemanager.machinelearning.models.ContainerType; import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -/** Samples for OnlineDeployments GetLogs. */ +/** + * 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/preview/2024-01-01- + * preview/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); + 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); } } 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..ea4d598fdad1c 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 @@ -4,45 +4,39 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for OnlineDeployments Get. */ +/** + * 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/preview/2024-01-01- + * preview/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); + 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/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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); + 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); } } 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..456650bb8f3f2 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 @@ -4,20 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for OnlineDeployments List. */ +/** + * 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/preview/2024-01-01- + * preview/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); + manager.onlineDeployments().list("test-rg", "my-aml-workspace", "testEndpointName", "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/OnlineDeploymentsListSkusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java index bf08722862482..0cda01c7a0503 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 @@ -4,49 +4,39 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for OnlineDeployments ListSkus. */ +/** + * 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/preview/2024-01-01- + * preview/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); + 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/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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); + 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); } } 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..e4868ab6ccaa0 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 @@ -10,74 +10,47 @@ import java.util.HashMap; import java.util.Map; -/** Samples for OnlineDeployments Update. */ +/** + * 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/preview/2024-01-01- + * preview/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(); + 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/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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(); + 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<>(); 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..44b236d73aebc 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 @@ -14,46 +14,36 @@ import java.util.HashMap; import java.util.Map; -/** Samples for OnlineEndpoints CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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() - .define("testEndpointName") - .withRegion("string") + 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))) + 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)) + .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<>(); 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..b49ba11dc6a10 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for OnlineEndpoints Delete. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .onlineEndpoints() - .delete("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + 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..26d33d79bda8c 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 @@ -4,19 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for OnlineEndpoints Get. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - manager - .onlineEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + 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..03f25a320d55e 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for OnlineEndpoints GetToken. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineEndpoints() - .getTokenWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + 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); } } 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..b494ba6d83a76 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for OnlineEndpoints ListKeys. */ +/** + * 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/preview/2024-01-01- + * preview/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( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineEndpoints() - .listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE); + 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); } } 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..ac67838de3c00 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 @@ -7,29 +7,23 @@ import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; import com.azure.resourcemanager.machinelearning.models.OrderString; -/** Samples for OnlineEndpoints List. */ +/** + * 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/preview/2024-01-01- + * preview/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) { - 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); + 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); } } 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..2e0557652a65f 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 @@ -7,25 +7,24 @@ import com.azure.resourcemanager.machinelearning.models.KeyType; import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -/** Samples for OnlineEndpoints RegenerateKeys. */ +/** + * 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/preview/2024-01-01- + * preview/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() - .regenerateKeys( - "test-rg", - "my-aml-workspace", - "testEndpointName", - new RegenerateEndpointKeysRequest().withKeyType(KeyType.PRIMARY).withKeyValue("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); + manager.onlineEndpoints().regenerateKeys("test-rg", "my-aml-workspace", "testEndpointName", + new RegenerateEndpointKeysRequest().withKeyType(KeyType.PRIMARY).withKeyValue("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); } } 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..cdffe7037e1dd 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 @@ -13,38 +13,33 @@ import java.util.HashMap; import java.util.Map; -/** Samples for OnlineEndpoints Update. */ +/** + * 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/preview/2024-01-01- + * preview/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 { - 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)))) + 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<>(); 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..a1d574c76a94b 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Operations List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/operationsList.json */ /** * Sample code: OperationsList. - * + * * @param manager Entry point to MachineLearningManager. */ public static void operationsList(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..039efc889d92a 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 @@ -4,29 +4,29 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/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}") + manager.privateEndpointConnections().define("{privateEndpointConnectionName}") .withExistingWorkspace("rg-1234", "testworkspace") - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Auto-Approved")) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() + .withDescription("Auto-Approved").withStatus(EndpointServiceConnectionStatus.APPROVED)) .create(); } } 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..4516462cc9e50 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for PrivateEndpointConnections Delete. */ +/** + * 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/preview/2024-01-01- + * preview/examples/PrivateEndpointConnection/delete.json */ /** - * Sample code: WorkspaceDeletePrivateEndpointConnection. - * + * Sample code: WorkspacePutPrivateEndpointConnection. + * * @param manager Entry point to MachineLearningManager. */ - public static void workspaceDeletePrivateEndpointConnection( + public static void workspacePutPrivateEndpointConnection( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .privateEndpointConnections() - .deleteWithResponse( - "rg-1234", "testworkspace", "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections().deleteWithResponse("rg-1234", "testworkspace", + "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); } } 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..01a1f53c0965d 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for PrivateEndpointConnections Get. */ +/** + * 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/preview/2024-01-01- + * preview/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); + manager.privateEndpointConnections().getWithResponse("rg-1234", "testworkspace", + "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); } } 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..adac150b9ed88 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for PrivateEndpointConnections List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/PrivateEndpointConnection/list.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. - * + * * @param manager Entry point to MachineLearningManager. */ public static void 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..b0ef70552aff8 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for PrivateLinkResources List. */ +/** + * 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/preview/2024-01-01- + * preview/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); + public static void + workspaceListPrivateLinkResources(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.privateLinkResources().list("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); } } 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..1a0d0d6c79e25 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Quotas List. */ +/** + * 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/preview/2024-01-01- + * preview/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) { + public static void + listWorkspaceQuotasByVMFamily(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.quotas().list("eastus", com.azure.core.util.Context.NONE); } } 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..423622207d76a 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 @@ -9,37 +9,30 @@ import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; import java.util.Arrays; -/** Samples for Quotas Update. */ +/** + * 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/preview/2024-01-01- + * preview/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); + 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); } } 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..988477920fbcd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All 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/preview/2024-01-01- + * preview/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/preview/2024-01-01- + * preview/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..c74b4a010cfcf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.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 Registries Delete. + */ +public final class RegistriesDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..bd6208d341385 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.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.generated; + +/** + * Samples for Registries GetByResourceGroup. + */ +public final class RegistriesGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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/preview/2024-01-01- + * preview/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..7d4cafa1f8858 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.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.generated; + +/** + * Samples for Registries ListByResourceGroup. + */ +public final class RegistriesListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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/preview/2024-01-01- + * preview/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..f863e5f934b72 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.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; + +/** + * Samples for Registries List. + */ +public final class RegistriesListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..77d32d36f4f58 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.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.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/preview/2024-01-01- + * preview/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..6c0f893d6eb9a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.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.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/preview/2024-01-01- + * preview/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/preview/2024-01-01- + * preview/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..439e653ecec93 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..12b570c644542 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.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.generated; + +/** + * Samples for RegistryCodeContainers Delete. + */ +public final class RegistryCodeContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..3f937336e1683 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.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.generated; + +/** + * Samples for RegistryCodeContainers Get. + */ +public final class RegistryCodeContainersGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..0754166af5439 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.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; + +/** + * Samples for RegistryCodeContainers List. + */ +public final class RegistryCodeContainersListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..331ea8a1771eb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.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.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/preview/2024-01-01- + * preview/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.NONE), + 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..a5a523bcd1eb6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..5f22ca7256424 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.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.generated; + +/** + * Samples for RegistryCodeVersions Delete. + */ +public final class RegistryCodeVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..0a6b697cb5d0f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.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.generated; + +/** + * Samples for RegistryCodeVersions Get. + */ +public final class RegistryCodeVersionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..75ba316073518 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.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.generated; + +/** + * Samples for RegistryCodeVersions List. + */ +public final class RegistryCodeVersionsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..8752de980e9b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..794a42d2e31e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.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.generated; + +/** + * Samples for RegistryComponentContainers Delete. + */ +public final class RegistryComponentContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..99341468dc796 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.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.generated; + +/** + * Samples for RegistryComponentContainers Get. + */ +public final class RegistryComponentContainersGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..a6fb1b8355459 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.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.generated; + +/** + * Samples for RegistryComponentContainers List. + */ +public final class RegistryComponentContainersListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..b42741a8cbd6a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..9b97b9d5c54b0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.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.generated; + +/** + * Samples for RegistryComponentVersions Delete. + */ +public final class RegistryComponentVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..55e05fb24869b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.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.generated; + +/** + * Samples for RegistryComponentVersions Get. + */ +public final class RegistryComponentVersionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..9f4fa057d0d30 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.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.generated; + +/** + * Samples for RegistryComponentVersions List. + */ +public final class RegistryComponentVersionsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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, 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..f3d3cdcf80110 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..910d277f85610 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.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; + +/** + * Samples for RegistryDataContainers Delete. + */ +public final class RegistryDataContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..63f4c5eb8318f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.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.generated; + +/** + * Samples for RegistryDataContainers Get. + */ +public final class RegistryDataContainersGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..127de4729934c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..9d993bda30c20 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.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.GetBlobReferenceSasRequestDto; + +/** + * Samples for RegistryDataReferences GetBlobReferenceSas. + */ +public final class RegistryDataReferencesGetBlobReferenceSasSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..35fce62938608 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.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.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/preview/2024-01-01- + * preview/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..65831eb4aebc8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..e0b4c70e03e31 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.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.generated; + +/** + * Samples for RegistryDataVersions Delete. + */ +public final class RegistryDataVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..3ef3cb8e5b11f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.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.generated; + +/** + * Samples for RegistryDataVersions Get. + */ +public final class RegistryDataVersionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..e596d62da5d3d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.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/preview/2024-01-01- + * preview/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..be216ed5470c3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..aa65b6a1531a5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.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.generated; + +/** + * Samples for RegistryEnvironmentContainers Delete. + */ +public final class RegistryEnvironmentContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..384aab52db8f8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.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.generated; + +/** + * Samples for RegistryEnvironmentContainers Get. + */ +public final class RegistryEnvironmentContainersGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..b605adae686d7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.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.generated; + +/** + * Samples for RegistryEnvironmentContainers List. + */ +public final class RegistryEnvironmentContainersListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..d8941fa7a7ccf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..6e61bafc8cf70 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.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.generated; + +/** + * Samples for RegistryEnvironmentVersions Delete. + */ +public final class RegistryEnvironmentVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..ed4607883ce56 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.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.generated; + +/** + * Samples for RegistryEnvironmentVersions Get. + */ +public final class RegistryEnvironmentVersionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..68ce4fbac538c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.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.generated; + +/** + * Samples for RegistryEnvironmentVersions List. + */ +public final class RegistryEnvironmentVersionsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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, + 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..43701a0fcd95d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..5509dd05aaa6f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.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.generated; + +/** + * Samples for RegistryModelContainers Delete. + */ +public final class RegistryModelContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..f179b23d5624e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.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.generated; + +/** + * Samples for RegistryModelContainers Get. + */ +public final class RegistryModelContainersGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..8b5c61bdd1641 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.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.generated; + +/** + * Samples for RegistryModelContainers List. + */ +public final class RegistryModelContainersListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..a043c383b74d6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.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.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/preview/2024-01-01- + * preview/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.NONE), + 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..3a5e6c657fc79 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.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.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/preview/2024-01-01- + * preview/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..3a2793d7175b7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.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.generated; + +/** + * Samples for RegistryModelVersions Delete. + */ +public final class RegistryModelVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..f0087eb13ae65 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.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.generated; + +/** + * Samples for RegistryModelVersions Get. + */ +public final class RegistryModelVersionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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..d0b2636d9384f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.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.generated; + +/** + * Samples for RegistryModelVersions List. + */ +public final class RegistryModelVersionsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/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/RegistryModelVersionsPackageMethodSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsPackageMethodSamples.java new file mode 100644 index 0000000000000..e328f980d5674 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsPackageMethodSamples.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.AzureMLBatchInferencingServer; +import com.azure.resourcemanager.machinelearning.models.BaseEnvironmentId; +import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.ModelPackageInput; +import com.azure.resourcemanager.machinelearning.models.PackageInputDeliveryMode; +import com.azure.resourcemanager.machinelearning.models.PackageInputPathUrl; +import com.azure.resourcemanager.machinelearning.models.PackageInputType; +import com.azure.resourcemanager.machinelearning.models.PackageRequest; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for RegistryModelVersions PackageMethod. + */ +public final class RegistryModelVersionsPackageMethodSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Registry/ModelVersion/package.json + */ + /** + * Sample code: Package Registry Model Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + packageRegistryModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.registryModelVersions().packageMethod("test-rg", "my-aml-registry", "string", "string", + new PackageRequest().withBaseEnvironmentSource(new BaseEnvironmentId().withResourceId("string")) + .withEnvironmentVariables(mapOf("string", "string")) + .withInferencingServer(new AzureMLBatchInferencingServer().withCodeConfiguration( + new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string"))) + .withInputs(Arrays.asList(new ModelPackageInput().withInputType(PackageInputType.URI_FILE) + .withMode(PackageInputDeliveryMode.DOWNLOAD).withMountPath("string") + .withPath(new PackageInputPathUrl().withUrl("string")))) + .withModelConfiguration(new ModelConfiguration() + .withMode(PackageInputDeliveryMode.fromString("ReadOnlyMount")).withMountPath("string")) + .withTags(mapOf("string", "string")).withTargetEnvironmentId("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/SchedulesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java index f58b680aaf5b0..f2fdf513c1f11 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 @@ -13,47 +13,34 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Schedules CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Schedule/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Schedule. - * + * * @param manager Entry point to MachineLearningManager. */ public static void createOrUpdateSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager - .schedules() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ScheduleProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withAction( - new EndpointScheduleAction() - .withEndpointInvocationDefinition( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", - Object.class, - SerializerEncoding.JSON))) - .withDisplayName("string") - .withIsEnabled(false) - .withTrigger( - new CronTrigger() - .withEndTime("string") - .withStartTime("string") - .withTimeZone("string") - .withExpression("string"))) + manager.schedules().define("string").withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new ScheduleProperties().withDescription("string").withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withAction(new EndpointScheduleAction().withEndpointInvocationDefinition( + SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", Object.class, SerializerEncoding.JSON))) + .withDisplayName("string").withIsEnabled(false).withTrigger(new CronTrigger().withEndTime("string") + .withStartTime("string").withTimeZone("string").withExpression("string"))) .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..82e96d77a2693 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Schedules Delete. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Schedule/delete.json */ /** * Sample code: Delete Schedule. - * + * * @param manager Entry point to MachineLearningManager. */ public static void deleteSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..ee7cd00224a56 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Schedules Get. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Schedule/get.json */ /** * Sample code: Get Schedule. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..2b299ecef3713 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Schedules List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Schedule/list.json */ /** * Sample code: List Schedules. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listSchedules(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesTriggerSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesTriggerSamples.java new file mode 100644 index 0000000000000..86a10bd46778b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesTriggerSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.TriggerOnceRequest; + +/** + * Samples for Schedules Trigger. + */ +public final class SchedulesTriggerSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Schedule/trigger.json + */ + /** + * Sample code: Trigger Schedule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void triggerSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.schedules().triggerWithResponse("test-rg", "my-aml-workspace", "test-schedule", + new TriggerOnceRequest().withScheduleTime("2024-01-01T12:34:56.999Z"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..ed4c9f53ff86c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointCapacityReservation; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; +import com.azure.resourcemanager.machinelearning.models.ServerlessOffer; +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 ServerlessEndpoints CreateOrUpdate. + */ +public final class ServerlessEndpointsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/ServerlessEndpoint/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceServerlessEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().define("string").withRegion("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new ServerlessEndpointProperties().withAuthMode(ServerlessInferenceEndpointAuthMode.AAD) + .withCapacityReservation(new ServerlessEndpointCapacityReservation() + .withCapacityReservationGroupId("string").withEndpointReservedCapacity(1)) + .withOffer(new ServerlessOffer().withOfferName("string").withPublisher("string"))) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string").withSku(new Sku().withName("string").withTier(SkuTier.STANDARD).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; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.java new file mode 100644 index 0000000000000..29807cd281cea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.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; + +/** + * Samples for ServerlessEndpoints Delete. + */ +public final class ServerlessEndpointsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/ServerlessEndpoint/delete.json + */ + /** + * Sample code: Delete Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().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/ServerlessEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.java new file mode 100644 index 0000000000000..0a30ec6a890c6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.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.generated; + +/** + * Samples for ServerlessEndpoints Get. + */ +public final class ServerlessEndpointsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/ServerlessEndpoint/get.json + */ + /** + * Sample code: Get Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().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/ServerlessEndpointsGetStatusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetStatusSamples.java new file mode 100644 index 0000000000000..9cc10630b6cb6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetStatusSamples.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.generated; + +/** + * Samples for ServerlessEndpoints GetStatus. + */ +public final class ServerlessEndpointsGetStatusSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/ServerlessEndpoint/getStatus.json + */ + /** + * Sample code: GetStatus Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getStatusWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().getStatusWithResponse("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/ServerlessEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.java new file mode 100644 index 0000000000000..cc38bd89c2e4a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.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.generated; + +/** + * Samples for ServerlessEndpoints ListKeys. + */ +public final class ServerlessEndpointsListKeysSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/ServerlessEndpoint/listKeys.json + */ + /** + * Sample code: ListKeys Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listKeysWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().listKeysWithResponse("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/ServerlessEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.java new file mode 100644 index 0000000000000..a7794746c039b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.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; + +/** + * Samples for ServerlessEndpoints List. + */ +public final class ServerlessEndpointsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/ServerlessEndpoint/list.json + */ + /** + * Sample code: List Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceServerlessEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().list("test-rg", "my-aml-workspace", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java new file mode 100644 index 0000000000000..3e68cf248a153 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.KeyType; +import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; + +/** + * Samples for ServerlessEndpoints RegenerateKeys. + */ +public final class ServerlessEndpointsRegenerateKeysSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/ServerlessEndpoint/regenerateKeys.json + */ + /** + * Sample code: RegenerateKeys Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void regenerateKeysWorkspaceServerlessEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.serverlessEndpoints().regenerateKeys("test-rg", "my-aml-workspace", "string", + new RegenerateEndpointKeysRequest().withKeyType(KeyType.PRIMARY).withKeyValue("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.java new file mode 100644 index 0000000000000..0840c4fab8a23 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.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.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ServerlessEndpoints Update. + */ +public final class ServerlessEndpointsUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/Workspace/ServerlessEndpoint/update.json + */ + /** + * Sample code: Update Workspace Serverless Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceServerlessEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + ServerlessEndpoint resource = manager.serverlessEndpoints() + .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf()) + .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", Object.class, + SerializerEncoding.JSON)))) + .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/UsagesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java index 610f0219a60a3..2499486005025 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Usages List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Usage/list.json */ /** * Sample code: List Usages. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listUsages(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..3126fd8c0ced4 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for VirtualMachineSizes List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..c1652b9a03771 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 @@ -6,27 +6,28 @@ import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; -/** Samples for WorkspaceConnections Create. */ +/** + * 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/preview/2024-01-01- + * preview/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void createWorkspaceConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .define("connection-1") - .withExistingWorkspace("resourceGroup-1", "workspace-1") + public static void + createWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().define("connection-1").withExistingWorkspace("resourceGroup-1", "workspace-1") .withProperties( - new NoneAuthTypeWorkspaceConnectionProperties() - .withCategory(ConnectionCategory.CONTAINER_REGISTRY) - .withTarget("www.facebook.com")) + new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.CONTAINER_REGISTRY) + .withExpiryTime(OffsetDateTime.parse("2024-03-15T14:30:00Z")).withTarget("www.facebook.com")) .create(); } } 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..0482f70531f2c 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for WorkspaceConnections Delete. */ +/** + * 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/preview/2024-01-01- + * preview/examples/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void deleteWorkspaceConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .deleteWithResponse("resourceGroup-1", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); + public static void + deleteWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().deleteWithResponse("resourceGroup-1", "workspace-1", "connection-1", + com.azure.core.util.Context.NONE); } } 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..40eb3d2bdf85e 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 @@ -4,20 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for WorkspaceConnections Get. */ +/** + * 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/preview/2024-01-01- + * preview/examples/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void getWorkspaceConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .getWithResponse("resourceGroup-1", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); + public static void + getWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().getWithResponse("resourceGroup-1", "workspace-1", "connection-1", null, + com.azure.core.util.Context.NONE); } } 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..0db03209939f0 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 @@ -4,25 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for WorkspaceConnections List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void listWorkspaceConnections( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .list( - "resourceGroup-1", - "workspace-1", - "www.facebook.com", - "ContainerRegistry", - com.azure.core.util.Context.NONE); + public static void + listWorkspaceConnections(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", + null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.java new file mode 100644 index 0000000000000..617fb88d6e442 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.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.generated; + +/** + * Samples for WorkspaceConnections ListSecrets. + */ +public final class WorkspaceConnectionsListSecretsSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/WorkspaceConnection/listSecrets.json + */ + /** + * Sample code: GetWorkspaceConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().listSecretsWithResponse("test-rg", "workspace-1", "connection-1", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsTestConnectionSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsTestConnectionSamples.java new file mode 100644 index 0000000000000..336f5a4fa8f8c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsTestConnectionSamples.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.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; + +/** + * Samples for WorkspaceConnections TestConnection. + */ +public final class WorkspaceConnectionsTestConnectionSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/WorkspaceConnection/testConnection.json + */ + /** + * Sample code: TestWorkspaceConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + testWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections().testConnection("resourceGroup-1", "workspace-1", "connection-1", + new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( + new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.CONTAINER_REGISTRY) + .withExpiryTime(OffsetDateTime.parse("2024-03-15T14:30:00Z")).withTarget("target_url")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsUpdateSamples.java new file mode 100644 index 0000000000000..35ab1c168fd69 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsUpdateSamples.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.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.AccessKeyAuthTypeWorkspaceConnectionProperties; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccessKey; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Samples for WorkspaceConnections Update. + */ +public final class WorkspaceConnectionsUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-01-01- + * preview/examples/WorkspaceConnection/update.json + */ + /** + * Sample code: UpdateWorkspaceConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceConnection( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + WorkspaceConnectionPropertiesV2BasicResource resource = manager.workspaceConnections() + .getWithResponse("test-rg", "workspace-1", "connection-1", null, com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new AccessKeyAuthTypeWorkspaceConnectionProperties() + .withCategory(ConnectionCategory.ADLSGEN2).withExpiryTime(OffsetDateTime.parse("2020-01-01T00:00:00Z")) + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize("{}", + Object.class, SerializerEncoding.JSON)) + .withTarget("some_string").withCredentials(new WorkspaceConnectionAccessKey() + .withAccessKeyId("fakeTokenPlaceholder").withSecretAccessKey("fakeTokenPlaceholder"))) + .apply(); + } +} 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..8e4736894e9d5 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for WorkspaceFeatures List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceFeatures(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..c3ae4499c887c 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 @@ -4,78 +4,65 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultProperties; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; import com.azure.resourcemanager.machinelearning.models.EncryptionStatus; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.IdentityForCmk; +import com.azure.resourcemanager.machinelearning.models.KeyVaultProperties; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces CreateOrUpdate. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/create.json */ /** * Sample code: Create Workspace. - * + * * @param manager Entry point to MachineLearningManager. */ public static void createWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .define("testworkspace") - .withExistingResourceGroup("workspace-1234") + manager.workspaces().define("testworkspace").withExistingResourceGroup("workspace-1234") .withRegion("eastus2euap") - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai", - new UserAssignedIdentity()))) - .withDescription("test description") - .withFriendlyName("HelloName") - .withKeyVault( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai", + new UserAssignedIdentity()))) .withApplicationInsights( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights") .withContainerRegistry( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry") + .withDescription("test description") + .withEncryption(new EncryptionProperty().withIdentity(new IdentityForCmk().withUserAssignedIdentity( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")) + .withKeyVaultProperties(new KeyVaultProperties().withIdentityClientId("") + .withKeyIdentifier("fakeTokenPlaceholder").withKeyVaultArmId("fakeTokenPlaceholder")) + .withStatus(EncryptionStatus.ENABLED)) + .withFriendlyName("HelloName").withHbiWorkspace(false) + .withKeyVault( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") + .withSharedPrivateLinkResources(Arrays.asList(new SharedPrivateLinkResource().withName("testdbresource") + .withGroupId("Sql") + .withPrivateLinkResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql") + .withRequestMessage("Please approve").withStatus(EndpointServiceConnectionStatus.APPROVED))) .withStorageAccount( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") - .withEncryption( - new EncryptionProperty() - .withStatus(EncryptionStatus.ENABLED) - .withIdentity( - new IdentityForCmk() - .withUserAssignedIdentity( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")) - .withKeyVaultProperties( - new EncryptionKeyVaultProperties() - .withKeyVaultArmId("fakeTokenPlaceholder") - .withKeyIdentifier("fakeTokenPlaceholder") - .withIdentityClientId(""))) - .withHbiWorkspace(false) - .withSharedPrivateLinkResources( - Arrays - .asList( - new SharedPrivateLinkResource() - .withName("testdbresource") - .withPrivateLinkResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql") - .withGroupId("Sql") - .withRequestMessage("Please approve") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED))) .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..9b97c6f87318b 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 @@ -4,17 +4,21 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces Delete. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/delete.json */ /** * Sample code: Delete Workspace. - * + * * @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..b316c2d789176 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 @@ -9,37 +9,29 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces Diagnose. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. - * + * * @param manager Entry point to MachineLearningManager. */ public static void diagnoseWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .diagnose( - "workspace-1234", - "testworkspace", - new DiagnoseWorkspaceParameters() - .withValue( - new DiagnoseRequestProperties() - .withUdr(mapOf()) - .withNsg(mapOf()) - .withResourceLock(mapOf()) - .withDnsResolution(mapOf()) - .withStorageAccount(mapOf()) - .withKeyVault(mapOf()) - .withContainerRegistry(mapOf()) - .withApplicationInsights(mapOf()) - .withOthers(mapOf())), - com.azure.core.util.Context.NONE); + manager.workspaces().diagnose("workspace-1234", "testworkspace", + new DiagnoseWorkspaceParameters().withValue(new DiagnoseRequestProperties().withApplicationInsights(mapOf()) + .withContainerRegistry(mapOf()).withDnsResolution(mapOf()).withKeyVault(mapOf()).withNsg(mapOf()) + .withOthers(mapOf()).withResourceLock(mapOf()).withStorageAccount(mapOf()).withUdr(mapOf())), + 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..511b39416f904 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces GetByResourceGroup. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/get.json */ /** * Sample code: Get Workspace. - * + * * @param manager Entry point to MachineLearningManager. */ public static void getWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.workspaces().getByResourceGroupWithResponse("workspace-1234", "testworkspace", + com.azure.core.util.Context.NONE); } } 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..5513819f0d899 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces ListByResourceGroup. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void getWorkspacesByResourceGroup( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listByResourceGroup("workspace-1234", null, com.azure.core.util.Context.NONE); + public static void + getWorkspacesByResourceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaces().listByResourceGroup("workspace-1234", 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/WorkspacesListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java index ccbe6102435a5..5a5db6cb556bb 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces ListKeys. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..d558947454802 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces ListNotebookAccessToken. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listNotebookAccessTokenWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.workspaces().listNotebookAccessTokenWithResponse("workspace-1234", "testworkspace", + com.azure.core.util.Context.NONE); } } 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..d03ac55fa0154 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces ListNotebookKeys. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listNotebookKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); + manager.workspaces().listNotebookKeysWithResponse("testrg123", "workspaces123", + com.azure.core.util.Context.NONE); } } 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..938fd6411b5b9 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 @@ -4,21 +4,23 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces ListOutboundNetworkDependenciesEndpoints. */ +/** + * 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/preview/2024-01-01- + * preview/examples/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listOutboundNetworkDependenciesEndpoints( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listOutboundNetworkDependenciesEndpointsWithResponse( - "workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.workspaces().listOutboundNetworkDependenciesEndpointsWithResponse("workspace-1234", "testworkspace", + com.azure.core.util.Context.NONE); } } 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..c92fa41c10ed0 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 @@ -4,18 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces List. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. - * + * * @param manager Entry point to MachineLearningManager. */ - public static void getWorkspacesBySubscription( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); + public static void + getWorkspacesBySubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaces().list(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/WorkspacesListStorageAccountKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java index 9394db609d6c0..61399f6e87ddf 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 @@ -4,19 +4,22 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces ListStorageAccountKeys. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listStorageAccountKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); + manager.workspaces().listStorageAccountKeysWithResponse("testrg123", "workspaces123", + com.azure.core.util.Context.NONE); } } 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..2da222823f734 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces PrepareNotebook. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. - * + * * @param manager Entry point to MachineLearningManager. */ public static void prepareNotebook(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..866ce4f81c600 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 @@ -4,14 +4,18 @@ package com.azure.resourcemanager.machinelearning.generated; -/** Samples for Workspaces ResyncKeys. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. - * + * * @param manager Entry point to MachineLearningManager. */ public static void resyncWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { 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..b3feab074db1d 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 @@ -4,30 +4,28 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType; import com.azure.resourcemanager.machinelearning.models.Workspace; -/** Samples for Workspaces Update. */ +/** + * 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/preview/2024-01-01- + * preview/examples/Workspace/update.json */ /** * Sample code: Update Workspace. - * + * * @param manager Entry point to MachineLearningManager. */ public static void updateWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDescription("new description") - .withFriendlyName("New friendly name") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .apply(); + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withDescription("new description").withFriendlyName("New friendly name") + .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED).apply(); } } 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); - } -}